1.3k views

Consider the following grammar:

$S\rightarrow FR$

$R\rightarrow * S\mid \varepsilon$

$F\rightarrow id$

In the predictive parser table, M, of the grammar the entries M[S,id] and M[R,\$] respectively are 1.$ \left \{ S\rightarrow FR \right \} $and$ \left \{ R\rightarrow \varepsilon \right \} $2.$ \left \{ S\rightarrow FR \right \} $and$ \left \{ \right \} $3.$ \left \{ S\rightarrow FR \right \} $and$ \left \{ R\rightarrow {*}S\right \} $4.$ \left \{ F\rightarrow id \right \} $and$ \left \{ R\rightarrow \varepsilon \right \} $asked edited | 1.3k views ## 3 Answers +18 votes Best answer First$S = \{ id \}$Follow$R = \{ \$\}$

so $M[S,id] = S \rightarrow FR$
$M[S,\$] = R  \rightarrow \epsilon$So ans is A answered by Boss (31.9k points) edited by 0 What is the Follow of S R F ? Please explain how to find follow in this example +5 pls correct me if wrong First Follow S id \$

R      * , ε                   \$F id *$
+1
yes your first and follows are correct.

ans a)
+12

1
2
+1 vote