Machine-translated by Google. Questions are authored in English.
Top

Discussion

An annotated parse tree is

  • A.a listing of the semantic rules attached to each production
  • B.a parse tree in which every node carries its attribute values
  • C.a parse tree from which all punctuation has been removed
  • D.a tree recording the order in which the productions were applied

Answer: B

Correct answer: a parse tree in which every node carries its attribute values

The annotated tree is the parse tree with the attribute values filled in, and it is the conceptual result of applying a syntax directed definition. It need not be built in practice - for S- and L-attributed definitions the values can be computed during the parse - but it is the object the definition describes.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.