You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5a4d04fa90
Until now, expectations were constructed using object literals. This commit changes the construction to use factory functions. This change makes generated parsers slightly smaller because property names don't have to be repeated many times and factory function calls are more amenable to minifying. Some numbers based on the aggregate size of parsers generated from examples/*.pegjs: Optimization Minified? Size before Size after Saving ------------------------------------------------------------ speed no 719066 716063 0.42% speed yes 188998 180202 4.65% size no 194810 197813 1.52% size yes 108782 99947 8.12% (Minification was done using "uglify --mangle --compress" with uglify-js 2.4.24.) |
9 years ago | |
---|---|---|
.. | ||
api | 9 years ago | |
behavior | 9 years ago | |
unit | 9 years ago | |
vendor/jasmine | 11 years ago | |
.eslintrc.json | 9 years ago | |
README.md | 9 years ago | |
helpers.js | 9 years ago | |
index.html | 9 years ago |
README.md
PEG.js Spec Suite
This is the PEG.js spec suite. It ensures PEG.js works correctly. All specs should always pass on all supported platforms.
Running in Node.js
All commands in the following steps need to be executed in PEG.js root directory (one level up from this one).
-
Install all PEG.js dependencies, including development ones:
$ npm install
-
Execute the spec suite:
$ make spec
-
Watch the specs pass (or fail).
Running in the Browser
All commands in the following steps need to be executed in PEG.js root directory (one level up from this one).
-
Make sure you have Node.js installed.
-
Install all PEG.js dependencies, including development ones:
$ npm install
-
Build browser version of PEG.js:
$ make browser
-
Serve PEG.js root directory using a web server:
$ node_modules/.bin/http-server
-
Point your browser to the spec suite.
-
Watch the specs pass (or fail).