Open In App
Related Articles

GATE | GATE 2017 MOCK II | Question 57

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report
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
Previous
Next
Share your thoughts in the comments
Similar Reads