SHSU-Compiler-Project
Code for a compiler created for my COSC 4316 Compiler Design and Construction Class
For my convenience, I made use of a Makefile while implementing the code. The way the project works is that it reads a text file and prints out the tokens and their type, the symbol table, the abstract syntax tree, the quads, and finally, it prints out the assembly code into a file called "out.asm". This file contains all the assembly code instructions based on the generated quads
The project was made to handle programs that make use of basic arithmetic (+,-,*,/), relational operators (<,>,<=,>=,!,!=), and things like if statements and while loops, along with nested ifs and nested whiles. The project also does basic error checking. A further submission type involved adding support for recursion, procedure calls, and subscripted variables, but I settled for a less complex submission type involving the aforementioned functions
Log in or sign up for Devpost to join the conversation.