• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

LuckyParser: an abandoned JASS parser concept

Should JassHelper be updated?


  • Total voters
    56
Status
Not open for further replies.
Level 23
Joined
Jan 1, 2009
Messages
1,617
Y ofc, it should be possible, e.g. if I want to compile codes when using Linux on my notebook.

JNGP is okay, but i would rather like a smaller pack.
Some Stuff like RtC and UMSWE are complety trash.

But I think there should be something we can suggest/discuss about before starting to think on something like that :D

e: useful thing would be a vJass to Luck Converter
 

LeP

LeP

Level 13
Joined
Feb 13, 2008
Messages
545
Also, what language are you writing the compiler in?

Yeah, im also very interested in your choices about language and parser.

Just to provide an example of what a normal compiler uses, GCC (GNU C Compiler) uses C and Flex/Bison (if I recall correctly).

If i recall correctly most of the gcc-frontends are using hand-written recursive-descent parser 1 2.

Bison is still a good choice for parser since it makes expression parsing (e.g. operator precedence) way easier than rd-parser.

And i hope you build the whole ast. I think one of the biggest problems of JH was that Vexorian did not parsed every expression. [citation needed]

__________
[1] http://gcc.gnu.org/ml/gcc/2000-10/msg00573.html
[2] http://en.wikipedia.org/wiki/GNU_Compiler_Collection#Front-ends
 
Last edited:
Level 19
Joined
Oct 15, 2008
Messages
3,231
That. Is. Awesome.
My friends are working on another for it too at the moment, so we'll have more stuff to help:)
Good job! +Rep
 
Flex/Bison will probably be the end result. What I'm going to do is write out the entire language parser in basic form and when that is completed I will adapt my source code to fit the language of the parser (C++ by the looks of things).

Flex and Bison doesn't support C++ nearly as well as they support C, if I remember the documentation I've read on them correctly, which is why the GNU Compilers use C.
 
Flex and Bison are tools used in creating compilers. Flex is a 'lexical analyzer' and Bison is a 'parser generator'.
Wikipedia can do a better job of explaining the specific than I can:
http://en.wikipedia.org/wiki/GNU_bison
http://en.wikipedia.org/wiki/Flex_lexical_analyser

And JASSHelper already uses the GOLD Parser system, which are essentially Flex / Bison, but not quite as powerful, and not nearly as fast (at least I think so, on the speed.).
 
Level 23
Joined
Jan 1, 2009
Messages
1,617
I dont know if you dont get it or want to write ur own JASSHelper Update,
but if you didnt even know what Flex/Bison are I think u can't.
Flex/Bison are being used when writing/creating->compiling your sourcecode.
Its not like there is a setting to choose which Parser JASSHelper should use.

And are there any others? Why dont you look it up yourself?
Just google for 'lexical analyzer' and 'parser generator' and you got thousands of finds.

Vex obviously took GOLD because Bison doesnt support Delphi(in which JassHelper is programmed).

@lifelessone GOLD is just a Parsing System.
 
Level 23
Joined
Jan 1, 2009
Messages
1,617
I was simply saying the project is incomplete yet abandoned.
Y I got that, was just kidding.

How about Class/Struct Syntax?
Will/can you remove the dot/this as requirement when calling a method inside a Class/Struct, or how will that look like?

Abtract Classes?

Ah and why does TimerUtils require Disctionary?(what is that anyway)

Does Scriptoptimization als remove Whitespaces?

Can optional parameters be dynamic values?

And as so many keep complaining about it, maybe you should make endblocks optional.
 
Level 19
Joined
Oct 15, 2008
Messages
3,231
Is it okay with you guys if I try updating one more with my friends too after the exams?
I happen to find these programming stuff for Warcraft III really interesting.
 
Level 23
Joined
Jan 1, 2009
Messages
1,617
Is it okay with you guys if I try updating one more with my friends too after the exams?
I happen to find these programming stuff for Warcraft III really interesting.

Why not? ;)
I mean if you just change JassHelper Sourcecode, what Vex allowed, and upload it somewhere or just use it for yourself how could some1 have a problem with that?
Its not like we are forced to take your variant.
 
