compilertk-0.12.2
توضیحات
Collections of tools useful for syntax analysis part of compiler design
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | compilertk-0.12.2 |
| نام | compilertk |
| نسخه کتابخانه | 0.12.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | candh |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/candh/compiler-toolkit |
| آدرس اینترنتی | https://pypi.org/project/compilertk/ |
| مجوز | MIT |
## compiler-toolkit
Collection of programs useful for syntax analysis.

---
```bash
$ 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
- https://mikedevice.github.io/first-follow/
- http://hackingoff.com/compilers
- http://hackingoff.com/compilers/predict-first-follow-set (unreliable)
نیازمندی
| مقدار | نام |
|---|---|
| - | colorful |
| - | PyInquirer |
| - | docopt |
| - | tabulate |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl compilertk-0.12.2:
pip install compilertk-0.12.2.whl
نصب پکیج tar.gz compilertk-0.12.2:
pip install compilertk-0.12.2.tar.gz