Finished Projects
Compiler
I wrote a LL(1) recursive decent parser in C++ that generates byte code for the Java Virtual Machine. The input language is C flavored, just not fully featured. My compiler effectively takes in a C file, and outputs an executable Java file.
The main benefit to this is I never have to write Java ever again!
Overview
A basic compiler has 3 major components:
Lexical Analyzer - Takes in characters, outputs lexemes
Parser - Evaluates the lexemes and constructs an abstract syntax tree
Code Generator - Traverses the syntax tree and generates byte code
Most modern compilers are parser driven, meaning the parser will request for tokens while building the syntax tree.
Lexical Analyzer
This is the starting point of a compiler. It evaluates a buffer of characters, and uses regular expressions to produce lexemes (tokens) based on the keywords and identifiers. Below is the state diagram and subsequent logic for detecting a string.




Sunshine Bay Residence
Equipped with full air conditioning, a private pool, 3 on-suite bedrooms, and a spacious open living room kitchen area, Sunshine Bay Residences is an excellent choice for anyone dreaming of their own safe haven.
Bridgewater Joy Residence
Co-designed by the world-renowned architect James Smith, our Bridgewater Joy residences offer top views of the nearby lake Michigan. Perfect for a small family, a professional couple, or anyone looking to set up a home office.
Pleasantview Gem Inn
Not just pleasant on the outside, our Pleasantview Gem Inn properties are especially popular among families. With underground parking and floor-to-ceiling windows, there's no shortage of natural light or space.