CS450 Compiler Design
80
Contextual Analysis
•Finds scope and type errors.
AssignCommand
:int
Example 1:
:char
***TYPE ERROR
(incompatible types in AssignCommand)
Example 2:
foo
Ident
SimpleV
foo not found
***SCOPE ERROR
(undeclared variable foo)