TimerUtils currently uses its own hashtable. Dictionary (as guessed, based on Table) has two ways to generate parent keys for indexing. 1. Created in-game, so they are dynamic, and 2. (new possible way, thanks to Luck's preprocessing) are static Tables represented by 1, 2, 3, 4, etc. instead of slower variable pointers i, j, k, l, etc.

This works together to eliminate any excuse people have of creating their own hashtables. Dictionary will be able to do the exact same with the exact same speed, save for three-dimensional hashtables which might be slowed down 4% with a DictArray.
 
Level 19
Joined
Oct 15, 2008
Messages
3,231
That sounds great! With more updates for JASSHelper around, there would be more ways for improvement in maps and a reduced limit of triggering.
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
I dont know if you didnt read it yet, but this wont be a JassHelper Update anymore, but a brand new Compiler.

Doesn't really matter as it works with JASSHelper as well yet you probably will quit vJASSing/ZINCing and go luck.

That sounds great! With more updates for JASSHelper around, there would be more ways for improvement in maps and a reduced limit of triggering.

I see alot more that still are using GUI... even with JASSHelper (better than nothing...).
 
Level 19
Joined
Oct 15, 2008
Messages
3,231
But why would they quit vJASS/Zinc for Luck?
I'm quite confused about their differences, to be honest.

PS: I'll log on later to ask something else, still at my friend's house!
 
Too many special structures, making the language chaotic.

Simpler preprocessing would be Luck with a # and some extra methods like print. Get rid of bookmarks and just print to files and import those >.>.

For example, a library can import a file for optional plugins or w/e.

The Lua language could be used for preprocessing, but if you wanted to go above and beyond, u could use Luck syntax.

The $ in strings is a bad idea... what if you wanted to actually write out the string? >.>.

Just minimize the special structures and rules. Cut out as much as you possibly can.

Right now this looks like a nightmare of a language I'd never want to touch ^)^.


And yea, I still suggest struct name/class name for create and ~struct name/~class name for destroy. Much simpler.

new/delete


The colons with the tabs actually make the code look messy... there should be clear start and end markers for easier to read code :\. I think C had it right with the { }.

Include ternary operator.

Include operations for classes like >>, <<, |, &.

&& and || should be used. There is a reason for this. Look up things like a truth table and you'll start to get why.

^ would be interesting for powers of strings/numbers. The ^ would be used to multiply a string (string^2 = stringstring) and ^ would be used to raise an int/float to a power (3^3 = 27).

Rather than all of these special conversion methods, just do regular typecasting
(int)
(float)
int()
float()

etc... so much simpler... don't add all of these special rules >.>.

You should add language blocks because vJASS mixed with Zinc mixed with Luck mixed with JASS is just totally chaotic >.<.

Luck {
}

And there is just sooo much more... =)
 
Level 23
Joined
Jan 1, 2009
Messages
1,617
Too many special structures, making the language chaotic.

Simpler preprocessing would be Luck with a # and some extra methods like print. Get rid of bookmarks and just print to files and import those >.>.
Some keywords might be unneeded ur right
For example, a library can import a file for optional plugins or w/e.

The Lua language could be used for preprocessing, but if you wanted to go above and beyond, u could use Luck syntax.

The $ in strings is a bad idea... what if you wanted to actually write out the string? >.>.
I like it. The X2S and +'s annoy me alot. If you wanna write "$" there will be a way.
Just minimize the special structures and rules. Cut out as much as you possibly can.

Right now this looks like a nightmare of a language I'd never want to touch ^)^.
its not superb, but not that bad either. You can touch urself enough instead of luck ;D

And yea, I still suggest struct name/class name for create and ~struct name/~class name for destroy. Much simpler.
"~" just no
new/delete


The colons with the tabs actually make the code look messy... there should be clear start and end markers for easier to read code :\. I think C had it right with the { }.
Ever had a look at phyton? Works well without faggot brackets. theyre shit. and Ass to write. Slow down even mroe than endfunction.
Include ternary operator.

Include operations for classes like >>, <<, |, &.
Dno what for, but bitshifts would be funny tho.
&& and || should be used. There is a reason for this. Look up things like a truth table and you'll start to get why.
No, why? -> make it optional, i prefer the verbosal way
^ would be interesting for powers of strings/numbers. The ^ would be used to multiply a string (string^2 = stringstring) and ^ would be used to raise an int/float to a power (3^3 = 27).
if you could define own operators this would be possible
Rather than all of these special conversion methods, just do regular typecasting
(int)
(float)
int()
float()

etc... so much simpler... don't add all of these special rules >.>.
I dont really know if i want those

You should add language blocks because vJASS mixed with Zinc mixed with Luck mixed with JASS is just totally chaotic >.<.

