edited by
497 views

2 Answers

0 votes
0 votes
follow(S) = first(P)

first(P) = {p, ϵ}

follow(S) = {p, $} since first(P) contains ϵ so, follow(S) will also contain first(Q).

So, first(Q) = {q, ϵ}

follow(Q) = (p, q, $) and first(Q) contains ϵ so, follow(S) will also contain first(R).

first(R) = {q, r, m, ϵ}

follow(S) = {p, q, r, m, $}.

S is start symbol so $ will also be in follow(S)

So, the correct answer is A.

Related questions

0 votes
0 votes
1 answer
3
Na462 asked Jan 16, 2019
793 views
Which of the Statements are True :S1: LR(1) grammar can be LR(0) but not LL(1).S2 : Every regular language is LL(1)S3 : Three address code is linear representation of Syn...
3 votes
3 votes
1 answer
4