Image of Me, with trees in the background
Kyle Wilson

Application & Web Developer

About The Compiler Project

    I was tasked to build a simple compiler to read simple java code. In this project I created a file named LexicalAnalyzer.java, A lexical analyzer, which reads a text file with java code and creates tokens. The tokens are to be used with the syntax Analyzer which checks for proper syntax. Given the correct syntax, no error tokens produced, the output would then be, in this particular project, in SUBLC3 Language to be read by the JVM, or our version of a JVM with VirtualMachine.java. This VirtualMachine.java file will read the SUBLC3 text file and will be able to do the operations. The entire project is to simulate the steps of a compiler. First by generating lexemes, then generating tokens and checking syntax, then generate machine code to be executed by the JVM.

Files
View LexicalAnalyzer.java

View lexInput.txt

View VirtualMachine.java

View mySubLC3.txt