Build your own programming language. Master Lexing, Parsing, ASTs, and Code Generation using LLVM to understand how code runs.
Compilers are the ultimate meta-programming. This course guides you through building a real programming language from scratch. You will learn to tokenize source code (Lexing), define grammars and build Abstract Syntax Trees (Parsing), and perform Semantic Analysis. We cover Code Generation targeting LLVM IR (Intermediate Representation), allowing your language to compile to native machine code. You will gain a profound understanding of how high-level code maps to hardware.
Estimated completion time: 21 lessons • Self-paced learning • Lifetime access
Yes, you build a working compiler backend.
Yes, one of the most challenging CS topics.
We use C++ to build the compiler (standard).
Industry standard toolchain used by Swift/Rust.
Go from your first step to master level. Three simple steps, all about Compiler Construction.
Get the basics of Compiler Construction right, and everything after gets easier.
This is where Compiler Construction gets exciting — deeper skills, real results.
Use Sourcegraph Cody to search and understand massive codebases. It's the fast lane to mastering Compiler Construction.