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

Discussion

The core of an LR(1) state is

  • A.the set of its LR(0) items with the lookaheads discarded
  • B.the single item from which the state was first generated
  • C.the union of the lookaheads of all its items taken together
  • D.the production that will be reduced in that state

Answer: A

LALR merges states whose cores agree, uniting their lookahead sets. This gives the SLR state count with lookaheads better than FOLLOW but not quite as precise as canonical LR. That middle position is exactly why the construction is so widely used.

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

Post your comment

Please log in or register to post a comment.