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

Discussion

A Yacc specification associates with each production

  • A.the state number in which the production will be reduced
  • B.a semantic action executed when that production is reduced
  • C.a regular expression describing the tokens it may contain
  • D.the FOLLOW set of the nonterminal on its left hand side

Answer: B

Actions run at reduction time, when the values of the right side symbols are available on the value stack. Mid-rule actions are possible but split the production internally. Splitting can introduce conflicts that were absent before the action was added.

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

Post your comment

Please log in or register to post a comment.