Skip to main content

Modgrammar is a general-purpose library for constructing language parsers and interpreters using context-free grammar definitions in Python. Language parsing rules (grammars) can be defined using standard Python syntax, and then 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.

Documentation: http://rembish.github.com/modgrammar-py2 Parent Project: http://code.google.com/p/modgrammar

Some features include:

  • Pure-Python cross-platform design.

  • Grammar definitions are created 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 be given custom methods and behaviors as part of the grammar definition, 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.

  • Python 2.6+, 3.x support

Metadata

Release files for modgrammar-py2 0.9.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for modgrammar-py2 0.9.2
File Interpreter ABI Platform
modgrammar_py2-0.9.2-py2.7.egg Legacy Egg format - - Details

Release files / modgrammar_py2-0.9.2-py2.7.egg

Download URL modgrammar_py2-0.9.2-py2.7.egg
Size 62.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
79239551e47b61ac86633cd378f74bdfe38449cbff2632d4b999d7fd9569c7c7
BLAKE2b-256 checksum
How to use checksums
85a6aee49944d302e4edf9a495736eb1d24aa5df0b42b6a0eede30df04cc2513
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.9.2 This release

1 release file

0.9.1

1 release file

0.8.1

1 release file

0.8

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page