Skip to main content

A collection of ebnf tools

Project description

ebnf tools

A collection of tools to work with ebnf grammars, like conversion between different formats, railroad generation and random example generation.

Getting Started

Prerequisites

Requires python3.9 or higher.

Other requirements like lark and railroad-diagrams should be installed automatically by pip

Installing

pip install ebnf

If you want to use one of the extra utils with extra requirements, use the ebnf[<extra>] syntax:

  • railroad diagram generation: pip install ebnf[railroad]

Tools

The 'base' ebnf dialect for this package the one used by the lark package. All features should work for it, but might not work for others.

ebnf.railroad - railroad diagram generation

Generates a html file containing svg for each rule/terminal in the input grammar. Can take a lot of different options, check the help for more info

ebnf.convert - dialect translation (TODO)

Attempts to convert between different dialects, with the focus being generation lark compatible output

ebnf.example - generates an example for a grammar (TODO)

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

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

ebnf-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

File details

Details for the file ebnf-0.1.0.tar.gz.

File metadata

  • Download URL: ebnf-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for ebnf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0578783c4e8f34db931e831b4166dc306f92989fb77df9212606e8a07006a9a0
MD5 bf0d6b67ae17b511e276b68c8a5396de
BLAKE2b-256 7c82ae8cd0371c184fc1cfed7f12330fe72d76b07e4fad0717af945ce8f014be

See more details on using hashes here.

Supported by

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