This is a small compiler in java that uses ANTLR as a lexer and parser
After parsing our grammar we check lexical errors, generate Quadruples, and then assembly code using the visitor class to walk our tree
- install JAVA
- download ANTLR (you can download it here) and add it to your project
You can generate the ANTLR graph from the file grammar/tiny_parser.g4
You can simply run the class "Launch.java" that execute the compiler on a test file.
- The Lexer and Parser rules are defined in the grammar package
- The generated files package contains the ANTLR generated files