Compilers

A computer only understands raw machine code, yet you write in Python or TypeScript. Something bridges that gap — and that something is a compiler, one of the most elegant machines in all of computing. It reads your source text, works out what it means, and translates it into instructions the hardware can run, catching your mistakes along the way.

This branch follows a program through the whole pipeline: lexical analysis into tokens, parsing against a grammar into a syntax tree, semantic analysis and type checking, an intermediate representation, and finally code generation and optimisation. It draws on the automata of theory of computation.