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

Discussion

SLR parsing can report a conflict where canonical LR does not because

  • A.SLR merges states that canonical LR keeps separate
  • B.SLR omits to augment the grammar before it builds any of the tables
  • C.FOLLOW is a coarser approximation than the context specific lookahead
  • D.SLR uses more lookahead tokens than canonical LR does

Answer: C

The FOLLOW set gathers every context in which A can appear, whereas canonical LR carries a lookahead specific to the state. The extra precision resolves conflicts that SLR cannot. The price is a much larger collection of item sets to construct and store.

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

Post your comment

Please log in or register to post a comment.