This project is a syntax checker module for Python programming language that is developed for second major assignment of IF2124 Theory of Formal Language and Automata.
- Checking the grammar of your code! (and showing what's wrong)
- Accessible as a module and as a program
- Custom Keyword and grammar
- Verbose option
- Indentation check option
The project directory structure depicted with this tree
└──tbfo
├───examples
│ ├───python.cfg
│ └───tokens.txt
├───parser
│ ├───cyk.py
│ └───fa.py
├───grammar.py
└───lexer.py
We recommend using virtual environment (venv) on installing the package.
pip install venv
Then, initialize the virtual environment using
venv
On the main directory folder install the module using pip by running the command
pip install -e .
And you're good to go ;)
There are two ways on accessing the module
- Using the module on your python script
from tbfo import *- Using the main program on the module
py -m tbfo {Your_python_script.py} {args}
- Verbose (-v)
- No Indentation (-ni)
Because of the time constraints of the assignment, we skipped some values on the grammar checker like:
- Async/Await keyword
- Multiline continuation parenthesis
- Multiline strings
- The Python Language Reference for Python 3.6
- Teori Finite State Automata
- CYK Parsing over Distributed Representations
- Rifqi Naufal Abdjul / 13520062
- Saul Sayers / 13520094
- Amar Fadil / 13520103