COMPILER DESIGN

SEMANTIC ANALYSIS

ATTRIBUTE GRAMMARS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A parse tree showing the value of attributes at each node
A
annotated parse tree
B
syntax tree
C
semantic tree
D
all of the above
Explanation: 

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.

There is 1 question to complete.