148 views

### 1 comment

$follow (A)=follow(S)$

$follow (S)=first (A)$

$first(A)=(a,\epsilon)$

replace the production $S\rightarrow bSA$ with $\epsilon$ we get $S\rightarrow bS, follow(S)=(\$,a)$## 1 Answer  Non terminals First Follow$S\left \{ a,b \right \}\left \{ \$,a \right \}$ $A$ $\left \{ a,\epsilon \right \}$ $\left \{\$ ,a \right \}$Now the predictive parsing table :-  Non terminals$ab\ $S$ $S\to aS$ $S\to bSA$ $A$ $A\to a$ $A\to \epsilon$ $A\to \epsilon$

So for $M[A,a]$ we have two entries

$A\to a$

$A\to \epsilon$ .