|
|
#1 |
|
Alcopops
Tools & Tutorials Moderator
|
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. Last edited by PitzerMike : 10-09-2007 at 10:25 AM. |
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#2 |
|
Alcopops
Tools & Tutorials Moderator
|
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. |
|
|
|
|
|
#3 |
|
User
Join Date: Jan 2004
Posts: 388
![]() ![]() ![]()
|
Excellent work.
__________________Worked flawlessly on my map script as far as I can tell. |
|
|
|
|
|
#4 |
|
Free Software Terrorist
Technical Director
|
what? you got ftp to work?
__________________ |
|
|
|
|
|
#5 |
|
.
Respected User
|
Yes, FTP started working again today.
__________________ |
|
|
|
|
|
#6 |
|
Moderator
Code Moderator
Join Date: Feb 2006
Posts: 1,405
![]() ![]() ![]()
|
Bison... *shudder*
Thanks for maintaining this tool! gg no re, headaches ![]() |
|
|
|
|
|
#7 |
|
User
|
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) |
|
|
|
|
|
#8 | |
|
Alcopops
Tools & Tutorials Moderator
|
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. |
|
|
|
|
|
|
#9 |
|
Moderator
Code Moderator
Join Date: Feb 2006
Posts: 1,405
![]() ![]() ![]()
|
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 |
|
|
|
|
|
#10 |
|
.
Respected User
|
I said this before, but just to annoy you..
__________________ JASS:local integer i = i + 1 Does not give an error in PJASS. |
|
|
|
|
|
#11 |
|
Alcopops
Tools & Tutorials Moderator
|
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. |
|
|
|
|
|
#12 |
|
STARCRAFT II OMFG
|
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 |
|
|
|
|
|
#13 |
|
Alcopops
Tools & Tutorials Moderator
|
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. |
|
|
|
|
|
#14 |
|
Great Sage
Project Leader: AMAI
Join Date: Jun 2003
Posts: 687
![]() ![]()
|
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. Last edited by Strategy Master : 06-04-2006 at 02:54 PM. |
|
|
|
|
|
#15 |
|
Moderator
Code Moderator
Join Date: Feb 2006
Posts: 1,405
![]() ![]() ![]()
|
.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. Last edited by PipeDream : 06-09-2006 at 04:46 AM. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |