596 Commits (93d3c6a2509f947f57d5728c15d8b96ceedef28f)
 

Author SHA1 Message Date
David Majda 57bbcd71e5 Jasmine: Convert tests of parser's "action" rule 12 years ago
David Majda 35771e15bc Jasmine: Convert tests of parser's "braced" rule 12 years ago
David Majda b1cb214e8b Jasmine: Convert non-tests of parser's character class rules 12 years ago
David Majda 4f5b78b372 Jasmine: Convert tests of parser's "identifier" rule 12 years ago
David Majda a3d93f000f Jasmine: Convert tests of parser's "literal" rule 12 years ago
David Majda 573db92583 Jasmine: Convert tests of parser's "string" rule 12 years ago
David Majda fa65018b15 Jasmine: Convert tests of parser's "doubleQuotedString" rule 12 years ago
David Majda 0e384b31f4 Jasmine: Convert tests of parser's "doubleQuotedCharacter" rule 12 years ago
David Majda 2f5f8d5932 Jasmine: Convert tests of parser's "simpleDoubleQuotedCharacter" rule 12 years ago
David Majda fb01f48c97 Jasmine: Convert tests of parser's "singleQuotedString" rule 12 years ago
David Majda d3b3fe9b78 Jasmine: Convert tests of parser's "singleQuotedCharacter" rule 12 years ago
David Majda 124e45606c Jasmine: Convert tests of parser's "simpleSingleQuotedCharacter" rule 12 years ago
David Majda ba68919b0a Jasmine: Convert tests of parser's "class" rule 12 years ago
David Majda 5fb59b05f2 Jasmine: Convert tests of parser's "classCharacterRange" rule 12 years ago
David Majda d29a753b8d Jasmine: Convert tests of parser's "classCharacter" rule 12 years ago
David Majda b9ae8f9561 Jasmine: Convert tests of parser's "bracketDelimitedCharacter" rule 12 years ago
David Majda da4ac8bb92 Jasmine: Convert tests of parser's "simpleBracketDelimitedCharacter" rule 12 years ago
David Majda 2bb266bbaf Jasmine: Convert tests of parser's "simpleEscapeSequence" rule 12 years ago
David Majda 2619becb9d Jasmine: Convert tests of parser's "zeroEscapeSequence" rule 12 years ago
David Majda 2b43f8ebb8 Jasmine: Convert tests of parser's "hexEscapeSequence" rule 12 years ago
David Majda 0bbca136a2 Jasmine: Convert tests of parser's "unicodeEscapeSequence" rule 12 years ago
David Majda a27dc5ae4a Jasmine: Convert tests of parser's "eolEscapeSequence" rule 12 years ago
David Majda 4f91286013 Jasmine: Convert non-tests of parser's character class rules 12 years ago
David Majda 3bc61c4c50 Jasmine: Convert tests of parser's "__" rule 12 years ago
David Majda fadaef84dd Jasmine: Convert tests of parser's "comment" rule 12 years ago
David Majda b5ccaed491 Jasmine: Convert tests of parser's "singleLineComment" rule 12 years ago
David Majda dac3b0d8d9 Jasmine: Convert tests of parser's "multiLineComment" rule 12 years ago
David Majda 328edf667c Jasmine: Convert tests of parser's "eol" rule 12 years ago
David Majda b4cffee9d4 Jasmine: Convert tests of parser's "eolChar" rule 12 years ago
David Majda a46b9c197b Jasmine: Convert tests of parser's "whitespace" rule 12 years ago
David Majda c27b96051a Jasmine: Initial infrastructure
This is the first of many commits that gradually convert PEG.js's test
suite from QUnit to Jasmine, cleaning it up on the way.

Main reason for the change is that Jasmine allows nested contexts,
allowing to structure the tests in a better way than QUnit. Moreover,
the tests needed to be cleaned up a bit.
12 years ago
David Majda 4f86fca3d7 Make the code emitter a compiler pass
This gives the compiler a more regular structure.
12 years ago
David Majda 44852fa6b4 Pass |options| to compiler passes 12 years ago
David Majda 53f70b9eb9 Move compiler passes and their tests into a subdirectory 12 years ago
David Majda f046e0a838 Move compiler-related source files and tests into a subdirectory 12 years ago
David Majda 5bd2ca1cb5 README.md: Fix |PEG.buildParser| option name 12 years ago
David Majda 6091e4426b Update version to 0.7.0 12 years ago
David Majda 4e04acafa3 Update CHANGELOG 12 years ago
David Majda ef06621a2b Remove extra comma in compiler tests 12 years ago
David Majda 7faf40dc44 Do not use results cache in the PEG.js grammar parser 12 years ago
David Majda 11f3dc9744 README.md: Document options and variables visible in actions/predicates 12 years ago
David Majda b7e41b0985 README.md: Various tweaks 12 years ago
David Majda 6f78df19d4 Make benchmark suite support the |cache| option
Both the browser and the command-line version of the benchmark suite
runner now allow users to specify a value of the |cache| option.
12 years ago
David Majda 8f71c07cec Implement the "--cache" command-line option 12 years ago
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.)
12 years ago
David Majda 1ee6731b51 Supply default option value only if the option is not specified
The "|| trick" is too brittle in this case -- it wouldn't work e.g. for
options with default value |true| and passed value |false|, enforcing
inconsistent default values handling.
12 years ago
David Majda 2aaa038499 Add a hack to skip last comma in |parseFunctions| 12 years ago
David Majda f3970bfa5c Extend QUnit a bit more cleanly 12 years ago
David Majda abf33d3feb Add a note about semantic versioning to |PEG.VERSION| comment 12 years ago
David Majda 7f2dc850e0 Change how the library is exported
This commit makes the library define the |PEG| global variable (for
browser export) and possibly assign it into |module.exports| (for
Node.js export) later. The |module.exports| assignment is done *outside*
the main library |function| statement.

The big idea behind this is to make copy & paste inclusion of the
library into another code easier -- one just needs to strip the last
three lines.
12 years ago