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)
Fixed some memory violations. 26a99d799804d8154c4ee1aa0850cdaad909d1ae lep 2015-02-03 23:27:32
Reverted smth. dbd5c217795cf5cd014ed7370655e62591d4d0fe lep 2015-02-03 22:12:49
Changed sprintf to snprintf. 02d6efe2aed9186b2e6189b36a5fa50d2e0c2221 lep 2015-02-03 21:33:05
Wrapped typenode member accesses in getTypePtr. 372c1f9da68a65de9e14dff3881e1758d5e7114b lep 2015-02-03 21:05:11
Added ifdefs for memalign functionality. f005f5e8067994ebd76265e3289e6ab67283b96f lep 2015-02-03 20:06:20
Missing-return check in elseifs should work now. 4274d6166e2c92a4591c1e46a0d71f1579a57c7d lep 2015-02-03 19:35:39
Missing-return checks also checks elseifs. 889122b0fb788663c728127520d0e7124c2a040c lep 2015-02-03 15:18:12
Fixed some more warnings. a5ae36b5299ac419a91592b60b8fcb1dfd8f4374 lep 2015-02-03 13:24:56
Added early exit to editdistance function. 82e8d024392d357d56c833c6b7f7632ffd6830a8 lep 2015-02-02 16:13:40
Unidentified variables are now marked as initialized. f3ef715b90782bc22fbdd29e1c16d7c917f407a9 lep 2015-02-02 13:56:00
Fixed bug in editdistance. a786775b057fc5795db1b2b106b7b9e3c1df6c4c lep 2015-02-02 13:41:15
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
Commit 26a99d799804d8154c4ee1aa0850cdaad909d1ae - Fixed some memory violations.
Author: lep
Author date (UTC): 2015-02-03 23:27
Committer name: lep
Committer date (UTC): 2015-02-03 23:27
Parent(s): dbd5c217795cf5cd014ed7370655e62591d4d0fe
Signer:
Signing key:
Signing status: N
Tree: c41356f7e1197895c872161f7550bf9e1ad7ed41
File Lines added Lines deleted
grammar.y 5 5
misc.c 11 14
misc.h 1 1
File grammar.y changed (mode: 100644) (index 51f20ef..840e539)
... ... expr: intexpr { $$.ty = gInteger; }
199 199 if (fd == NULL) { if (fd == NULL) {
200 200 char ebuf[1024]; char ebuf[1024];
201 201 snprintf(ebuf, 1024, "Undefined function %s", $2.str); snprintf(ebuf, 1024, "Undefined function %s", $2.str);
202 getsuggestions($2.str, ebuf, 1, &functions);
202 getsuggestions($2.str, ebuf, 1024, 1, &functions);
203 203 yyerrorex(3, ebuf); yyerrorex(3, ebuf);
204 204 $$.ty = gCode; $$.ty = gCode;
205 205 } else { } else {
 
... ... funccall: rid LPAREN exprlistcompl RPAREN {
289 289 if (fd == NULL) { if (fd == NULL) {
290 290 char ebuf[1024]; char ebuf[1024];
291 291 snprintf(ebuf, 1024, "Undeclared function %s", $1.str); snprintf(ebuf, 1024, "Undeclared function %s", $1.str);
292 getsuggestions($1.str, ebuf, 1, &functions);
292 getsuggestions($1.str, ebuf, 1024, 1, &functions);
293 293 yyerrorex(3, ebuf); yyerrorex(3, ebuf);
294 294 $$.ty = gAny; $$.ty = gAny;
295 295 } else { } else {
 
... ... funccall: rid LPAREN exprlistcompl RPAREN {
310 310 if (fd == NULL) { if (fd == NULL) {
311 311 char ebuf[1024]; char ebuf[1024];
312 312 snprintf(ebuf, 1024, "Undeclared function %s", $1.str); snprintf(ebuf, 1024, "Undeclared function %s", $1.str);
313 getsuggestions($1.str, ebuf, 1, &functions);
313 getsuggestions($1.str, ebuf, 1024, 1, &functions);
314 314 yyerrorex(3, ebuf); yyerrorex(3, ebuf);
315 315 $$.ty = gAny; $$.ty = gAny;
316 316 } else if (inconstant && !(fd->isconst)) { } else if (inconstant && !(fd->isconst)) {
 
... ... statement: NEWLINE { $$.ty = gNone; }
521 521 } }
522 522 | SET rid LBRACKET expr RBRACKET EQUALS expr NEWLINE{ | SET rid LBRACKET expr RBRACKET EQUALS expr NEWLINE{
523 523 const struct typeandname *tan = getVariable($2.str); const struct typeandname *tan = getVariable($2.str);
524 $$.ty = gNone;
524 525 if (tan->ty != gAny) { if (tan->ty != gAny) {
525 526 canconvert($4.ty, gInteger, -1); canconvert($4.ty, gInteger, -1);
526 $$.ty = gNone;
527 527 if (!tan->isarray) { if (!tan->isarray) {
528 528 char ebuf[1024]; char ebuf[1024];
529 529 snprintf(ebuf, 1024, "%s is not an array", $2.str); snprintf(ebuf, 1024, "%s is not an array", $2.str);
 
... ... type: primtype { $$.ty = $1.ty; }
826 826 if (lookup(&types, $1.str) == NULL) { if (lookup(&types, $1.str) == NULL) {
827 827 char buf[1024]; char buf[1024];
828 828 snprintf(buf, 1024, "Undefined type %s", $1.str); snprintf(buf, 1024, "Undefined type %s", $1.str);
829 getsuggestions($1.str, buf, 1, &types);
829 getsuggestions($1.str, buf, 1024, 1, &types);
830 830 yyerrorex(3, buf); yyerrorex(3, buf);
831 831 $$.ty = gAny; $$.ty = gAny;
832 832 } }
File misc.c changed (mode: 100644) (index b88e689..bbc8363)
... ... int editdistance(const char *s, const char *t, int cutoff){
157 157 return d; return d;
158 158 } }
159 159
160 void getsuggestions(const char *name, char *buff, int nTables, ...){
160 void getsuggestions(const char *name, char *buff, int buffsize, int nTables, ...){
161 161 int i; int i;
162 162 va_list ap; va_list ap;
163 163
 
... ... void getsuggestions(const char *name, char *buff, int nTables, ...){
207 207 } }
208 208 va_end(ap); va_end(ap);
209 209
210 if(count==0)
211 return;
212 else if(count == 1){
213 char hbuff[1024];
210 char hbuff[1024];
211 if(count == 1){
214 212 snprintf(hbuff, 1024, ". Maybe you meant %s", suggestions[0].name); snprintf(hbuff, 1024, ". Maybe you meant %s", suggestions[0].name);
215 strcat(buff, hbuff);
216 }else{
217 strcat(buff, ". Maybe you meant ");
218 for(i=0; suggestions[i].name; i++){
219 strcat(buff, suggestions[i].name);
220 if(i!=2 && suggestions[i+1].name)
221 strcat(buff, ", ");
222 }
213 strncat(buff, hbuff, buffsize);
214 }else if(count == 2){
215 snprintf(hbuff, 1024, ". Maybe you meant %s or %s", suggestions[0].name, suggestions[1].name);
216 strncat(buff, hbuff, buffsize);
217 }else if(count >= 3){
218 snprintf(hbuff, 1024, ". Maybe you meant %s, %s or %s", suggestions[0].name, suggestions[1].name, suggestions[2].name);
219 strncat(buff, hbuff, buffsize);
223 220 } }
224 221 } }
225 222
 
... ... const struct typeandname *getVariable(const char *varname)
235 232 result = lookup(&globals, varname); result = lookup(&globals, varname);
236 233 if (result) return result; if (result) return result;
237 234 snprintf(ebuf, 1024, "Undeclared variable %s", varname); snprintf(ebuf, 1024, "Undeclared variable %s", varname);
238 getsuggestions(varname, ebuf, 3, &locals, &params, &globals);
235 getsuggestions(varname, ebuf, 1024, 3, &locals, &params, &globals);
239 236 yyerrorline(2, islinebreak ? lineno - 1 : lineno, ebuf); yyerrorline(2, islinebreak ? lineno - 1 : lineno, ebuf);
240 237 // Store it as unidentified variable // Store it as unidentified variable
241 238 put(curtab, varname, newtypeandname(gAny, varname)); put(curtab, varname, newtypeandname(gAny, varname));
File misc.h changed (mode: 100644) (index 71dc23c..b2f8834)
... ... struct hashtable {
59 59 struct hashnode *h[BUCKETS]; struct hashnode *h[BUCKETS];
60 60 }; };
61 61
62 void getsuggestions(const char*, char*, int, ...);
62 void getsuggestions(const char*, char*, int, int, ...);
63 63 void *lookup(struct hashtable *h, const char *name); void *lookup(struct hashtable *h, const char *name);
64 64 void put(struct hashtable *h, const char *name, void *val); void put(struct hashtable *h, const char *name, void *val);
65 65 void clear(struct hashtable *h); void clear(struct hashtable *h);
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