vrtc / pjass (public) (License: BSD) (since 2023-08-03) (hash sha1)
pjass is a free Jass scripting language parser. This repository is a fork of lep/pjass. The goal is to add Debian packaging. As of the time of this writing, it works for current stable, that is Debian 12 (bookworm).
List of commits:
Subject Hash Author Date (UTC)
Added basic uninitialized variable check for locals. c8222a6f68e44a46624c1f9ee781f590522f45f6 lep 2015-02-02 12:41:25
Added git-versionstring. e13ce6d7d90bccd8e18de6d0b01a18ea4501862b lep 2015-02-01 14:56:01
Removed returnsbool-check for Filter/Condition. e26a973fe1fdc1af999633c8d1f29afcbae76f0b lep 2015-02-01 14:51:47
Fixed some bison warnings. aca6b13e73d95c41787a7a0fdcc33407247be3a8 lep 2015-02-01 14:49:55
Removed multiline comments. e6d3a1bb5099bbf6e3a4ef2501645b15908a1ce8 lep 2015-02-01 14:49:16
Removed unnecessary tokens. 4f37057dfd472c2a400d667a6f7a3762cac01dcd lep 2015-02-01 14:48:14
Comments now work with EOF in addition to newlines at the end. 5363d3ca429da30594f7afb9d351335912b03fbd lep 2015-02-01 14:46:09
pjass 10n 2b2d35bc58dc93bc68014711cda919cecff13b4a lep 2014-10-25 20:38:00
pjass 10m 265bac6343dfeb09e1fc0af5c06571c7dc172455 Deaod 2010-02-15 12:15:00
pjass 10l 0c9161120896904b55b3cdd7b2f7430dd97f82e9 PitzerMike 2009-06-15 21:30:00
pjass 10k 43c1a8a167cdf2982af2c47056beeafcd1840537 Zoxc 2009-04-03 21:23:00
pjass 10j 16bbe625b7670a7affcf495e3370224c30582bca PitzerMike 2007-10-09 09:22:00
pjass 10i 1ecf3d1238619358a0aa9b1b919ed9ba97d36f84 PitzerMike 2007-09-29 11:57:00
pjass 10h dcb319607e8bb35637f86918962610683ada2b08 PitzerMike 2007-09-13 23:49:00
pjass 10g a5070a4d74abc627160481e592233fa26870d57a PitzerMike 2007-08-24 10:43:00
pjass 10f e6893a0480e2b1c9bb22f39a897a86e8d05123a6 PitzerMike 2007-04-28 08:26:00
Fake commit to cleanup the cvs-import of the pjass sourceforge repo. 7f2ea341ebf2ed939f99ec3b14403025446e25f5 lep 2017-01-11 14:07:30
Fixed some errors on Debian and removed some warnings. 28b8a48ff580cb1c06343b4f51194b9a18f0901c cilibrar 2004-08-15 07:15:22
Works under Linux, removed debug messages. 60be798cd6b6e8ad3432feecf3418c7d2662807f cilibrar 2004-08-15 07:10:44
*** empty log message *** e8d4118415a91b81e924c78fc26c9c48eddefd5f cilibrar 2004-08-15 07:07:53
Commit c8222a6f68e44a46624c1f9ee781f590522f45f6 - Added basic uninitialized variable check for locals.
Author: lep
Author date (UTC): 2015-02-02 12:41
Committer name: lep
Committer date (UTC): 2015-02-02 12:41
Parent(s): e13ce6d7d90bccd8e18de6d0b01a18ea4501862b
Signer:
Signing key:
Signing status: N
Tree: bd9684b2e146740b2ce2fa92f5989d9f81f87e9e
File Lines added Lines deleted
grammar.y 14 2
misc.c 3 1
misc.h 2 2
File grammar.y changed (mode: 100644) (index 7bae07f..9173202)
... ... expr: intexpr { $$.ty = gInteger; }
264 264 sprintf(ebuf, "Index missing for array variable %s", $1.str); sprintf(ebuf, "Index missing for array variable %s", $1.str);
265 265 yyerrorex(3, ebuf); yyerrorex(3, ebuf);
266 266 } }
267 if(infunction && lookup(curtab, $1.str) && !lookup(&initialized, $1.str) ){
268 char ebuf[1024];
269 sprintf(ebuf, "Variable %s is uninitialized", $1.str);
270 yyerrorex(3, ebuf);
271 }
267 272 $$.ty = tan->ty; $$.ty = tan->ty;
268 273 } }
269 274 | expr EQUALS expr {yyerrorex(0, "Single = in expression, should probably be =="); checkeqtest($1.ty, $3.ty); $$.ty = gBoolean;} | expr EQUALS expr {yyerrorex(0, "Single = in expression, should probably be =="); checkeqtest($1.ty, $3.ty); $$.ty = gBoolean;}
 
... ... funcdefn: NEWLINE
388 393 ; ;
389 394
390 395 funcdefncore: funcbegin localblock codeblock funcend { if(retval != gNothing) { if ($3.ty == gAny || $3.ty == gNone) yyerrorline(1, lineno - 1, "Missing return"); else if (returnbug) canconvertreturn($3.ty, retval, -1); } } funcdefncore: funcbegin localblock codeblock funcend { if(retval != gNothing) { if ($3.ty == gAny || $3.ty == gNone) yyerrorline(1, lineno - 1, "Missing return"); else if (returnbug) canconvertreturn($3.ty, retval, -1); } }
391 | funcbegin localblock codeblock {yyerrorex(0, "Missing endfunction"); clear(&params); clear(&locals); curtab = &globals;}
396 | funcbegin localblock codeblock {yyerrorex(0, "Missing endfunction"); clear(&params); clear(&locals); clear(&initialized); curtab = &globals;}
392 397 ; ;
393 398
394 funcend: ENDFUNCTION { clear(&params); clear(&locals); curtab = &globals; inblock = 0; inconstant = 0; }
399 funcend: ENDFUNCTION { clear(&params); clear(&locals); clear(&initialized); curtab = &globals; inblock = 0; inconstant = 0; infunction = 0; }
395 400 ; ;
396 401
397 402 returnorreturns: RETURNS returnorreturns: RETURNS
 
