@Sachin Mittal 1 This answer is of different question sir.

Dark Mode

1,784 views

2 votes

Consider the augmented grammar with $\{ +, {\ast}, (,),\text{id} \}$ as the set of terminals.

$S’ \rightarrow S$

$S \rightarrow S + R\; |\; R$

$R \rightarrow R {\ast} P \;| \;P$

$P \rightarrow (S)\; |\; \text{id} $

If $I_{0}$ is the set of two $\textit{LR}(0)$ items $\{ [S’ \rightarrow S.], [S \rightarrow S. + R] \}$, then $\textit{goto(closure}(I_{0}), +)$ contains exactly ______________ items.

$S’ \rightarrow S$

$S \rightarrow S + R\; |\; R$

$R \rightarrow R {\ast} P \;| \;P$

$P \rightarrow (S)\; |\; \text{id} $

If $I_{0}$ is the set of two $\textit{LR}(0)$ items $\{ [S’ \rightarrow S.], [S \rightarrow S. + R] \}$, then $\textit{goto(closure}(I_{0}), +)$ contains exactly ______________ items.