Skip to main content

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


Download files

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

Source Distribution

PlyPlus-0.7.2.zip (243.5 kB view details)

Uploaded Source

File details

Details for the file PlyPlus-0.7.2.zip.

File metadata

  • Download URL: PlyPlus-0.7.2.zip
  • Upload date:
  • Size: 243.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PlyPlus-0.7.2.zip
Algorithm Hash digest
SHA256 bad4338c6fbbe95de65fbe009fd954a3b3e5d85f09a051bdd6c0085898f5b6eb
MD5 9cfed91cdf93441a1a79a10e1195d2b3
BLAKE2b-256 32be55ddff0aa07f093208954f0c0e10bdc8aa9150ade178bd720d6f71ca54a3

See more details on using hashes here.

Supported by

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