CRAPHT

Compilers from First Principles

You should be able to write a small compiler for a simple language, including lexer, parser, type checker, and code generator.

Prerequisites

Basic programming and comfort with recursion and trees.

Path

  1. Read2-3 hours

    Crafting Interpreters

    Start with the scanning and parsing chapters; the book is freely available online.

    Open resource →
  2. Build1 week

    Write a tiny expression compiler

    Compile arithmetic expressions to a stack machine or simple bytecode.