Arbitrary-lookahead parser written in pure Python that accepts EBNF-alike definition of grammars to create a parser. It claims to be the fastest parser generator of this kind.
parsimonious is an arbitrary-lookahead parser written in pure Python that accepts EBNF-alike definition of grammars to create a parser. It claims to be the fastest parser generator of this kind.
It is based on Parsing Expression Grammars (PEG). PEGs can describe a superset of LL(k) languages, any deterministic LR(k) language and many others—including some that aren't context-free.
With caching, they take O(grammar size * text length) memory, but they run in O(text length) time.
The technical details are available on GitHub.