Compilers and Interpreters
Build a programming language from scratch — lexer, parser, AST, evaluator, bytecode VM, optimizer. Plus the smaller interpreters (regex, JSON, markdown, templates, formatters, linters) you'll write along the way.
Course sequence
- 01
Build Your Own JSON Parser
Not startedBuild a fully RFC 8259-compliant JSON parser from scratch. You'll tokenize structural characters, decode escape sequences and Unicode, parse numbers with strict grammar, and recursively assemble objects and arrays. By the end you'll deeply understand how json.loads, JSON.parse, and every other parser actually works.
beginner12 lessons~3h - 02
Build a Markdown to HTML Converter
Not startedBuild a Markdown parser following CommonMark: headings, paragraphs, emphasis, links, images, lists, code blocks, blockquotes, horizontal rules. Then add GFM extensions (tables, strikethrough). The foundation of every README, blog post, and static site generator.
beginner20 lessons~5h - 03
Build Your Own Regex Engine
Not startedBuild a regex engine from first principles — literal matching, character classes, quantifiers, anchors, alternation, capture groups. You'll implement Thompson's NFA construction (1968!) and the parallel simulation algorithm that guarantees linear time. By the end you'll understand what makes RE2, Go's regexp, and Rust's regex crate fast and safe.
intermediate16 lessons~4h - 04
Build a Template Engine
Not startedBuild a Jinja2-style template engine: tokenize {{ var }} and {% tag %}, parse to AST, resolve variables, apply filters with auto-escaping, evaluate if/for control flow, and implement template inheritance with extends/block. Powers Flask, Ansible, Salt, Helm.
intermediate10 lessons~3h - 05
Build a Code Formatter
Not startedBuild a Wadler-style pretty printer like prettier/black/gofmt: parse to AST/CST, define a Doc algebra (text/line/group/nest), make line-break decisions based on width, preserve comments through formatting, support hanging indent + alignment. The toolchain backbone of every modern codebase.
intermediate10 lessons~3h - 06
Build a Linter
Not startedBuild an ESLint/Pylint-style static analyzer: tokenize source, build an AST, walk it with visitor pattern, check naming/complexity/unused names/dead code, parse suppressions, load config from pyproject.toml, emit human/JSON/GitHub formats. The toolchain backbone of every modern codebase.
intermediate10 lessons~3h - 07
Build a Lisp Interpreter
Not startedBuild a Scheme/Lisp interpreter in ~200 lines: tokenize, parse to nested lists, evaluate atoms and expressions, support define and if, lambda + closures, recursion, list operations, and macros. The textbook (SICP) classic — every CS curriculum has this.
intermediate13 lessons~3h - 08
Build a C Compiler
Not startedBuild a C compiler from scratch: lexer, recursive-descent parser, type checker, IR generation, x86-64 code generation, optimization passes (constant folding, dead code, register allocation), and linking. Builds the full pipeline like chibicc, GCC, and Clang.
advanced14 lessons~4h - 09
Build a Programming Language from Scratch
Not startedBuild a complete programming language from first principles. You'll implement a scanner, recursive descent parser, tree-walk interpreter, bytecode compiler, stack-based virtual machine, garbage collector, closures, classes with inheritance, and a type inference engine. This is the definitive course on programming language implementation — based on the same techniques used by Python, Ruby, Lua, and JavaScript engines.
advanced38 lessons~10h
Create a free account to track your progress across this path.