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)
Report natives after function defintions eb58451c6e2df142a51e85e68ee11efa45c3215c lep 2019-04-01 12:49:24
Support Apple by defining _aligned_malloc 596488eafa1e09c1120d2488c78959a8c63c5a5d Jesse Rogers 2019-01-03 17:08:49
Improved the amalgation build 4be0d720517e70920c7b716f95babc63df1f4ffa lep 2018-12-31 14:50:05
Added missing new tests c5c6dab555bec81e6a7b419ea88d195836b3762f lep 2018-12-30 18:40:02
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
Commit eb58451c6e2df142a51e85e68ee11efa45c3215c - Report natives after function defintions
Author: lep
Author date (UTC): 2019-04-01 12:49
Committer name: lep
Committer date (UTC): 2019-04-01 12:49
Parent(s): 842f3ed86df730a08478ca155657c67f03689517
Signer:
Signing key:
Signing status: N
Tree: 380b5b2cc313b20971c15c7421727e797a5a99cb
File Lines added Lines deleted
grammar.y 5 0
main.c 1 0
misc.c 1 0
misc.h 1 0
tests/should-check/constant-function.j 3 0
tests/should-fail/native-after-function.j 2 5
File grammar.y changed (mode: 100644) (index 56d67f5..42893b0)
... ... nativefuncdecl: NATIVE rid TAKES optparam_list RETURNS opttype
327 327 snprintf(buf, 1024, "%s already defined as type", $2.str); snprintf(buf, 1024, "%s already defined as type", $2.str);
328 328 yyerrorex(semanticerror, buf); yyerrorex(semanticerror, buf);
329 329 } }
330 if(encoutered_first_function){
331 yyerrorex(semanticerror, "Native declared after functions");
332 }
330 333 $$.fd = newfuncdecl(); $$.fd = newfuncdecl();
331 334 $$.fd->name = strdup($2.str); $$.fd->name = strdup($2.str);
332 335 $$.fd->p = $4.pl; $$.fd->p = $4.pl;
 
... ... returnorreturns: RETURNS
395 398 funcbegin: FUNCTION rid TAKES optparam_list returnorreturns opttype { funcbegin: FUNCTION rid TAKES optparam_list returnorreturns opttype {
396 399 inconstant = 0; inconstant = 0;
397 400 infunction = 1; infunction = 1;
401 encoutered_first_function = 1;
398 402 $$ = checkfunctionheader($2.str, $4.pl, $6.ty); $$ = checkfunctionheader($2.str, $4.pl, $6.ty);
399 403 $$.fd->isconst = 0; $$.fd->isconst = 0;
400 404 block_push(lineno, Function); block_push(lineno, Function);
 
... ... funcbegin: FUNCTION rid TAKES optparam_list returnorreturns opttype {
402 406 | CONSTANT FUNCTION rid TAKES optparam_list returnorreturns opttype { | CONSTANT FUNCTION rid TAKES optparam_list returnorreturns opttype {
403 407 inconstant = 1; inconstant = 1;
404 408 infunction = 1; infunction = 1;
409 encoutered_first_function = 1;
405 410 $$ = checkfunctionheader($3.str, $5.pl, $7.ty); $$ = checkfunctionheader($3.str, $5.pl, $7.ty);
406 411 $$.fd->isconst = 1; $$.fd->isconst = 1;
407 412 block_push(lineno, Function); block_push(lineno, Function);
File main.c changed (mode: 100644) (index c05ae19..e717622)
... ... static void dofile(FILE *fp, const char *name)
92 92 inconstant = false; inconstant = false;
93 93 inblock = false; inblock = false;
94 94 afterendglobals = false; afterendglobals = false;
95 encoutered_first_function = false;
95 96 inglobals = false; inglobals = false;
96 97 int olderrs = haderrors; int olderrs = haderrors;
97 98 yy_switch_to_buffer(yy_create_buffer(fp, BUFSIZE)); yy_switch_to_buffer(yy_create_buffer(fp, BUFSIZE));
File misc.c changed (mode: 100644) (index 8deae69..25c570a)
... ... int didparse;
30 30 int inloop; int inloop;
31 31 bool afterendglobals; bool afterendglobals;
32 32 bool inglobals; bool inglobals;
33 bool encoutered_first_function;
33 34 int *showerrorlevel; int *showerrorlevel;
34 35
35 36 struct hashtable functions; struct hashtable functions;
File misc.h changed (mode: 100644) (index f9a7cae..3a204a6)
... ... extern int fnannotations;
107 107 extern int annotations; extern int annotations;
108 108 extern bool afterendglobals; extern bool afterendglobals;
109 109 extern bool inglobals; extern bool inglobals;
110 extern bool encoutered_first_function;
110 111 extern int *showerrorlevel; extern int *showerrorlevel;
111 112 extern char *yytext; extern char *yytext;
112 113 extern const char *curfile; extern const char *curfile;
File tests/should-check/constant-function.j added (mode: 100644) (index 0000000..85e85c5)
1 constant function foo takes nothing returns integer
2 return 3
3 endfunction
File tests/should-fail/native-after-function.j copied from file tests/should-check/shadowing-1.j (similarity 51%) (mode: 100644) (index 1a8e2b5..9d0cb47)
1 globals
2 integer i
3 endglobals
4
5 1 function foo takes nothing returns nothing function foo takes nothing returns nothing
6 local integer i
7 2 endfunction endfunction
3
4 native bar takes nothing returns nothing
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