Semantic Analyzer
- Given a parse tree, the semantic analyzer detects semantic errors such as type errors.
=
/ \
<ID,1> +
/ \
<ID,2> *
/ \
<ID,3> <INT,60>
↓
|------------------------------------|
| Semantic Analyzer (Type Checking) |
|------------------------------------|
↓
=
/ \
<ID,1> +
INT INT
/ \
<ID,2> *
INT INT
/ \
<ID,3> <INT,60>
INT INT