Systems & CLI · Pro
Build a Programming Language
Build a complete dynamic language with a scanner, a Pratt parser, a single-pass bytecode compiler, and a stack-based virtual machine with its own garbage collector.
You implement a full programming language in C: a hand-written scanner tokenizes source, a Pratt parser handles expression precedence cleanly, a single-pass compiler emits bytecode, and a stack-based virtual machine executes it with closures, classes, and a mark-and-sweep garbage collector. It is worth building because it forces you to understand the entire path from text to running code, the part of computing most engineers treat as magic. It is resume-defining because compiler and runtime work signals rare depth: you will have written your own object model, hash tables, dispatch loop, and memory manager, then tuned them for speed. Few candidates can talk credibly about how a language actually executes, and this project lets you do exactly that.
What you build
- Hand-written scanner that produces a token stream
- Pratt parser that resolves operator precedence and associativity
- Single-pass compiler emitting a compact bytecode chunk format
- Stack-based VM with a dispatch loop and runtime value types
- First-class functions and closures with captured upvalues
- Classes, methods, and instances with a custom object model
- Mark-and-sweep garbage collector reclaiming unreachable objects
What it teaches
- Lexing and Pratt parsing of expressions
- Bytecode compilation and instruction set design
- Virtual machine dispatch and a runtime value representation
- Closures, upvalues, and lexical scoping
- Hash tables and a dynamic object model
- Mark-and-sweep garbage collection
Sign in to open the build guide
Free account. Get the step-by-step build and every resource link.
Take it further
- Add a register-based VM variant and benchmark it against the stack machine.
- Implement a constant-folding or peephole optimization pass.
- Add a simple module/import system with separate compilation.


