Languages & Runtimes
Compilers & Interpreters
How programming languages are implemented: lexers, parsers and grammars, abstract syntax trees, type checking, intermediate representations, optimisation passes, code generation, interpreters and virtual machines, and garbage collection algorithms.
3 modules 8 lessons ~1 h of reading
Start learning
0/8 completed
01
Front End
4 lessons- 1How Compilers WorkThe phases of a compiler — lexing, parsing, semantic analysis, IR, optimisation and code generation — front end vs back end, compilers vs interpreters vs JITs, and how real toolchains like GCC, LLVM, javac and V8 fit the model.intermediate4 min
- 2Lexical AnalysisTurning characters into tokens — token types, lexemes, regular expressions, finite automata (NFA to DFA), maximal munch, handling whitespace, comments and keywords, and writing a hand-coded lexer.intermediate3 min
- 3ParsingBuilding syntax trees from tokens — context-free grammars, parse trees vs ASTs, ambiguity, precedence and associativity, recursive descent, Pratt parsing, LL vs LR, parser generators, and error recovery.advanced4 min
- 4Semantic AnalysisChecking meaning after syntax — symbol tables and scopes, name resolution, type checking, type inference (Hindley–Milner), static vs dynamic typing, and other checks like definite assignment and reachability.advanced3 min
02
Middle & Back End
2 lessons- 5IR & OptimisationIntermediate representations (three-address code, control-flow graphs, SSA form, LLVM IR) and the classic optimisations — constant folding, dead code elimination, CSE, inlining, loop optimisations, vectorisation and escape analysis.advanced4 min
- 6Code GenerationThe compiler back end — instruction selection, register allocation (graph colouring, linear scan, spilling), instruction scheduling, calling conventions and stack frames, and what assemblers and linkers do afterwards.advanced4 min
03
Runtimes
2 lessons- 7Interpreters & Virtual MachinesTree-walking interpreters, bytecode compilers, stack vs register VMs, the dispatch loop and its optimisations, JIT compilation tiers, inline caches, and how CPython, the JVM, V8 and Lua are built.advanced4 min
- 8Garbage Collection AlgorithmsAutomatic memory management — reachability and roots, reference counting, mark-sweep, mark-compact, copying collectors, generational GC, tri-colour marking, incremental and concurrent collection, write barriers, and how real runtimes combine them.advanced6 min