This is my work from an Intro to Compilers course.
For each project section, there is a .md file with more information.
- The full compiler can be run from the
generatefolder - Enter the name of the file with code to read on line 13 of
generate/lexer.py - Run
code_gen.py - The final 3TAC code is saved in
intermediate_code.txtas a file, as well as printed.
lex_errors.txt: lexical analysis errors
syntax_errors.txt: syntax analysis errors
sem_errors.txt: semantic analysis errors
intermediate_code.txt: final 3TAC intermediate code
Errors from each analysis phase are saved in the respective txt files. The phase in which the error occurred is specified in following error files, and is printed as well.