|
|
Example 6
This example shows that the values have been computed for the attributes
Use and Def .
The input to the semantic evaluator is an
unattributed parse tree, so the parser has done something more than that
shown in Example 4. The entire parse tree input
is not shown because of lack of space. See
Exercise
3. The values of Use and Def at the top of the tree (the
node labeled Program ) might be use to issue the messages:
X1, X2 defined, but not used
a, bb used, but not defined
if this were the entire program.
|