GATE | GATE 2017 MOCK II | Question 57
Consider the following CFG
S -> AaAb | Bb
A -> Ô‘
B -> Ô‘
The above grammar is:
(A) Ambiguous
(B) Left recursive
(C) Left factored
(D) None of these
Answer: (C)
Explanation: The grammar is unambiguous (only one parse tree) , not left recursive ( Non-terminal not present in second and third grammar rule) . It is left factored . It is LL(1).
Quiz of this Question
Last Updated :
28 Jun, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...