retagged by
1,511 views

1 Answer

Best answer
3 votes
3 votes

First(P)={id}                                            Follow(P)={$}

First(S)={id}                                            Follow(S)={ $}

First(A)={id}                                            Follow(A)={ ; , $}

First(E)={  ( , id ,num }                           Follow(E)={ + , - , * , / , ) , ; , $ }

First(T) ={id , num}                                 Follow(T)={ + , - , * , / , ) , ; , $ }

edited by

Related questions

0 votes
0 votes
1 answer
2
Subhrangsu asked Apr 15, 2022
2,188 views
Compute FIRST and FOLLOW sets:S→ aAC | bBA→ Abc| Abd | eB→ f | gC→ h | i
0 votes
0 votes
1 answer
3
saumya mishra asked Jun 3, 2018
3,251 views
Find first and follow of the given grammar?S->ABA->BS/a/€B->AS/b
2 votes
2 votes
2 answers
4
Abhishek Malik asked Apr 5, 2018
869 views
Find First and Follow in the following grammar.$E\rightarrow E+T \mid T$$T\rightarrow TF \mid F$$F\rightarrow F^* \mid a \mid b$