Type a small arithmetic expression and watch the front-end of a compiler turn it into tokens, an abstract syntax tree, intermediate code and optimised output.
+ −) → factor (* /) → primary (number, variable, parenthesised expression) — building an abstract syntax tree that captures operator precedence.
Semantic analysis would resolve names and types; here we move to the intermediate representation, emitting three-address code. A constant-folding optimisation pass evaluates sub-expressions whose operands are all constants at compile time, shrinking the program before final code generation.