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


Download files

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

Source Distribution

lrparsing-1.0.1.tar.gz (310.9 kB view details)

Uploaded Source

Built Distribution

lrparsing-1.0.1.linux-x86_64.tar.gz (56.4 kB view details)

Uploaded Source

File details

Details for the file lrparsing-1.0.1.tar.gz.

File metadata

  • Download URL: lrparsing-1.0.1.tar.gz
  • Upload date:
  • Size: 310.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lrparsing-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8f083d6e38e99e01ca98b72b9c8cca19f243b37a5466343b497dff7375c8cc1e
MD5 9ef17b5541a7412205a19f690273e10a
BLAKE2b-256 fd2657037962c6a1b3c63e7415c5bf0e06e87a9c42b28e38ca07907e92126525

See more details on using hashes here.

File details

Details for the file lrparsing-1.0.1.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for lrparsing-1.0.1.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 8d5030cd30b228482b6d5cefa528ad550f7e08e3e53a9d22e502d6efabf73fa7
MD5 9e06a00b3e7decb1e62162723bcafd92
BLAKE2b-256 916fc5644d5897b5c32ca7299bbc123ff577ae9377d61893586a32beb405ef0b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page