This new version includes a brand new Earley implementation, with support for a Shared Packed Parse Forest (or SPPF), providing much better performance for ambiguous grammars, both in terms of run time and memory consumption.
Users might notice a small degradation in Earley's run-time performance for deterministic grammars. Hopefully future releases will take care of that as well.
Big thanks to @night199uk for his great contribution.
Other features worth mentioning (though they exist in the previous release):
-
Added support for importing rules between grammars. The import mechanism is namespace-aware.
-
Added the
maybe_placeholders
option, which causes optionals of the form[expr]
to returnNone
when not matched, instead of just not appearing. (optionals of the formexpr?
maintain the previous behavior of not appearing unless matched) -
Plenty of bugfixes, better errors, and better docs