edited by
1,005 views
2 votes
2 votes
Compute the FOLLOW set of $S$ for the following CFG :

$S\rightarrow SPQR$

$P\rightarrow pPt/ \epsilon$

$Q\rightarrow qQ/\epsilon$

$R\rightarrow Rr/Qm/\epsilon $
edited by

1 Answer

1 votes
1 votes
follow of S=first of (PQR)={p,q,r,m,$} this should be the answer no problem in that follow of start symbol is always $ and take union of first of PQR and $ u get the answer

 

here S is useless symbol no first of S
edited by

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
2
Pavan Karthik asked Oct 28, 2018
424 views
#CDcompute first and follow forS->SS+\SS*\a
0 votes
0 votes
1 answer
3
Subhrangsu asked Apr 15, 2022
2,022 views
Compute FIRST and FOLLOW sets:S→ aAC | bBA→ Abc| Abd | eB→ f | gC→ h | i