Skip to content

Course

Building Interpreters & Compilers

A practitioner's path through language implementation — lexing, parsing, ASTs, evaluation, bytecode VMs, compilation strategy, and the runtime behavior underneath your programs.

9 lessons

Course Q&A

Reviews

Enrolled members can rate this course.

No reviews yet.

From Text to Structure

Lexing, parsing, precedence, diagnostics, and AST design for languages that humans can actually debug.

  1. 01Lexing Without Mythology: Turning Bytes into TokensBuild a lexer as a lossy-but-accountable boundary between raw text and grammar, with spans, diagnostics, and recovery treated as first-class features.23mOpen
  2. 02Parsing Expressions, Precedence, and Errors People Can UseUse precedence-aware parsing to build correct trees, preserve operator meaning, and report syntax errors that point at the next repair.26mOpen
  3. 03AST Design That Survives Interpreters, Compilers, and ToolingDesign a tree that preserves meaning, supports analysis and refactoring, and does not collapse distinction too early.24mOpen

Evaluation and Compilation Strategy

Tree-walking interpreters, environments, closures, intermediate representations, bytecode, and native compilation trade-offs.

  1. 01Tree-Walking Interpreters: Correctness Before SpeedImplement direct AST evaluation, understand its costs, and use it as the executable specification for later execution engines.25mPremium
  2. 02Environments, Closures, and Scope Without Hand-WavingImplement lexical scope correctly, distinguish mutation from capture, and understand why closures force memory-design decisions.27mPremium
  3. 03Choosing the Path: Tree IR, Bytecode, or Native CompilationCompare execution strategies by correctness cost, startup, peak performance, tooling, portability, and implementation complexity.24mPremium

Runtime Reality

Bytecode VM implementation, values and memory, performance measurement, optimization, and understanding production runtimes.

  1. 01Building a Bytecode VM That Does Not RotImplement a small stack VM with coherent instruction encoding, constants, control flow, calls, and traceable runtime errors.28mPremium
  2. 02Values, Memory, and Garbage Collection Without Cargo CultingModel language values honestly, understand allocation cost, and choose ownership or collection strategies that match runtime semantics.26mPremium
  3. 03Understanding Production Runtimes: JITs, Inline Caches, and DeoptimizationRead runtime behavior through the lens of hidden classes, inline caches, speculative optimization, warmup, and deoptimization.27mPremium