a friendly yet powerful LR-parser written in Python
Project description
Plyplus is a general-purpose parser built on top of PLY (http://www.dabeaz.com/ply/), written in python, with a slightly different approach to parsing.
Most parsers work by calling a function for each rule they identify, which processes the data and returns to the parser. Plyplus parses the entire file into a parse-tree, letting you search and process it using visitors and pattern-matching.
Plyplus makes two uncommon separations: of code from grammar, and of processing from parsing. The result of this approach is (hopefully) a cleaner design, more powerful grammar processing, and a parser which is easier to write and to understand.
Features:
Automatically builds an AST. Customizable in grammar (expand and flatten nodes automatically)
Selectors: run powerful queries on the AST
Rule operators mimicking regular expressions (supported: parentheses, ‘|’, ‘*’, ‘?’, and ‘+’)
Comes with a full, flexible, Python grammar
Nested grammars (a grammar within a grammar. Useful for HTML/CSS, for example)
Automatic line counting
From PLY: Readable errors, Debug mode
And more! …
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 PlyPlus-0.6.2.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b435c44b5f7092682e37588b3ed0040538e64498bc18b22d8a1607e8ebd92ab |
|
MD5 | a61680c195a8922ee2ebb0dc72220168 |
|
BLAKE2b-256 | bcd2d076fcb7e7708d4c6efdea19c2af5c1ae4ba3cef3f07d554488c39c460a1 |