| 12-25-2002, 04:42 AM | #1 |
FYI. I started working on a simple module for checking the syntax of JASS scripts (for fun :)) over the week end. Right now it can only check that syntax is correct (if there are any other Comp Sci majors here, that is, it doesn't do any semantic analysis yet; I.E., it makes sure your script doesn't have any misplaced keywords and can be parsed but doesn't check if you have undeclared variables/type-mismatches and stuff yet), but that's because this is only 3 days work. This is pretty trivial (for me at least ;)), I just wanted to play with it since I know something like this would have benefitted me when I did a couple melee AIs over the summer. Anyway, a demo of the alpha is here: http://jass.sourceforge.net (Feel free to report crashes and bad bugs, but don't expect it to catch all the errors in your scripts yet) Anyway, the goal is to create a simple library/module which can be used in other programs (like a GUI script editor) easily. It is written in Java (for now) but there are a dozen and a half ways to create bindings for other languages (I'm leaning toward just using an RPC-like interface). No promises since I have more important commitments (even during the holiday break; have to hit the slopes for at least a couple days :)), but it will remain open source. Anyway, hopefully this (eventually) is useful to some people. magnus |
| 12-25-2002, 09:46 AM | #2 |
Great, that is something I missed when writing AIs and didn't have the time to do myself. I will try it out ASAP. |
| 12-28-2002, 08:12 AM | #3 |
FYI again. A complete demo is available. It should be able to catch all script errors now (baring bugs of course :)). The pre-alpha is open, so anyone can go ahead and try using it while scripting. And then report bugs to me. :) magnus |
| 12-28-2002, 05:01 PM | #4 |
Awesome Dude, I was working on an editor, and I didn't have the time to include a Script Checker. Man, with JonahDean's AI GUI, your Checker, and my Script Editor, we can make AI easier. I am curious are you planning on integrating this Script Editor into a editor. This would be cool. Also what did you make it in? Awesome to have you in the community. DKSlayer I will test it when I get some time and offer any ideas I have. Once again Major Kudos. *EDIT*I just downloaded it, and found out I need to download the Java runtime files. I'll get them soon but as for now. Curious it what does it check as for the functions. I mean like if the common.j updates are you going to have to update the software or does it parse common.j and would not need to updated. Just curious. Can't wait to test it. Thanks DKSlayer *EDIT* |
| 12-28-2002, 10:56 PM | #5 |
Nice to see it will be useful to people. I just did it for fun. :) (1) I don't really plan to integrate it into an editor. I will probably export some API (bindings in Java and C++, etc.) so that others can integrate it into their own. But that's further down the road. (2) The parser is vanilla and does not contain any hardcoded things besides native types (like 'integer', 'handle', 'string', etc.). Right now it loads common.j and common.ai at startup so Blizzard's funtions that are automatically "included" in AIs are available. It could also make it include Blizzard.j so it can check triggers too, or whatever includes might be added later. The parser only needs to be changed if Blizzard modifies the JASS language. magnus |
| 12-29-2002, 01:57 AM | #6 |
Guest | This tool has been really helpful in helping me debug the AI script builder i've been working on. I use it to make sure the scripts my program builds actually work... hehe Nice work! :D |
| 12-29-2002, 08:06 PM | #7 |
Sweet that would be cool as a module. Then I could add it to the editor I am working on, MAJOR credit to you of course. Also about how it works sweet. You did it real nice. MAjor KUDos. Well I wish you luck in your work on it. Thanks DKSlayer |
| 12-29-2002, 08:32 PM | #8 |
It works really good. Did you use a parser generator or is it hand written ? Is it a top down or a bottom up parser? |
| 12-29-2002, 11:26 PM | #9 |
I used a generator (JLex/CUP; basically lex and yacc for Java). Its been two years since I've taken a compilers course so I don't quite remember the terminology -- I'm pretty sure it generates LR(k) parsers (stack based with k tokens of lookahead). It isn't a recursive decent parser... but now that I think about it, you could probably make one with JASS because there are very few ambigiuties (usually its the if-else if-else that gets you, but JASS has a separate elseif token for 'else if'). That would probably be faster, but it would be more work. The interactive parser can already preload and "remember" parsed files, and I was going to make something like precompiled headers (just spit out the compiled abstract syntax tree after parsing), so speed isn't really an issue anyway. magnus |
| 01-11-2003, 03:29 AM | #10 |
FYI. I uploaded a new version that fixes some script errors that weren't caught before (mostly esoteric stuff like wierd custom type declarations), and updated the GUI so it can be used to check map trigger scripts and custom common.ai/Blizzard.j scripts as well. http://jass.sourceforge.net/download.shtml magnus |
| 01-12-2003, 09:30 PM | #11 |
The Alpha3 win32 version I downloaded does seem to need some Borland files unlike the previous version. I did have these on my hard disk but most probably won't. They are also pretty large. Maybe you can compile those into the exe (probably you did that in the previous version). Great work on the script checker. Your JASS manual is very nice. One thing though: Although it is called the command queue by Blizzard, it is unfortunally a stack. Found that out the hard way. |
| 01-13-2003, 01:54 AM | #12 |
Whoops. Checking the release flag somehow removed the static library from the binary. Should be fixed now. Maybe you can tell Skull to update the file in the download section here? Thanks for the heads up on the command stack. I hadn't tried with more than one element. :) This is unrelated, but how useful would a data-structure library be? I have working JASS code for things like linked lists (well, same interfaced, but faked with arrays); the main problem is that because there are no first class pointers in JASS, the only "nice" way to use them is to have one set of accessor functions for each instance of the data-structure. This isn't too bad since I can make a preprocessor to expand macros automatically, but it could cause scripts to balloon in size. :\ magnus |
| 01-15-2003, 11:45 AM | #13 |
Last FYI about a new version on this thread.* I set up a mailing list if anyone wants to receive future notifications. Only semi-significant thing added was a text area (& associated stuff) to the GUI so you can enter in JASS directly to check. I found this useful for copy/pasting custom text triggers since World Edit's syntax error messages are confusing sometimes. http://jass.sourceforge.net/download.shtml I also added two subsections in the manual about enumerations and filters. No biggy. magnus * new releases will probably slow down from now on anyway since my research commitments are starting up again. (Mainly just bugs from now on; then I'll bump it up to beta and compile it to a DLL for others to use) Every 5 days was probably overkill anyway, but I belive in the open source adage, release early, release often (expecially when the target audience is developers who are usually a cranky lot ;). |
