Skip to main content

compiler-toolkit

Collection of programs useful for syntax analysis. screenshot of the tool


$ pip install compilertk
$ compilertk FILE

Features:

  • Elimination of Null Productions
  • Elimination of Unit Productions
  • Elimination of Left Recursion
  • Calculates First Sets
  • Calculates Follow Sets
  • Prints Parsing Table
  • Generates a log file

Notation

Using this example of a grammar:

S -> S a A | B
A -> a A | eps
B -> d E'
E' -> int a | eps
  • Every symbol on the left side is a non-terminal
  • Non-terminals and its productions are separated by "->"
  • Individual symbols are separated with a space.
  • Null productions are specified with eps
  • | is used to specify alternative productions

Tests

Make sure everything runs fine by running the test cases

  1. ./run_tests.sh

TODOs

  • Add docstrings to functions
  • Add test cases for parsing table
  • Add more tests cases

Useful Links

Metadata

Release files for compilertk 0.12.2

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

Source distribution (sdist)

Source distribution for compilertk 0.12.2
File Size Uploaded
compilertk-0.12.2.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for compilertk 0.12.2
File Interpreter ABI Platform
compilertk-0.12.2-py3-none-any.whl Python 3 none any Details

Total release size: 25.5 kB

Release files / compilertk-0.12.2.tar.gz

Download URL compilertk-0.12.2.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0d324e12d60142ba59c9126b9196f9406cb4bdc0ab37c197865424711dcf032e
BLAKE2b-256 checksum
How to use checksums
d7e316e38fbd42e7e20e1b0a854cfb8fd1203f7486a38aa405927cad2166bda4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / compilertk-0.12.2-py3-none-any.whl

Download URL compilertk-0.12.2-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6644674913110881091b6f53bdc2040c33e260d76273da40439d136979360bc4
BLAKE2b-256 checksum
How to use checksums
1268edcf29c6b799ff44245393151832dbe1e76656980ffdc9fe3c24e26ed090
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.12.2 This release

2 release files

0.12.1

2 release files

0.12.0

2 release files

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