Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2022
Questions

Q19

NAT1 markCompiler design

Consider the augmented grammar with {+,∗,(,),id}\{ +, {\ast}, (,),\text{id} \} as the set of terminals. S′→SS' \rightarrow S S→S+R  ∣  RS \rightarrow S + R\; |\; R R→R∗P  ∣  PR \rightarrow R {\ast} P \;| \;P P→(S)  ∣  idP \rightarrow (S)\; |\; \text{id} If I0I_{0} is the set of two LR(0)\textit{LR}(0) items {[S′→S.],[S→S.+R]}\{ [S' \rightarrow S.], [S \rightarrow S. + R] \}, then goto(closure(I0),+)\textit{goto(closure}(I_{0}), +) contains exactly ______________ items.

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.