Skip to content

Release 2.0.0

Compare
Choose a tag to compare
@gkellogg gkellogg released this 19 Jun 17:16
· 161 commits to develop since this release

New PEG parser mode, allows parsing of non-context-free grammars based on Parser Expression Grammars

  • Add a PEG parser option, implemented to do recursive-descent parsing by interpreting the rules directly. The Rule#to_peg (and related) changes extract sub-rules from rules in a simlar way to Rule#to_bnf.
  • Uses a Packrat memoizer.

Other changes:

  • Update EBNF grammar to eliminate confusion between ENUM and LHS and to fix PASS so that #xN is not confused with a comment.
  • Don't rewrite LL1 rules to de-dupliate terminals, as it gets into nasty self-depedency issues.
  • Update LL1 parser to accept a logger, and use if available if a callback is not provided. Adjust log levels to be compatible with Logger.
  • Remove Rule#rewrite, which was flawed and unused.