pegjs/test
David Majda 5b3321d302 Implement |cache| option for |PEG.buildParser|
This option enables/disables the results cache in generated parsers.
Until now, it was always enabled, but after this commit it needs to be
enabled explicitly (i.e. the |cache| option default value is |false|).
The reason is that parsing without it is *much* faster according to the
benchmark.

Note that disabling the cache breaks the linear parsing time guarantee,
meaning that with some grammars you can get exponential parsing time
with respect to the input length. This, together with the possibility of
improving the cache performance in the future, is the reason to keep it
as an option.

Speed impact
------------
Before:     214.08 kB/s
After:      827.52 kB/s
Difference: 286.54%

Size impact
-----------
Before:     1045396 b
After:      949783 b
Difference: -9.15%

(Measured by /tools/impact with Node.js v0.6.6 on x86_64 GNU/Linux.)
2012-04-17 09:48:29 +02:00
..
vendor/qunit Update bundled QUnit to version 1.5.0 2012-04-16 14:54:34 +02:00
compiler-test.js Implement |cache| option for |PEG.buildParser| 2012-04-17 09:48:29 +02:00
helpers.js Extend QUnit a bit more cleanly 2012-04-16 15:45:50 +02:00
index.html Unify checks and passes 2011-10-03 14:57:09 +02:00
parser-test.js AST: Store rules in an array instead of an object 2012-03-04 17:29:32 +01:00
passes-test.js Fix a bug in param name fixup code for sequences 2012-03-06 08:46:28 +01:00
README Add command-line runner for the test suite 2011-01-25 16:59:32 +01:00
run Simplify the |indent| function in /test/run 2012-04-16 15:29:04 +02:00

PEG.js Test Suite
=================

This is the PEG.js test suite. It ensures PEG.js works correctly. All tests
should always pass on all supported platforms.

Running in a browser
--------------------

  1. Open the index.html file in your browser.

  2. Watch the test pass (or fail).

Running from a command-line
---------------------------

  1. Make sure you have Node.js installed.

  2. Run the following command:

       ./run

  3. Watch the tests pass (or fail).