Release 2.0.0
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 toRule#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.