src/standard.js=> classes for a standard (non-incremental) packrat parser
src/incremental.js=> additional classes for implementing an incremental parser as described in the paper
src/es5.js=> ES5 grammar, which can be instantiated into either a standard or incremental parser
test/test-es5.js=> contains some basic tests for the ES5 grammar
bench/run-benchmark.js=> Helper script for running the various benchmarks described in Section 4 of the paper ("Evaluation")
bench/benchmark-all.sh=> runs the benchmarks, storing the results into the data files in
memo-viz.html=> the memo table visualization mentioned in Section 3.1 of the paper
A working installation of Node.js v6.1.0 or greater is required. If you already have Node installed, you can check the version by running:
If it is less than v6.1.0, you should install the latest LTS release for your platform, available at https://nodejs.org. Choose the version labeled "Recommended for Most Users".
After installing Node, run the following command in the root dir to install the dependencies:
(This requires internet access.)
- bench/benchmark-all.sh requires a Bash scripting environment (almost any Linux or Mac OS installation should suffice)
- memo-viz.html requires an up-to-date, standards compliant browser, e.g. Chrome 60 or Safari 10.1.1
All commmands listed here should be run in the root of the artifact directory.
To run the tests:
To run the benchmarks described in Section 4 ("Evaluation"):
This will save the results into the files in the bench/results dir.
To see the memo table visualization, open memo-viz.html in a web browser.