Skip to main content

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

History Node

1.0.13

History Node

1.0.12

History Node

1.0.11

History Node

1.0.10

History Node

1.0.7

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

This version
History Node

1.0.1

History Node

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
lrparsing-1.0.1.linux-x86_64.tar.gz (56.4 kB) Copy SHA256 hash SHA256 Dumb Binary any Apr 18, 2013
lrparsing-1.0.1.tar.gz (310.9 kB) Copy SHA256 hash SHA256 Source None Apr 18, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page