Back to Attic
CompilersRustPL Theory

Make an Interpreter

Stop treating your compiler like a black box. We will build an interpreter for a C-like language. You'll start with raw text, break it into tokens, build an Abstract Syntax Tree (AST), and then write an evaluator to run the code directly.

Implementation Roadmap

01Lexical Analysis

Build a Lexer to convert source code strings into a stream of Tokens.

02Parsing

Implement a Recursive Descent Parser to verify syntax and construct an AST.

03Evaluation

Traverse the AST to evaluate expressions, handle variables, and control flow.

04Functions & Closures

Add support for first-class functions and environment scopes.

05Garbage Collection

Implement a simple Mark-and-Sweep garbage collector for memory management.

Module Status: Upcoming

The interactive modules for this challenge are currently being finalized.

(Detailed coursework and verification systems are in development)