SEMANTIC ANALYSIS
ATTRIBUTE GRAMMARS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
annotated parse tree
|
|
syntax tree
|
|
semantic tree
|
|
all of the above
|
Detailed explanation-1: -AN ANNOTATED PARSE TREE. is a parse tree showing the values of the attributes at each node. The process of computing the attribute values at the nodes is called annotating or decorating the parse tree. stand respectively for an integer number and the newline character.
Detailed explanation-2: -A parse tree shows the value(s) of its attribute(s) . Constructing a parse tree . If all attributes are synthesized, we must evaluate the attributes at all of the children of a node before we can evaluate the attribute at the node itself .
Detailed explanation-3: -An annotated parse tree is one in which various facts about the program have been attached to parse tree nodes. For example, one might compute the set of identifiers that each subtree mentions, and attach that set to the subtree.