| 05-21-2005, 12:21 AM | #1 |
Well, as I'm now maintaining pjass, I decided to make the source code available to anyone who is willing to play around with it and maybe improve it. The source is available here. Also I've compiled a new version recently that fixes a bunch of smaller issues that had been reported. The latest compile will always be available at http://www.wc3campaigns.net/attachme...4&d=1191925244 (1.0j, latest version) http://www.wc3campaigns.net/attachme...7&d=1191070580 (1.0i) http://www.wc3campaigns.net/attachme...0&d=1189730741 (1.0h) http://www.wc3campaigns.net/tools/weu/pjass_10f.rar http://www.wc3campaigns.net/tools/weu/pjass_10e.rar http://www.wc3campaigns.net/tools/weu/pjass_099.rar http://www.wc3campaigns.net/tools/weu/pjass_098.rar http://www.wc3campaigns.net/tools/weu/pjass_097.zip http://www.wc3campaigns.net/tools/weu/pjass_095.zip If you find a new bug, feel free to report it in this thread, I'll then update pjass asap. |
| 04-03-2006, 06:23 PM | #2 |
I've updated pjass today, tool makers and users make sure you're updating your pjass version. (download link in the first post) Update to version 0.97 includes: * Fixed rules for id integer literals to allow special characters (eg. ' ', '$abc' ...), but only 1 or 4 characters in length are allowed. (reported by karukef) * Fixed a flaw that allowed array variables to be used without brackets (eg. local integer array arr = 2). (reported by RodOfNOD and Blade.dk) * Hack-Fixed an error where a constant function defined directly after the globals section would be confused with a native declaration. (known error) * Smaller file size and added version information This is the first compressed pjass release. So please report if it works for all of you without any flaws. |
| 04-03-2006, 06:27 PM | #3 |
Excellent work. Worked flawlessly on my map script as far as I can tell. |
| 04-03-2006, 07:13 PM | #4 |
what? you got ftp to work? |
| 04-03-2006, 07:33 PM | #5 |
Yes, FTP started working again today. |
| 04-03-2006, 10:43 PM | #6 |
Bison... *shudder* Thanks for maintaining this tool! gg no re, headaches ![]() |
| 04-07-2006, 11:10 AM | #7 |
Very nice tool, could definantly go with a UI though, as line-by-line only goes so far :P. I was suprised at how accurately this caught my errors, the parser is definantly grade A .Only one thing, your source is unreadable in notepad -,-. Not sure why, but it comes out as a block of code, almost like notepad just spikes all thoes '\n' characters :P. Well, looks like I'll be using microsoft word to poke around your code :P. (Thanks for realising the source by the way, I always wanted to know how theyse worked) |
| 04-18-2006, 07:15 PM | #8 | |
Quote:
Well, the missing linebreaks are just the difference between DOS and Windows encoding. If you get a decent text editor like UltraEdit it will automatically display it correctly. Check out the Notes.txt file that I've added, in cause you want to play with the source code. |
| 06-02-2006, 07:00 AM | #9 |
Two things in 0.97 PJASS -v reports version 0.93 (downloaded again just to be sure) Local variables that take the same name as functions is not flagged as an error by PJASS. Problem code: JASS:function Plus takes integer x, integer y returns integer //call BJDebugMsg(I2S(x)+" + "+I2S(y)) return x + y endfunction //<snip> function AddY takes integer y returns location local location Sx = MakePair_RI(S(),XSYM()) local location Ny = MakePair_RI(N(),y) local location arglist = MakePair_OO(Sx,MakePair_OO(Ny,null)) local location Plus = MakePair_OO(MakePair_RI(N(),ID_PLUS()),null) local location L3 = MakePair_OO(Plus,arglist) return MakePair_OO(MakePair_RO(C(),L3),null) endfunction |
| 06-02-2006, 11:26 AM | #10 |
I said this before, but just to annoy you.. JASS:local integer i = i + 1 Does not give an error in PJASS. |
| 06-02-2006, 10:14 PM | #11 |
Fixed, fixed and fixed. There were serious problems in the symbol lookups. That was pretty tough but they should now all be gone. Get version 0.98 via the link in my first post. |
| 06-02-2006, 10:31 PM | #12 |
This is for version 0.98: JASS:function AsciiCharToInteger_sub takes string u returns integer local string charMap = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" local string c local integer i = 0 if (u == "\b") then // Backspace? return 8 elseif u == "\t" then // Horizontal Tab? return 9 elseif u == "\n" then // Newline return 10 elseif u == "\f" then // <<-- PJASS flags as syntax error return 12 elseif u == "\r" then // Carriage return return 13 endif loop set c = SubString(charMap, i, i + 1) exitwhen c == "" if c == u then return i + 32 endif set i = i + 1 endloop return 0 endfunction |
| 06-02-2006, 10:59 PM | #13 |
Ok, fixed :) I've not incremented the version number this time, considering 0.98 has only been online for a few minutes. Whoever got it before this post should redownload it though. |
| 06-04-2006, 02:49 PM | #14 |
Hey I tried your new version for AMAI and came accross a possible problem. 2 racial scripts brought up a "use of variable before its declaration issue". JASS:function guardBuild takes nothing returns nothing local integer cc_guard = 0 set cc_guard = TownCount(ZIGGURAT_2) if cc_guard >= bn_guard then set strategy = chosen_strategy else call BuildUnit( bn_guard, ZIGGURAT_2, 90 ) endif endfunction function cmdBuild takes nothing returns nothing if false then elseif strategy == 50 then call airairBuild() elseif strategy == 51 then call airgroundBuild() elseif strategy == 52 then call groundairBuild() elseif strategy == 53 then call groundgroundBuild() elseif strategy == 54 then call farmBuild() elseif strategy == 55 then call guardBuild() endif endfunction In the human script error occured in the first function for chosen_strategy variable. In undead it was for the strategy variable in cmdBuild. It had no effect on Orc and Nightelf even though sections are exactly the same. Being the scripts are made generically a problem in one script should also happen in the other. Unfortunatly it might not be easy to find the problem due to the amount of code we are talking about and the problem may not actually be in these sections highlighted, but just so you are aware there is a problem somewhere. EDIT: These errors don't occur using the compile/optimize command of AMAI developer and of course the older pjass thats included with it. |
| 06-09-2006, 03:06 AM | #15 |
.98 minor bug: Variable declaration line numbers are used between files. I like to stash globals in a header file. If I use a global in the source file with same line number or smaller as its declaration has in the header file, it complains "Use of variable udg_gc_fake_heap before its declaration" edit: Still just as minor, but seems to be a little more bizarre- the first use of a global variable must be above the first declared global. |
