Parsing & ASTs
Grammar
- Precedence built into grammar
- Left associativity via loops
Recursive descent
- One function per rule
- Readable and easy to debug
AST shape
- Number, Ident, Unary, Binary, Call
- Focus on meaning
Errors
- Short, specific messages
- Report unexpected token
1 / 1