This capstone project takes you through the complete journey of building a C compiler for a subset of C89. You will learn lexing, recursive-descent parsing, type checking with symbol tables, intermediate representation design, and x86-64 code generation. By the end, you will have a working compiler that takes C source files and produces executable binaries.
The whole plan below is free to read: every milestone, its build steps, how to verify it, and which tasks and visualizations to use. Tracking your progress, the completion certificate and the graded tasks it links to need a plan.
Sign inEach milestone opens into the build order, a way to check your work, the tasks that drill its pieces, and the visualizations that show the machinery. Work top to bottom.
Your compiler reads a C file and prints its syntax tree.
Pretty-print the AST of a 50-line C file, re-parse that output, and print it again: the two printouts are identical.
There is no upload step. You build this on your own machine, in your own repository, and tick each milestone off here as it works. Finish all 5 and you get a certificate with a verification id; connect GitHub first and a gist artifact is created alongside it.