... ... funcbegin: FUNCTION rid TAKES optparam_list returnorreturns opttype {
409 414 yyerrorex(3, buf); yyerrorex(3, buf);
410 415 } }
411 416 inconstant = 0; inconstant = 0;
417 infunction = 1;
412 418 curtab = &locals; curtab = &locals;
413 419 $$.fd = newfuncdecl(); $$.fd = newfuncdecl();
414 420 $$.fd->name = strdup($2.str); $$.fd->name = strdup($2.str);
 
... ... statement: NEWLINE {$$.ty = gAny;}
498 504 } }
499 505 if (inconstant) if (inconstant)
500 506 validateGlobalAssignment($2.str); validateGlobalAssignment($2.str);
507 if(!lookup(&initialized, $2.str)){
508 put(&initialized, $2.str, 1);
509 }
501 510 } }
502 511 | SET rid LBRACKET expr RBRACKET EQUALS expr NEWLINE{ | SET rid LBRACKET expr RBRACKET EQUALS expr NEWLINE{
503 512 const struct typeandname *tan = getVariable($2.str); const struct typeandname *tan = getVariable($2.str);
 
... ... vardecl: vartypedecl NEWLINE {
739 748 if (tan->isarray) { if (tan->isarray) {
740 749 yyerrorex(3, "Arrays cannot be directly initialized"); yyerrorex(3, "Arrays cannot be directly initialized");
741 750 } }
751 if(infunction && !lookup(&initialized, tan->name)){
752 put(&initialized, tan->name, 1);
753 }
742 754 canconvert($3.ty, tan->ty, -1); canconvert($3.ty, tan->ty, -1);
743 755 $$.ty = gNothing; $$.ty = gNothing;
744 756 } }
File misc.c changed (mode: 100644) (index 78528ae..0319c74)
... ... int totlines;
24 24 int islinebreak; int islinebreak;
25 25 int isconstant; int isconstant;
26 26 int inconstant; int inconstant;
27 int infunction;
27 28 int inblock; int inblock;
28 29 int strict; int strict;
29 30 int returnbug; int returnbug;
 
... ... int afterendglobals;
33 34 int *showerrorlevel; int *showerrorlevel;
34 35
35 36 int hashfunc(const char *name); int hashfunc(const char *name);
36 struct hashtable functions, globals, locals, params, types;
37 struct hashtable functions, globals, locals, params, types, initialized;
37 38 struct hashtable *curtab; struct hashtable *curtab;
38 39 struct typenode *retval, *retcheck; struct typenode *retval, *retcheck;
39 40 char *curfile; char *curfile;
 
... ... void init(int argc, char **argv)
70 71 inblock = 0; inblock = 0;
71 72 isconstant = 0; isconstant = 0;
72 73 inconstant = 0; inconstant = 0;
74 infunction = 0;
73 75 fFilter = fCondition = fCurrent = 0; fFilter = fCondition = fCurrent = 0;
74 76 showerrorlevel = malloc(ERRORLEVELNUM*sizeof(int)); showerrorlevel = malloc(ERRORLEVELNUM*sizeof(int));
75 77 for(i=0;i<ERRORLEVELNUM;i++) for(i=0;i<ERRORLEVELNUM;i++)
File misc.h changed (mode: 100644) (index 041ce5a..93bcd8f)
... ... void checkParameters(const struct paramlist *func, const struct paramlist *inp,
83 83 void validateGlobalAssignment(const char *varname); void validateGlobalAssignment(const char *varname);
84 84 void checkcomparisonsimple(const struct typenode *a); void checkcomparisonsimple(const struct typenode *a);
85 85
86 extern int fno, lineno, totlines, islinebreak, isconstant, inblock, inconstant;
86 extern int fno, lineno, totlines, islinebreak, isconstant, inblock, inconstant, infunction;
87 87 extern int haderrors; extern int haderrors;
88 88 extern int ignorederrors; extern int ignorederrors;
89 89 extern int didparse; extern int didparse;
 
... ... extern int afterendglobals;
94 94 extern char *yytext, *curfile; extern char *yytext, *curfile;
95 95 extern int yydebug; extern int yydebug;
96 96 int *showerrorlevel; int *showerrorlevel;
97 extern struct hashtable functions, globals, locals, params, types, *curtab;
97 extern struct hashtable functions, globals, locals, params, types, initialized, *curtab;
98 98 extern struct typenode *gInteger, *gReal, *gBoolean, *gString, *gCode, *gHandle, *gNothing, *gNull, *gAny, *gNone, *gCodeReturnsBoolean, *gCodeReturnsNoBoolean; extern struct typenode *gInteger, *gReal, *gBoolean, *gString, *gCode, *gHandle, *gNothing, *gNull, *gAny, *gNone, *gCodeReturnsBoolean, *gCodeReturnsNoBoolean;
99 99 extern struct funcdecl *fFilter, *fCondition, *fCurrent; extern struct funcdecl *fFilter, *fCondition, *fCurrent;
100 100 extern struct typenode *retval; extern struct typenode *retval;
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/vrtc/pjass

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/vrtc/pjass

Clone this repository using git:
git clone git://git.rocketgit.com/user/vrtc/pjass

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main