CSC448: Parsing: Abstract Syntax Trees [30/133] |
Abstract syntax trees (ASTs) are distinct from parse trees.
We use immutable ASTs: shallow vs. deep copy.
AST for arithmetic: no parentheses; visitor design pattern vs. instanceof.
Pretty printer for Arithmetic.
Building the AST during parsing with CUP.