Consider the augmented grammar with {+, *, (, ), id} as the set of terminals.…

PYQ GATE 2022

Consider the augmented grammar with {+, *, (, ), id} as the set of terminals.

        S′ → S

        S → S + R⏐R

        R → R * P⏐P

        P → (S)⏐id

If I0 is the set of two LR(0) items {[S′ → S.], [S → S. + R]}, then goto(closure(I0), +) contains exactly ________ items.

Attempted by 152 students.

Sign up free to check your answer

Sign up free

Explore the full course: Compiler Design

Loading lesson…