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)
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
pjass 10l 0c9161120896904b55b3cdd7b2f7430dd97f82e9 PitzerMike 2009-06-15 21:30:00
Commit dbd5c217795cf5cd014ed7370655e62591d4d0fe - Reverted smth.
Author: lep
Author date (UTC): 2015-02-03 22:12
Committer name: lep
Committer date (UTC): 2015-02-03 22:12
Parent(s): 02d6efe2aed9186b2e6189b36a5fa50d2e0c2221
Signer:
Signing key:
Signing status: N
Tree: 18bbd7424cad4d2ebde3c9845a2e3308296b2b87
File Lines added Lines deleted
grammar.y 4 4
misc.c 5 9
misc.h 1 1
File grammar.y changed (mode: 100644) (index ef9c482..51f20ef)
... ... 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, 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, 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, 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)) {
 
... ... 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, 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 2c63c5b..b88e689)
... ... int editdistance(const char *s, const char *t, int cutoff){
156 156 free(v[i]); free(v[i]);
157 157 return d; return d;
158 158 } }
159 #if 0
159
160 160 void getsuggestions(const char *name, char *buff, int nTables, ...){ void getsuggestions(const char *name, char *buff, int nTables, ...){
161 return;
162 161 int i; int i;
163 162 va_list ap; va_list ap;
164 163
 
... ... void getsuggestions(const char *name, char *buff, int nTables, ...){
171 170 suggestions[i].distance = INT_MAX; suggestions[i].distance = INT_MAX;
172 171 suggestions[i].name = NULL; suggestions[i].name = NULL;
173 172 } }
174 /*
173
175 174 va_start(ap, nTables); va_start(ap, nTables);
176 175 for(i = 0; i != nTables; i++){ for(i = 0; i != nTables; i++){
177 176 struct hashtable *ht = va_arg(ap, struct hashtable*); struct hashtable *ht = va_arg(ap, struct hashtable*);
 
... ... void getsuggestions(const char *name, char *buff, int nTables, ...){
181 180 struct hashnode *hn; struct hashnode *hn;
182 181 hn = ht->h[x]; hn = ht->h[x];
183 182 while (hn) { while (hn) {
184 int dist = 0;//editdistance(hn->name, name, cutoff);
183 int dist = editdistance(hn->name, name, cutoff);
185 184 if(dist <= cutoff){ if(dist <= cutoff){
186 //printf("Possible suggestion for %s: %s\n", name, hn->name);
187
188 185 count++; count++;
189 186 int j; int j;
190 187 for(j = 0; j != 3; j++){ for(j = 0; j != 3; j++){
 
... ... void getsuggestions(const char *name, char *buff, int nTables, ...){
209 206
210 207 } }
211 208 va_end(ap); va_end(ap);
212 */
213 209
214 210 if(count==0) if(count==0)
215 211 return; return;
 
... ... void getsuggestions(const char *name, char *buff, int nTables, ...){
226 222 } }
227 223 } }
228 224 } }
229 #endif
225
230 226
231 227 const struct typeandname *getVariable(const char *varname) const struct typeandname *getVariable(const char *varname)
232 228 { {
 
... ... const struct typeandname *getVariable(const char *varname)
239 235 result = lookup(&globals, varname); result = lookup(&globals, varname);
240 236 if (result) return result; if (result) return result;
241 237 snprintf(ebuf, 1024, "Undeclared variable %s", varname); snprintf(ebuf, 1024, "Undeclared variable %s", varname);
242 //getsuggestions(varname, ebuf, 3, &locals, &params, &globals);
238 getsuggestions(varname, ebuf, 3, &locals, &params, &globals);
243 239 yyerrorline(2, islinebreak ? lineno - 1 : lineno, ebuf); yyerrorline(2, islinebreak ? lineno - 1 : lineno, ebuf);
244 240 // Store it as unidentified variable // Store it as unidentified variable
245 241 put(curtab, varname, newtypeandname(gAny, varname)); put(curtab, varname, newtypeandname(gAny, varname));
File misc.h changed (mode: 100644) (index 306abf4..71dc23c)
... ... 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, ...);
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