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

Discussion

An LR(0) parser decides to reduce

  • A.after examining two tokens of lookahead in the input
  • B.whenever a complete item is present, without consulting the lookahead
  • C.only when the lookahead falls in the FOLLOW set of the left side
  • D.only when the lookahead matches the item's attached terminal

Answer: B

Ignoring the lookahead makes LR(0) conflict on almost every real grammar. The construction matters chiefly as the foundation on which SLR and the later methods build. Understanding it makes the later constructions much easier to follow.

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

Post your comment

Please log in or register to post a comment.