Features
- Fully implemented language with syntax defined by regular expressions
- Reader with adjustable buffer expansion and a character histogram
- Scanner driven by a transition table
- Parser that detects syntax errors based on defined parse trees
Skills applied
- Memory management in C
- CMake
- Compiler theory: automata (DFA, NFA), regular expressions, context-free grammars, state-transition tables, top-down / bottom-up / predictive LL(1) parsing, First() and Follow(), error handling and recovery

Background
This project ran the whole term of my Compilers course. My teammate and I worked on it for about 15 weeks, learning each area of compiler theory before planning and implementing the matching component. The course required defining a new language with Python-like syntax. By the end of term we had a working compiler front end that checks whether input follows the language’s syntax rules.
What I learned
Beyond compiler theory, the project sharpened my C: pointer safety, CMake, Visual Studio, and Git for a collaborative codebase.
I implemented the transition table as a 2D array behind a function that takes a row and column and decides whether the next lookahead character is valid. Designing the table so every transition was accounted for, then implementing it in C, was a big learning curve.
Fig. 1 — Transition table in Excel
Fig. 2 — Transition table as a 2D array in C
The source code is not publicly available.