/PP3

Primary LanguageC

Code is done in python 3.7.3
In the "workdir" directory exec.sh and build.sh files are stored. Althought build.sh is empty as it is not needed to run python code.

For lexical analysis PLY is used.
The exec.sh file should be run as follows...

./exec.sh <input_file>
Absolute path should be used at all times for the input files.


Here lexanalysis.py is the tokenizer file. It generates the token. 
pp2.py collects these tokens and either report a syntax error and if there is no error, it generates an Abstract Syntax Tree(AST). And finally for Project phase 3, I used the pp3.py file. It takes the AST from pp2.py and finds out all the semantic errors.

The const.py file is used for handling all the constants needed for this project.