Modgrammar is a general-purpose library for building language parsers and interpreters using context-free grammar definitions in Python. Language parsing rules (grammars) are defined as standard Python classes, which can then be used to parse and validate input strings or files into meaningful data structures. Possible applications range from simple input validation, to complex expression evaluation, to full-fledged programming language parsing for compilers or interpreters.
Some features include:
Pure-Python cross-platform design.
Full Unicode support
Grammars are defined using standard Python syntax.
Supports arbitrarily complex grammars, including recursion.
Defining a grammar automatically creates a working parser in the process (no compilation steps or lengthy startup times).
Parse results contain full parse-tree information, including heirarchical tokenization of the input.
Parse result objects can have custom methods, producing rich data objects.
Modular grammar design supports distributing grammars as python library modules, combining grammars from multiple sources into larger grammars, and even parameterized grammar definitions.
Metadata
Release files for modgrammar 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| modgrammar-0.10.tar.gz | 86.4 kB | Without provenance | Details for modgrammar-0.10.tar.gz |
Release files / modgrammar-0.10.tar.gz
| Download URL | modgrammar-0.10.tar.gz |
|---|---|
| Size | 86.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b957cc9cc5bcc4da3b0795d63d33d421cf28db186acab74f83847de8311fa09a
|
|
BLAKE2b-256 checksum How to use checksums |
6f24f9f2756af2de13ebb3565f03720fd7baee7cbc385320da0243db8823a8c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for modgrammar 0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.