Consider the following grammar: S→SABC A→aAd|ϵ B→bB|ϵ C→Cc|Be|ϵ
Variables S, A, B, C are non-terminals and a, b, c, d, e are terminals.
What is the number of elements in FOLLOW(S)?
A
2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
4
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
5
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
3
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is C 5 FOLLOW(S) = {a, b, c, e, $}