← Back to Labs

Compiler Pipeline

Follow one code fragment through lexing, parsing, IR lowering, and final machine code generation.

Current representationNext representationint total = price + tax;KW_INT IDENT(total) = IDENT(price) + IDENT(tax) ;
Step 1 / 4Lexing slices source into tokens

The compiler starts with raw source text. It groups the characters in `int total = price + tax;` into tokens such as keywords, names, operators, and punctuation.

Arrow keys to navigate · R to reset

Tap dots to jump to any step

Read the full article →Take the quiz →