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

Discussion

Bottom up parsing is described as shift reduce parsing because

  • A.the parser alternates strictly between shifting and reducing
  • B.every shift must be followed immediately by a reduction
  • C.the number of shifts always equals the number of reductions
  • D.those are the only two actions that advance the parse

Answer: D

The parser may shift several times in a row or reduce several times in a row. There is no required alternation, and the counts of the two actions are generally different. The shift count equals the token count while the reduction count does not.

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

Post your comment

Please log in or register to post a comment.