pegjs/test
David Majda efc38eef9b Consolidate all variable name computations into one compiler pass
Before this change, knowledge about variable names was spread between
the |computeStackDepths| pass and the code emitter code. For example,
the fact that the |&...| expression needs one variable to store a
position was represented in both places.

This changes consolidates that knowledge and introduces a new
|computeVarNames| pass. This pass replaces old |computeStackDepths|
pass, does all computations realted to variable names and stores the
results in the AST. Note that some knowledge about variables
(inevitably) remained in emitter code templates.

Beside DRYing things up, this change simplifies the emitter
significantly. By storing variable names in the AST it also allows
introduction of a pass that will identify parameters passed to actions
using proper symbol tables. Right now, this is done in a hackish way
directly in the emitter, which won't work well with changes planned in
GH-69.
2012-02-27 20:10:25 +01:00
..
vendor/qunit Upgrade QUnit to the current master 2011-09-13 11:37:22 +02:00
compiler-test.js Add |expected| and |found| properties to exceptions thrown by parsers 2012-02-12 12:28:59 +01:00
helpers.js Add |expected| and |found| properties to exceptions thrown by parsers 2012-02-12 12:28:59 +01:00
index.html Unify checks and passes 2011-10-03 14:57:09 +02:00
parser-test.js Fix string parsing tests 2011-09-30 16:49:50 +02:00
passes-test.js Consolidate all variable name computations into one compiler pass 2012-02-27 20:10:25 +01:00
README Add command-line runner for the test suite 2011-01-25 16:59:32 +01:00
run Use |util| module instead of |sys| 2012-01-07 12:01:11 +01: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).