You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
See commit history for a full list of changes.
v0.9.0 (August 30, 2015)
- Tracing support. Parsers can be compiled with support for tracing their progress, which can help debugging complex grammars. This feature is experimental and is expected to evolve over time as experience is gained. More details
- Infinite loop detection. Grammar constructs that could cause infinite loops in generated parsers are detected during compilation and cause errors.
- Improved location information API. The
offsetfunctions available in parser code were replaced by a single
locationfunction which returns an object describing the current location. Similarly, the
offsetproperties of exceptions were replaced by a single
locationproperty. The location is no longer a single point but a character range, which is meaningful mainly in actions where the range covers action’s expression. More details
- Improved error reporting. All exceptions thrown when generating a parser have associated location information. And all exceptions thrown by generated parser and PEG.js itself have a stack trace (the
stackproperty) in environments that support
- Labels behave like block-scoped variables. This means parser code can see labels defined outside expressions containing code.
- Empty sequences are no longer allowed.
- Rules have to be separated either by
;or a newline (until now, any whitespace was enough).
- The PEG.js grammar and all the example grammars were completely rewritten. This rewrite included a number of cleanups, formatting changes, naming changes, and bug fixes.
- The parser object can now be accessed as
parserin parser code.
- Location information computation is faster.
- Added support for Node.js >= 0.10.x, io.js, and Edge. Removed support for Node.js < 0.10.x.
- Fixed left recursion detector which missed many cases.
- Fixed escaping of U+0100—U+107F and U+1000—U+107F in generated code and error messages.
peg$SyntaxErrorto mark them as internal identifiers.