Skip to main content

A python framework for formal grammars

Project description

pyformlang

Python package pypi Documentation badge

A python library to manipulate formal grammar. In general, it can be used to better understand algorithms in a formal way.

If you use Pyformlang in your project, please cite our paper:

@InProceedings{pyformlang,
author="Romero, Julien",
title="Pyformlang: An Educational Library for Formal Language Manipulation",
booktitle="SIGCSE",
year="2021"
doi = {https://doi.org/10.1145/3408877.3432464}
}

Installation

pip3 install pyformlang

Sources

Most algorithms come from Introduction to Automata Theory, Languages, and Computation (2nd edition) by John E. Hopcroft, Rajeev Motwani and Jeferey D. Ullman.

Indexed grammars come from the original paper Index Grammars - An Extension of Context-free grammars by Alfred V. Aho.

On the implementation of Hopcroft minimization algorithm: Implementation of Hopcroft's Algorithm, Hang Zhou

Intersection CFG/Regex and a better written version

Usage

Please refer to the official documentation: pyformlang.readthedocs.io.

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

pyformlang-1.0.11.tar.gz (97.2 kB view details)

Uploaded Source

Built Distribution

pyformlang-1.0.11-py3-none-any.whl (128.5 kB view details)

Uploaded Python 3

File details

Details for the file pyformlang-1.0.11.tar.gz.

File metadata

  • Download URL: pyformlang-1.0.11.tar.gz
  • Upload date:
  • Size: 97.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for pyformlang-1.0.11.tar.gz
Algorithm Hash digest
SHA256 e292ec8b9cfa64c26b592faf9b7cfc72c4f4b0eb0d533f045a46061e75c5ce99
MD5 060925f91fd0c063b362a44c261265b7
BLAKE2b-256 7041772000760174a909294ad496854b81a882e68458dda22f53b47e1e777f0d

See more details on using hashes here.

File details

Details for the file pyformlang-1.0.11-py3-none-any.whl.

File metadata

  • Download URL: pyformlang-1.0.11-py3-none-any.whl
  • Upload date:
  • Size: 128.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for pyformlang-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 a8d76481e4d76e4df1c00cd5c5fce61969635900ef521ad182a07a61ca1c070e
MD5 17dee66c0f1310923f0dee7d5b353f57
BLAKE2b-256 6afee26ea3b233672c7a89642b0615e2c44905578a4889eb00b06a358d8ab8c5

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page