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.

3.2 KiB

See commit history for a full list of changes.

v0.7.0 (April 18, 2012)

Big Changes

  • Added ability to pass options to PEG.buildParser.
  • Implemented the trackLineAndColumn option for PEG.buildParser (together with the --track-line-and-column command-line option). It makes the generated parser track line and column during parsing. These are made available inside actions and predicates as line and column variables.
  • Implemented the cache option for PEG.buildParser (together with the --cache command-line option). This option enables/disables the results cache in generated parsers, resulting in dramatic speedup when the cache is disabled (the default now). The cost is breaking the linear parsing time guarantee.
  • The current parse position is visible inside actions and predicates as the offset variable.
  • Exceptions thrown by the parser have offset, expected and found properties containing machine-readable information about the parse failure (based on a patch by Marcin Stefaniuk).
  • Semantic predicates have access to preceding labels. [GH-69]
  • Implemented case-insensitive literal and class matching. [GH-34]
  • Rewrote the code generator — split some computations into separate passes and based it on a proper templating system (Codie).
  • Rewrote variable handling in generated parsers in a stack-like fashion, simplifying the code and making the parsers smaller and faster.
  • Adapted to Node.js 0.6.6+ (no longer supported in older versions).
  • Dropped support for IE < 8.
  • As a result of several optimizations, parsers generated by 0.7.0 are ~6.4 times faster and ~19% smaller than those generated by 0.6.2 (as reported by /tools/impact).

Small Changes

  • Fixed reported error position when part of the input is not consumed. [GH-48]
  • Fixed incorrect disjunction operator in computeErrorPosition (original patch by Wolfgang Kluge).
  • Fixed regexp for detecting command-line options in /bin/pegjs. [GH-51]
  • Generate more efficient code for empty literals (original patch by Wolfgang Kluge).
  • Fixed comment typos (patches by Wolfgang Kluge and Jason Davies). [GH-59]
  • Fixed a typo in JavaScript example grammar. [GH-62]
  • Made copy & paste inclusion of the PEG.js library into another code easier by changing how the library is exported.
  • Improved the copyright comment and the “Generated by...” header.
  • Replaced Jakefile with Makefile.
  • Added make hint task that checks all JavaScript files using JSHint and resolved all issues it reported. All JavaScript files and also generated parsers are JSHint-clean now.
  • Fixed output printed during test failures (expected value was being printed instead of the actual one). Original patch by Wolfgang Kluge.
  • Added a /tools/impact script to measure speed and size impact of commits.
  • Various generated code improvements and fixes.
  • Various internal code improvements and fixes.
  • Improved