In this Github repository, I'm documenting my journey to writing a self-compiling compiler in only five days.
This was our final project for the university course: Automata Theory.
The project developed my understanding of tokenization, parsing, and semantic analysis.
Here are the steps I've implemented:
- Part 0: Introduction to the Journey
- Part 1: Introduction to Lexical Scanning
- Part 2: Introduction to Parsing
- Part 3: Operator Precedence
- Part 4: An Actual Compiler
I have borrowed some of the code, and lots of ideas, from the SubC compiler written by Nils M Holm. His code is in the public domain. I think that my code is substantially different enough that I can apply a different license to my code.
Unless otherwise noted,
- all source code and scripts are (c) Warren Toomey under the GPL3 license.
- all non-source code documents (e.g. English documents, image files) are (c) Warren Toomey under the Creative Commons BY-NC-SA 4.0 license.