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

Discussion

An inherited attribute of a right side symbol must be computed by an action placed

  • A.before that symbol in the right side of the production
  • B.after that symbol so its own value is available first
  • C.at the very end of the right side of the production
  • D.in the production for the symbol rather than this one

Answer: A

The value must exist when the parser begins that symbol. Placing the action after it would compute a value nobody could have used, which is why the L-attributed restriction matters here. The restriction is exactly what makes valid placement always possible.

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

Post your comment

Please log in or register to post a comment.