| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| peg-0.8.0.min.js | 2013-12-24 | 50.4 kB | |
| peg-0.8.0.js | 2013-12-24 | 157.5 kB | |
| 0.8.0.tar.gz | 2013-12-24 | 169.4 kB | |
| 0.8.0.zip | 2013-12-24 | 194.7 kB | |
| README.md | 2013-12-24 | 4.3 kB | |
| Totals: 5 Items | 576.3 kB | 0 | |
Big Changes
- Completely rewrote the code generator. Among other things, it allows optimizing generated parsers for parsing speed or code size using the
optimizeoption of thePEG.buildParsermethod or the--optimize/-ooption on the command-line. All internal identifiers in generated code now also have apeg$prefix to discourage their use and avoid conflicts. [#35, #92] - Completely redesigned error handling. Instead of returning
nullinside actions to indicate match failure, newexpectedanderrorfunctions can be called to trigger an error. Also, expectation inside theSyntaxErrorexceptions are now structured to allow easier machine processing. [#198] - Implemented a plugin API. The list of plugins to use can be specified using the
pluginsoption of thePEG.buildParsermethod or the--pluginoption on the command-line. Also implemented the--extra-optionsand--extra-options-filecommand-line options, which are mainly useful to pass additional options to plugins. [#106] - Made
offset,lineandcolumnfunctions, not variables. They are now available in all parsers and return lazily-computed position data. Removed now uselesstrackLineAndColumnoption of thePEG.buildParsermethod and the--track-line-and-columnoption on the command-line. - Added a new
textfunction. When called inside an action, it returns the text matched by action's expression. [#131] - Added a new
$operator. It extracts matched strings from expressions. - The
?operator now returnsnullon unsuccessful match. - Predicates now always return
undefined. - Replaced the
startRuleparameter of theparsemethod in generated parsers with more genericoptionsparameter. The start rule can now be specified as thestartRuleoption. Theoptionsparameter can be also used to pass custom options to the parser because it is visible as theoptionsvariable inside parser code. [#37] - The list of allowed start rules of a generated parser now has to be specified explicitly using the
allowedStartRulesoption of thePEG.buildParsermethod or the--allowed-start-ruleoption on the command-line. This will make certain optimizations like rule inlining easier in the future. - Removed the
toSourcemethod of generated parsers and introduced a newoutputoption of thePEG.buildParsermethod. It allows callers to specify whether they want to get back the parser object or its source code. - The source code is now a valid npm package. This makes using development versions easier. [#32]
- Generated parsers are now ~25% faster and ~62%/~3% smaller (when optimized for size/speed) than those generated by 0.7.0.
- Requires Node.js 0.8.0+.
Small Changes
bin/pegjsnow outputs just the parser source if the value of the--export-varoption is empty. This makes embedding generated parsers into other files easier. [#143]- Changed the value of the
nameproperty ofPEG.GrammarErrorinstances from “PEG.GrammarError” to just “GrammarError”. This better reflects the fact that PEG.js can get required with different variable name thanPEG. - Setup prototype chain for
PEG.GrammarErrorcorrectly. - Setup prototype chain for
SyntaxErrorin generated parsers correctly. - Fixed error messages in certain cases with trailing input [#119]
- Fixed code generated for classes starting with
\^. [#125] - Fixed too eager proxy rules removal. [#137]
- Added a license to all vendored libraries. [#207]
- Converted the test suite from QUnit to Jasmine, cleaning it up on the way.
- Travis CI integration.
- Various internal code improvements and fixes.
- Various generated code improvements and fixes.
- Various example grammar improvements and fixes.
- Improved
README.md. - Converted
CHANGELOGto Markdown.