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

Discussion

A syntax directed definition is S-attributed when

  • A.it contains no attributes at all on any of its symbols
  • B.every attribute in it is synthesised
  • C.every attribute in it is inherited from the parent node
  • D.it uses both synthesised and inherited attributes together

Answer: B

Correct answer: every attribute in it is synthesised

S-attributed definitions use no inherited attributes at all, so information flows only upward. That makes them exactly what a bottom up parser can evaluate during the parse, with the attribute values held on a stack parallel to the parsing stack and no extra machinery at all.

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

Post your comment

Please log in or register to post a comment.