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

Discussion

A marker nonterminal deriving epsilon is used in bottom up translation to

  • A.eliminate the need for a value stack in the parser
  • B.remove a troublesome shift-reduce conflict from the parsing table
  • C.record the state number at which the parse began
  • D.force a reduction at a chosen point so an action can run there

Answer: D

Correct answer: force a reduction at a chosen point so an action can run there

Because actions run only on reductions, an action needed part way through a production has nowhere to attach. A marker deriving epsilon supplies a reduction at exactly that point, which is both how mid-rule actions are implemented and how inherited attributes can be made available part way along a rule.

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

Post your comment

Please log in or register to post a comment.