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

Discussion

A handle is

  • A.whichever symbol is currently sitting at the very top of the parser stack
  • B.whichever token the parser is on the point of pushing next
  • C.the augmented start production added to the original grammar
  • D.a right side whose reduction at that position reverses a derivation step

Answer: D

Correct answer: a right side whose reduction at that position reverses a derivation step

The definition has two parts and both matter: the symbols must form the right side of some production, and reducing them at that particular position must correspond to undoing a step of the rightmost derivation. A string may match a right side without being a handle, and reducing it then leads the parse astray.

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

Post your comment

Please log in or register to post a comment.