An LR(1) parser hiding behind a pythonic interface
Project description
Lrparsing provides both an LR(1) parser and a tokeniser. It differs from other Python LR(1) parsers in using Python expressions as grammars, and offering simple to use disambiguation tools.
The result is something that is powerful yet concise. For simple tasks this means it can be thought of as an extension to Python’s existing re module, used when regular expressions become too cumbersome. For complex tasks offers a high speed parser (very roughly 25us per token from string to parse tree on a desktop CPU), pre-compilation of the grammar and error recovery hooks so parsing can continue after an error is found.
In addition to extensive documentation it comes with a parser for Sqlite3 data manipulation statements and a Lua 5.2 to Python compiler as examples. The documentation can be read online at http://www.stuart.id.au/russell/files/lrparsing/doc.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lrparsing-1.0.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 660ed7aee3d2d24b39f487a3288b0d1d278022b0d649b291e72be40e8ba29043 |
|
MD5 | 6752a2d13bcfd06e68e58d6fad25ba3c |
|
BLAKE2b-256 | 6a39465b039a9cfb8bffb5ba64b912d089c9ec538a75bc600ab384bd7390206f |