GATE CS 2022 · Question 29 · Compiler Design · Numerical answer (NAT) · 1 mark · no negative marks

Consider the augmented grammar with {+, *, (, ), id} as the set of terminals.
S' → SS → S + R | RR → R * P | PP → (S) | id
If I₀ is the set of two LR(0) items {[S' → S·], [S → S· + R]}, then goto(closure(I₀), +) contains exactly ______ items.

Answer

Answer 5

Answer from the official GATE CS 2022 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes