GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 23

Consider the following grammar:

S --> ABC
A --> a | Cb | e
B --> c | dA | e
C --> e | f

Which of the following option is false ?
(A) FOLLOW(C) = {b,$}
(B) FOLLOW(A) = {c,d,e,f}
(C) FOLLOW(B) = {$, f}
(D) FIRST(C) = {e, f}


Answer: (C)

Explanation:

FOLLOW(S) = {$}
FOLLOW(A) = {c,d,e,f}
FOLLOW(B) = {e,f}
FOLLOW(C) = {b,$}

Option (C) is false.

Quiz of this Question



My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.