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

Discussion

A syntax directed translation scheme differs from a syntax directed definition in that a scheme

  • A.requires that the grammar be unambiguous before it can be used at all
  • B.computes attribute values without reference to the grammar
  • C.places the semantic actions at explicit positions in the right side
  • D.uses only synthesised attributes and never inherited ones

Answer: C

Correct answer: places the semantic actions at explicit positions in the right side

A definition says what the relationships are; a scheme says when the code runs, by writing the actions between the grammar symbols. That commitment to an order is what makes a scheme directly implementable, and what makes it possible to write one that a given parser cannot execute.

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

Post your comment

Please log in or register to post a comment.