Stages
- Lexing: source text into tokens
- Parsing: tokens into a syntax tree
- Semantic analysis: names, types, and checks
- IR: a simpler representation that's easy to analyze and transform
- Optimization: passes over the IR
- Code generation: IR into machine code
To learn
- Writing a small parser by hand
- SSA form and why compilers use it
- How LLVM fits in
See Compiler resources for links.