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)
Removed strict downcasting check. 5f6ffd725b2ac9d24eff5917d96ceeeaaf748e5f lep 2016-03-03 16:00:49
Added filterreturnsbool check which can be enabled via //# filter 6828cb5e726e7f57cad0ec3f794209c2012c7908 lep 2016-03-03 15:58:59
Moved code into seperate files. 047c531a1c3affb43f53d102c94e765d772ecff3 lep 2016-02-17 20:57:30
Also pack testfiles into the release zip. e2d8ca45c7175b4f0192ddb6202ae71059369495 lep 2016-02-01 15:15:03
Fixed all Warnings. 981e0b8b51eebb4904a42c58c825fa10185f5d23 lep 2016-02-01 15:12:38
Added a test which checks if the utf8-bom can be used as whitespace. cb0ebe275982a65a2ebbd4aca831da4e31739eba lep 2016-01-31 15:04:12
Added utf8 bom as another whitespace token. ea1572ceaa7743fcdff89f206e24540df6358e7b lep 2016-01-31 13:23:27
Added tests to the git repo. 6aca6f760084ee65f8cdd469b18ad5cb37c42ee3 lep 2016-01-17 10:44:56
FreeBsd patches. 6c3acc1dff6ecd5fa486506fabed077be5347afc lep 2016-01-17 10:23:48
Cleaned up string and comment handling in the lexer ebec6e67e248bef82bf92416733b394399c4e1d4 lep 2016-01-17 09:51:44
Added \r, \n (\x10, \x13) as invalid escape characters. 85d0c7e4453c1879bcbc4db8be28527c5ce9f4f7 lep 2016-01-06 13:16:49
Fixed another rare crash. b6edcc3cfd5c1c837318b0efa5ded6f16e86b403 lep 2015-12-21 19:02:41
Fixed various warnings. 6027429ad1895baef4796ac4ae43952ed51f6174 lep 2015-10-28 09:27:40
Added prof target to makefile 9c4b383d3f7416a30a8bde79c735097edaf8d84a lep 2015-10-27 19:14:20
Added gprof support. 374f624967a563dd4c356a3fc104f8ced49fd692 lep 2015-10-27 18:10:13
Changed //! +rb to //# +rb 63af0d3664320cc94ee6e284c308b1983bcfdab2 lep 2015-10-27 17:17:04
Fixed rare segmentation fault. 13a129c8800d306c4117a54cf62cabbb86db3092 lep 2015-10-25 16:11:55
Makefile fixes. 08a5e4d203b0917d78c9fb479ff197d04f473b33 lep 2015-10-25 10:51:12
Makefile improvements (-O3 -flto) 035a361468f060b12bc473e5ec6b0d59db0765d3 lep 2015-10-24 09:16:16
Moved tests into this folder. 099d64a6284a26eafde87ef274c1210455db6f3e lep 2015-10-05 21:29:42
Commit 5f6ffd725b2ac9d24eff5917d96ceeeaaf748e5f - Removed strict downcasting check.
From my tests this seems pointless.
The strict check only checked against types extended from the builtin types
and i couldn't get any function using them working in wc3.
Author: lep
Author date (UTC): 2016-03-03 16:00
Committer name: lep
Committer date (UTC): 2016-03-03 16:00
Parent(s): 6828cb5e726e7f57cad0ec3f794209c2012c7908
Signer:
Signing key:
Signing status: N
Tree: 83986abde797048048bad44322ef831255ac9830
File Lines added Lines deleted
hashtable.c 6 6
misc.c 13 23
File hashtable.c changed (mode: 100644) (index 6fd3bb8..b143313)
... ... void * ht_lookup(struct hashtable *h, const char *name)
82 82
83 83 static void resize(struct hashtable *h) static void resize(struct hashtable *h)
84 84 { {
85 struct hashtable new;
86 ht_init(&new, h->size*2 +1);
85 struct hashtable newht;
86 ht_init(&newht, h->size*2 +1);
87 87 size_t i; size_t i;
88 88 for(i = 0; i != h->size; i++){ for(i = 0; i != h->size; i++){
89 89 if(h->bucket[i].name){ if(h->bucket[i].name){
90 ht_put(&new, h->bucket[i].name, h->bucket[i].val);
90 ht_put(&newht, h->bucket[i].name, h->bucket[i].val);
91 91 } }
92 92 } }
93 93 free(h->bucket); free(h->bucket);
94 h->bucket = new.bucket;
95 h->size = new.size;
96 h->count = new.count;
94 h->bucket = newht.bucket;
95 h->size = newht.size;
96 h->count = newht.count;
97 97 } }
98 98
99 99 bool ht_put(struct hashtable *h, const char *name, void *val) bool ht_put(struct hashtable *h, const char *name, void *val)
File misc.c changed (mode: 100644) (index f4721e4..a12bec6)
... ... const struct typenode *combinetype(const struct typenode *n1, const struct typen
330 330 } }
331 331
332 332 // this is used for reducing expressions in many places (if/exitwhen conditions, assignments etc.) // this is used for reducing expressions in many places (if/exitwhen conditions, assignments etc.)
333 int canconvert(const struct typenode *ufrom, const struct typenode *uto, const int linemod)
333 void canconvert(const struct typenode *ufrom, const struct typenode *uto, const int linemod)
334 334 { {
335 335 const struct typenode *from = ufrom, *to = uto; const struct typenode *from = ufrom, *to = uto;
336 336 char ebuf[1024]; char ebuf[1024];
337 337 if (from == NULL || to == NULL) if (from == NULL || to == NULL)
338 return 0;
338 return;
339 339 if (typeeq(from, gAny) || typeeq(to, gAny)) if (typeeq(from, gAny) || typeeq(to, gAny))
340 return 1;
340 return;
341 341 if (isDerivedFrom(from, to)) if (isDerivedFrom(from, to))
342 return 1;
342 return;
343 343 if (getTypePtr(from)->typename == NULL || getTypePtr(to)->typename == NULL) if (getTypePtr(from)->typename == NULL || getTypePtr(to)->typename == NULL)
344 return 0;
344 return;
345 345 if (typeeq(from, gNone) || typeeq(to, gNone)) if (typeeq(from, gNone) || typeeq(to, gNone))
346 return 0;
346 return;
347 347 from = getPrimitiveAncestor(from); from = getPrimitiveAncestor(from);
348 348 to = getPrimitiveAncestor(to); to = getPrimitiveAncestor(to);
349 349 if (typeeq(from, gNull) && !typeeq(to, gInteger) && !typeeq(to, gReal) && !typeeq(to, gBoolean)) if (typeeq(from, gNull) && !typeeq(to, gInteger) && !typeeq(to, gReal) && !typeeq(to, gBoolean))
350 return 1;
351 if (strict) {
352 if (typeeq(ufrom, gInteger) && (typeeq(to, gReal) || typeeq(to, gInteger)))
353 return 1;
354 if (typeeq(ufrom, to) && (typeeq(ufrom, gBoolean) || typeeq(ufrom, gString) || typeeq(ufrom, gReal) || typeeq(ufrom, gInteger) || typeeq(ufrom, gCode)))
355 return 1;
356 } else {
357 if (typeeq(from, gInteger) && (typeeq(to, gReal) || typeeq(to, gInteger)))
358 return 1;
359 if (typeeq(from, to) && (typeeq(from, gBoolean) || typeeq(from, gString) || typeeq(from, gReal) || typeeq(from, gInteger) || typeeq(from, gCode)))
360 return 1;
361 }
350 return;
351 if (typeeq(from, gInteger) && (typeeq(to, gReal) || typeeq(to, gInteger)))
352 return;
353 if (typeeq(from, to) && (typeeq(from, gBoolean) || typeeq(from, gString) || typeeq(from, gReal) || typeeq(from, gInteger) || typeeq(from, gCode)))
354 return;
362 355
363 356 snprintf(ebuf, 1024, "Cannot convert %s to %s", ufrom->typename, uto->typename); snprintf(ebuf, 1024, "Cannot convert %s to %s", ufrom->typename, uto->typename);
364 357 yyerrorline(3, lineno + linemod, ebuf); yyerrorline(3, lineno + linemod, ebuf);
365 return 0;
358 return;
366 359 } }
367 360
368 361 // this is used for return statements only // this is used for return statements only
 
... ... void canconvertreturn(const struct typenode *ufrom, const struct typenode *uto,
398 391 if ((typeeq(from, gNull)) && (!typeeq(to, gInteger)) && (!typeeq(to, gReal)) && (!typeeq(to, gBoolean))) if ((typeeq(from, gNull)) && (!typeeq(to, gInteger)) && (!typeeq(to, gReal)) && (!typeeq(to, gBoolean)))
399 392 return; // can't return null when it expects integer, real or boolean (added 9.5.2005) return; // can't return null when it expects integer, real or boolean (added 9.5.2005)
400 393
401 if (strict) {
402 if (isDerivedFrom(ufrom, uto))
403 return;
404 } else if (typeeq(ufrom, uto)){
394 if (typeeq(ufrom, uto)){
405 395 return; return;
406 396 } }
407 397
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