/readme.md (0d3a55aa2bd7911e71390008b7723399c094eba1) (3680 bytes) (mode 100644) (type blob)
# pjass
A lightweight and fast Jass2 parser for bison/yacc
Original by Rudi Cilibrasi
And improved by many others
This repo now maintained by lep
# Usage
To use this program, list the files you would like to parse in order.
If you would like to parse from standard input (the keyboard), then
use `-` as an argument. If you supply no arguments to pjass, it will
parse the console standard input by default.
To test this program:
```
$ pjass common.j common.ai Blizzard.j
```
## Installation for JNGP
If you are using pjass via JNGP replace the `pjass.exe` in `JNGP/jasshelper/`
with the updated one.
## Installation for bundled JassHelper for Patches 1.31+
Blizzard ships their own pjass signed by them so you can't just replace the
.exe-file. But you can still use the new pjass by using `jasshelper.conf`
like this:
[jasscompiler]
"pjass-fresh.exe"
"$COMMONJ $BLIZZARDJ $WAR3MAPJ"
`pjass-fresh.exe` is of course the newly downloaded pjass executable (just put
it next to the original pjass.exe).
## Command line arguments
pjass provides a bunch of command line flags to customize and turn on specific
checks. pjass provides a special system to easily enable and disable features
for specific files. Say you want to enable the "returnbug" but only for
`Blizzard.j`, here is how you would do that:
$ pjass common.j +rb Blizzard.j -rb war3map.j
So any `+`-flag enables the flag until the next `-`-flag. If you want to have
flag on for all your files just put before any file arguments.
$ pjass +checkstringhash common.j Blizzard.j war3map.j
You can also (de)activate the flags on a per function base directly in your
.j-file like this:
//# +rb
function H2I takes handle h returns integer
return h
return 0
endfunction
Here is a table of all currently supported flags.
All of these options are **off** by default.
Flag | Description
--------------------|-------------------
`rb` | When enabled pjass allows the old returnbug usage.
`filter` | When enabled pjass checks for functions in `Filter` or `Condition` to return boolean.
`shadow` | When enabled this checks if a local variable name is same as a previously defined global variable name.
`checkglobalsinit` | When enabled pjass checks for potentially usage of uninitialized global variables.
`checkstringhash` | When enabled pjass checks for calls to `StringHash` and reports when two different strings hash to the same integer.
`noruntimeerror` | When enabled pjass ignores all runtime errors. Runtime errors are wrong usage of specific natives for example.
`nosemanticerror` | When enabled pjass ignores all semantic errors. This is/was used to be able to check the memhack scripts.
`nosyntaxerror` | When enabled pjass ignores all syntax errors.
# Building
This uses flex and bison (atleast version 3.0), so install them first.
Then just run GNUMake (e.g. `make` or `gmake`).
You can also run `make help` to get a bunch of options but the other most
important make-target is probably `test` which builds pjass and runs all
supplied tests in `tests/`.
# History
In this repo i tried to capture the whole history of pjass.
For this i imported the cvs repo from sourceforge and went through the
pjass-thread on wc3c. On top of that i added my own modifications.
This probably isn't the real history as for one some attachments on wc3c
were faulty but i guess it's as good as it can get.
# Links
You can find news about this program and updates at
http://hiveworkshop.com/threads/pjass-updates.258738/ and
http://www.wc3c.net/showthread.php?t=75239 and
http://jass.sourceforge.net
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
170 |
28f83f8deb57bbc09c713a866975355fd9225827 |
.gitignore |
100644 |
blob |
48 |
3bfb16e6c32903fb8e4db429b412ee6e8ef23a14 |
AUTHORS |
100644 |
blob |
3557 |
a62ad00cdae7cd8a72c80d1d6ce2796e53b6d58c |
GNUmakefile |
100644 |
blob |
1313 |
4dc80d23e5c4804173171f9e03724a7d9fff66a1 |
LICENSE |
100644 |
blob |
1431 |
176e50b9b24ded89c009136a2386586cacd5fcd2 |
blocks.c |
100644 |
blob |
282 |
7e063255643b647d598dadd7832458b24af8999d |
blocks.h |
100755 |
blob |
428 |
cc6218cbb759cfd1deef9a20b246b8ed7697bd02 |
check.sh |
100755 |
blob |
273 |
b0e5e8c7418adb04f6a7d76e9c011b4ba4ef3092 |
fail.sh |
100644 |
blob |
266 |
88a7c9f4c9cfca968c1b863d4fd49131b5c2e175 |
funcdecl.c |
100644 |
blob |
276 |
f409be6b975f0a454de860058f1bf91849f1de96 |
funcdecl.h |
100644 |
blob |
22316 |
d468d760ea15a1302b551138f6f2e51bed797982 |
grammar.y |
100644 |
blob |
1684 |
3f87f5c4542560d5ded7bd36438657a5869771ca |
hashtable.c |
100644 |
blob |
501 |
2185dc1cb949f6fa3a1b0985b4caaf7769456156 |
hashtable.h |
100644 |
blob |
6470 |
e50f3c6407908ffbd851b8de72229baf649c3e64 |
main.c |
100644 |
blob |
24837 |
9de9d46a2eb5f8cc19b170d035009e064f9c1ca3 |
misc.c |
100644 |
blob |
4680 |
d0822164a1e66dfe614ebbfa8cb24bd904d4fe00 |
misc.h |
100644 |
blob |
330 |
92a4597d6df5097c58649391541d54f06b3bda1b |
paramlist.c |
100644 |
blob |
256 |
bb253362ef26a0ea881856aebeb8503fb82646fb |
paramlist.h |
100644 |
blob |
3680 |
0d3a55aa2bd7911e71390008b7723399c094eba1 |
readme.md |
100644 |
blob |
2419 |
2da92786104975ea22a86ebfa36e70351bd5503f |
sstrhash.c |
100644 |
blob |
142 |
554d4f7e4b94fb54dc58105adfc9cb4afac6887a |
sstrhash.h |
040000 |
tree |
- |
353c2b19d039ebd6ba45c6cfa887ee3975b60ace |
tests |
100644 |
blob |
6881 |
5b807517d3865b302cbde97aa949347c60a27a1d |
token.l |
100644 |
blob |
1286 |
ed7861c89f7b0a4a9654a970335e1dd4968c29ab |
tree.c |
100644 |
blob |
356 |
d943f2d407216cea33c9931439d6802af7d08ce6 |
tree.h |
100644 |
blob |
2502 |
fee7aee3384745b8f13f8b98870814cc109981b6 |
typeandname.c |
100644 |
blob |
914 |
c7c2ecbf5459c7cb80bd2661e6ca78c32a780e10 |
typeandname.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