This project's goal was to build a compiler's grammar as well as create the compiler's Lexer, Syntax and Semantics check.
This compiler was made for a simplified version of the python language (MiniPython), and was created with the help of SableCC. The compiler is based on the following BNF.
- Open command prompt
- Navigate to the project's directory
- Execute the grammar by running the following command:
sablecc minipython.grammar
- Compile all Java files by executing:
javac *.java
- Execute the Semantics Test on the python test file of your choice by running:
java Semantics [yourTest.py]