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)
A bit better error message for wrong typed array index ca37eb28822952a4ab3e58488b710317691d16a9 lep 2018-12-23 12:01:18
Also add git version to release build 2762d5e5f011aff820bbbbe87ae96f84f006c150 lep 2018-12-22 23:54:23
Pass cflags to release build 06b251bf0d4871df3e984aeac3e81e1bd03a5912 lep 2018-12-22 22:59:02
For release build make amalgation 700190b5d66996bdec2a7916faed1f85e799e308 lep 2018-12-22 20:22:06
Power of 2 hashing 065325daf390f5217310cbd5f19989a774af56c0 lep 2018-12-22 19:45:21
Small cleanup 48f7c95157d71e12b4ecea13315b6b4c144fc629 lep 2018-12-09 20:23:53
Increased types hashtable size 8970d5c4bb8f9e4640f4c6a1805cf69369ebaea3 lep 2018-12-07 18:13:17
Fixed some warnings. 334a10dc8faad2fa19eed06834273bff438f3955 lep 2018-11-07 22:45:22
Optimized ht_put by not calling ht_lookup. 4a2c4d293b719c939b4d8f357adcc04ef26b1cbb lep 2018-11-07 20:51:00
Only add globals to uninitialized globals. efb384fb661e08a855a5861189bf9409ebf9f557 lep 2018-11-07 14:56:38
Added unitialized check for globals. d8a909d8ac08cc233f5cd988afac043cbaeb1b4e lep 2018-11-06 19:43:57
Fixed off-by-one error in str_append. b458eb97a71bad87bbbbef610009da40e0dbf855 lep 2018-11-01 12:26:48
Added modulo operator. 70b4c5117a0b84cddd0c35e07a47e3b2aaf847b8 lep 2018-08-09 19:46:14
realloc returns the new pointer... c15eac9a4c2c2531a256125bc70272edbbf1d036 lep 2018-07-24 20:03:41
Track blocks d2763ae8473a1c699aa2e5605922e4b500c83ed4 lep 2018-07-22 13:28:40
Cross compile and strip under FreeBSD 296bd56c1347afb7a20337e02574f9196b48317a lep 2018-07-22 11:55:29
Track opening/closing blocks. 49b23df64b209106cce92e417ee13ecebb0bc009 lep 2018-07-09 09:37:01
Replace strncat with str_append. ad968e040f315ed3cf6580e46587342897839529 lep 2018-03-21 13:53:11
Do not report arrays as uninitialized when the index is missing. 72e93bd234743a438fb0a5c105514bf732c22b89 lep 2017-12-20 14:59:10
Better error messages. ad8342582ac3617280f471d889b1766be272858b lep 2017-11-15 17:52:08
Commit ca37eb28822952a4ab3e58488b710317691d16a9 - A bit better error message for wrong typed array index
It now reports that the expression is used as an
array index and the arrays name.
Author: lep
Author date (UTC): 2018-12-23 12:01
Committer name: lep
Committer date (UTC): 2018-12-23 12:01
Parent(s): 2762d5e5f011aff820bbbbe87ae96f84f006c150
Signer:
Signing key:
Signing status: N
Tree: 8d8e5aa72b58dda984aba517aa17fb44d193ad68
File Lines added Lines deleted
grammar.y 3 4
misc.c 12 0
File grammar.y changed (mode: 100644) (index 6859016..b715c3c)
... ... expr: intexpr { $$.ty = gInteger; }
221 221 | rid LBRACKET expr RBRACKET { | rid LBRACKET expr RBRACKET {
222 222 const struct typeandname *tan = getVariable($1.str); const struct typeandname *tan = getVariable($1.str);
223 223 if (!typeeq(tan->ty, gAny)) { if (!typeeq(tan->ty, gAny)) {
224 checkarrayindex(tan->name, $3.ty, lineno);
224 225 if (!tan->isarray) { if (!tan->isarray) {
225 226 char ebuf[1024]; char ebuf[1024];
226 227 snprintf(ebuf, 1024, "%s not an array", $1.str); snprintf(ebuf, 1024, "%s not an array", $1.str);
227 228 yyerrorex(semanticerror, ebuf); yyerrorex(semanticerror, ebuf);
228 229 } }
229 else {
230 canconvert($3.ty, gInteger, 0);
231 }
232 230 } }
233 231 $$.ty = tan->ty; $$.ty = tan->ty;
234 232 } }
 
... ... statement: newline { $$.ty = gEmpty; }
461 459 } }
462 460 | SET rid LBRACKET expr RBRACKET EQUALS expr newline{ | SET rid LBRACKET expr RBRACKET EQUALS expr newline{
463 461 const struct typeandname *tan = getVariable($2.str); const struct typeandname *tan = getVariable($2.str);
462 char buf[1024];
464 463 $$.ty = gAny; $$.ty = gAny;
465 464 if (tan->ty != gAny) { if (tan->ty != gAny) {
466 canconvert($4.ty, gInteger, -1);
465 checkarrayindex(tan->name, $4.ty, lineno -1);
467 466 if (!tan->isarray) { if (!tan->isarray) {
468 467 char ebuf[1024]; char ebuf[1024];
469 468 snprintf(ebuf, 1024, "%s is not an array", $2.str); snprintf(ebuf, 1024, "%s is not an array", $2.str);
File misc.c changed (mode: 100644) (index 207498c..8deae69)
... ... void checkParameters(const struct funcdecl *fd, const struct paramlist *inp, boo
337 337 fi = fi->next; fi = fi->next;
338 338 } }
339 339 } }
340
341
342 void checkarrayindex(const char *name, const struct typenode *ty, int lineno)
343 {
344 char buf[1024];
345 if(! canconvertbuf(buf, 1024, ty, gInteger)){
346 str_append(buf, " as index for array ", 1024);
347 str_append(buf, name, 1024);
348 yyerrorline(semanticerror, lineno, buf);
349 }
350 }
351
340 352 const struct typenode *binop(const struct typenode *a, const struct typenode *b) const struct typenode *binop(const struct typenode *a, const struct typenode *b)
341 353 { {
342 354 a = getPrimitiveAncestor(a); a = getPrimitiveAncestor(a);
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