Compiler course final project implemented with the Python programming language.
Made for compiling decaf programming language, a language with syntaxes similar to Javascript.
This project was done in three phases:
- Scanner
- Parser
- Code generator (generates pseudo-assembly code) Optimazitaion
- Optimization
The grammar of this language can be accessed in the grammar directory.
The compiler is made from scratch and no predefined libraries are used.
The compiler can also be run from the command-line interpreter(cmd) using colang.bat batch file if given the code path.
To execute the Decaf compiler components, follow these steps:
- Ensure Python 3 is installed on your system.
- Clone this repository to your local machine.
- Open a terminal and navigate to the repository directory.
- Run the components using Python 3 by executing the respective file