← All projects

PROJECT

Xeno Compiler

A front-end compiler for Xeno, a proprietary Python-like language.

Features

Skills applied

Reader Scanner Parser

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.

Transition table in Excel Fig. 1 — Transition table in Excel

Transition table in C Fig. 2 — Transition table as a 2D array in C


The source code is not publicly available.