R0KernelPath
roadmap/track 19
19

Compilers

Turning source code into machine code, stage by stage.

0
cs7-01

The Anatomy of a Compiler

A compiler is not magic — it is a sequence of elegant, well-defined transformations that carry source text all the way to running machine code, and understanding each phase makes you a better programmer forever.

10 concepts~20h
cs7-02

Lexical Analysis

Lexical analysis transforms raw source text into a structured stream of tokens by formalizing the language of valid words as regular expressions, then mechanically constructing recognizers via NFA-to-DFA conversion.

10 concepts~14h
cs7-03

Parsing: Top-Down

Top-down parsing turns a context-free grammar into a working parser by predicting, from the current token alone, exactly which production rule to apply — no backtracking required.

10 concepts~18h
cs7-04

Parsing: Bottom-Up

Bottom-up parsing transforms flat token streams into parse trees by building meaning from the leaves up, using a stack-driven automaton whose power scales from LR(0) to the full LR(1) hierarchy.

10 concepts~14h
cs7-05

Abstract Syntax Trees & Semantic Analysis

ASTs are the moment source code becomes a data structure your compiler can reason about — semantic analysis is where that data structure learns what the program means.

8 concepts~18h
cs7-06

Type Checking & Inference in Compilers

Type checking is the compiler's built-in proof system — a static guardian that catches whole classes of bugs before a single instruction executes.

12 concepts~18h
cs7-07

Intermediate Representations

Intermediate Representations are the universal language compilers use to analyze, optimize, and translate programs — the crucial bridge between source code and machine reality.

10 concepts~18h
cs7-08

Code Generation & Register Allocation

Transform the abstract syntax tree into real machine instructions — navigating the gap between infinite virtual registers and the brutal reality of a finite CPU.

11 concepts~18h
cs7-09

Optimization

Compilers don't just translate code — they transform it into something faster, smaller, and smarter than any human would write by hand.

12 concepts~18h