Establish the core mental model: what compilation is, how phases compose, and the contracts between front-end and back-end stages.
Compilers 101
A practical compiler front-end course covering pipeline fundamentals, BNF grammar design, lexing, arena-backed interning, and recursive-descent parsing.
Building a compiler from scratch is one of the most rewarding software engineering challenges. It forces you to bridge the gap between abstract human-readable text and concrete machine-executable logic.
In this course, we will walk through the entire front-end of a modern compiler. We’ll start with the fundamentals of lexing and syntax, traverse the mathematical theory behind pattern recognition, and ultimately implement a robust, error-recovering parser and semantic analyzer.
Whether you’re a seasoned engineer looking to demystify how your tools work, or a student trying to grasp the magic of translating code, this track is designed for you. Let’s dive in.
Compiler Foundations
Automata Theory — optional deep dive
From regular languages to practical recognizers: regex, NFA/DFA construction, and pushdown automata as the bridge to nested syntax.
Note: The chapters in this section cover the formal mathematical foundations behind automatic lexer and parser generation. If your goal is to learn how to build a practical, hand-written compiler from scratch without the heavy math, you can safely skip this entire section and jump straight to Lexer Engineering. You can always return here later for the theoretical deep dive!
Regular Languages and Regular Expressions
A rigorous introduction to alphabets, strings, languages, and regular expressions—the mathematical foundation of lexical analysis.
Finite Automata: NFA and DFA
Model recognition with nondeterministic and deterministic automata, and compare their construction and runtime behavior.
Thompson's Construction and Subset Algorithm
Master the algorithmic core of lexer generation: converting regex to NFA and NFA to efficient DFA.
Context-Free Grammars and Pushdown Automata
Move beyond regular languages with context-free grammars and pushdown automata—the formal backbone of every parser.
The rest of this course is still under development, any and all feedback is very welcome! If you have suggestions for topics you’d like to see covered, or if you want to contribute a chapter, please reach out to me!