Luck {
}
Y well, should do that, tho it only has use till all basic libs are converted to Luck(imo)
And there is just sooo much more... =)

Luck needs some adjustments here and there, but many things should be optional imo.
 
Oh for hooks, people should be able to either hook via trigger or functions.

Also, it makes more sense to make hooks preprocessor, otherwise it looks slightly chaotic. I really suggest the # to make it really clear which lines are preprocessor lines and which aren't.

#hook.trigger(function name, isAfter)
#hook.function(function name, isAfter)

Could be like a method call where hook is a static class.

Could also do it this way
#hook.trigger.after(function name)

Also, now that I think about it, the bookmark idea is pretty nice, but it'd be better to make it like a preprocessor constant delegate (pass in function call only, like hello(x,y))

You shouldn't be injecting code straight into a function as that is a very bad practice ^)^. Also, delegates are a much more known and standard term. Triggers are pretty much delegates =).

Also, if you do use Lua, you could do a lot of other cool things like auto updating libraries, etc ; ).


Another good thing would be to retrieve all of the object edit constant fields and import them as definitions (not variables, don't flood the scope >.<).

For example, units.peasants.goldcost or w/e ;P. From here, fill up a hashtable that can retrieve things based on type ids, like item type id gold cost.

objects.units['hpea'].goldCost
objects.items['orbd'].goldCost

So this would be the objects table, which refers to all objects in object editor, and it would have sub tables like units, items, destructables, doodads, etc... you could also split it up further like-

objects.units.buildings
objects.units.heroes

so that would be a cool way to check if a unit was a hero or a building.

And for destructables-
objects.destructables.trees

etc (not preprocessor definitions)

You should also be able to retrieve gameplay constants.

constants.CORPSE_DECAY

etc (preprocessor definitions)
 
The ability to retrieve object data & gameplay constants is definitely going to be in. As for the c-like stuff, after I write a build for vJass compatibility I could consider writing a C-build. But to make it clear right now, I don't plan taking that route for the primary language. Luck has evolved a lot since I last updated the main post but I have been working on it constantly, by transforming each of my scripts into Luck. I recently got done transforming all of the main object-type API listings in common.j into object-oriented stuff.
 
Yea, that's what he meant, and scratch that idea. Please don't include that in the language.

you should remove bookmarks, textmacros, the idea of the object stuff... just remove tons of this stuff.

Mentioned how it should be done in chat, but yea... the smart way is to provide support so that systems can do this stuff in exactly the same way the language might have done it.


Work at cutting out as much stuff as possible and get this language super simple and super compact. 10000 special rules = a big sloppy mess.

If you look at virtually any language, this is the philosophy they take (unless they were designed by a total noob ^^).

People might think, oh that feature would be soooo cool, but that feature can be more than likely coded as a system, not as part of the language.
 
Level 19
Joined
Oct 15, 2008
Messages
3,231
Is it possible to make a JASS programming software using Notepad too? My friend wants to know if he could use some stuff from JASSHelper as guidelines.
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
You should give us some backward compatibility though :/

Maybe if you can put ALL the old vjass script in a block (//! vjass & //! endvjas)

Already been answered at the first post.

Primary language will be Luck. vJass backwards-compatibility will be added after the initial release. Zinc will not be supported. A c-based build is a possibility but my focus is supporting vJass first.
 
Level 23
Joined
Jan 1, 2009
Messages
1,617
Is it possible to make a JASS programming software using Notepad too? My friend wants to know if he could use some stuff from JASSHelper as guidelines.

Notepad? Do you even know what you are talking about?
Your so called "JASS programming software" isnt the topic here (as far as I get that word).
We discuss about a Compiler.
What that(JassHelper) basicly does is just read some Code and compile it Jass.
You can write ur Scripts in Notepad if you wish, but thats irrelevant ?
And "some stuff from JassHelper" ? I don't think u can cut them apart just like that, and as allready metioned, its written in Delphi, do you even know that language?

Sorry if I interpret that wrong, but I'm really wondering if you even know a single Thing about this stuff.

Oh... sorry for that useless post then :)

Instead of "library requires", could you make it so that we could write: "#include <lib_name>" at any position in the library?

Why would you ever wanna write include elsewhere than at the top?
And seriously, is it such a big deal? Really? And also adds verbosity, whichs removing was the key of luck.(somehow)
 
Status
Not open for further replies.
Top