| CSC448: Type Checking: Adding Null [15/18] | ![]() ![]() ![]() |
What if we add null and allow it to be either
an integer or a string:
exp ::= <INT>
| <STRING>
| exp "+" exp
| exp "-" exp
| "length" "(" exp ")"
| "inttostring" "(" exp ")"
| <ID>
| "null"
Top-down vs bottom-up type checking.