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

Discussion

Syntax directed definitions attach to grammar productions

  • A.the target machine instructions for the construct parsed
  • B.semantic rules computing attribute values for the symbols
  • C.the precedence and associativity of the operators involved
  • D.the error messages to be issued if the production fails

Answer: B

Correct answer: semantic rules computing attribute values for the symbols

A syntax directed definition pairs each production with rules that compute attributes of the symbols in it - a type, a value, an address, a piece of generated code. The parse then carries the semantic work along with it, which is how meaning is attached to structure without a separate traversal.

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

Post your comment

Please log in or register to post a comment.