edited by
612 views
2 votes
2 votes

edited by

3 Answers

1 votes
1 votes
From the first production: A -> BCD : Follow(B) = First(C) = {y,m}                                                        -----(1)

From the second production: B -> w / Bx : Follow(B) = {x}                                                                   ------(2)

From the third production: C -> yCz / m : B is not present here, so it is not of any concern here.        -----(3)

And the last production: D -> DB / a : Follow(B) = Follow(D) = First(B) and Follow(A). = {w,\$}

Hence, from 1, 2, 3 and 4
Follow(B) =  {y,m,x,w,\$}
0 votes
0 votes
$follow(B)=first(C)\cup first(x)\cup follow(D)$

$follow(B)=(y,m)\cup (x)\cup first(B)\cup first(A)$

$follow(B)=(y,m,x,w,\$)$

Option (D) is correct here.

Related questions

2 votes
2 votes
1 answer
1
0 votes
0 votes
2 answers
2
aaru14 asked Nov 22, 2017
285 views
E >TE/aT >ET/bfirst set of E and T??
0 votes
0 votes
1 answer
3
Subhrangsu asked Apr 15, 2022
2,212 views
Compute FIRST and FOLLOW sets:S→ aAC | bBA→ Abc| Abd | eB→ f | gC→ h | i
0 votes
0 votes
1 answer
4