Open In App
Related Articles

GATE | GATE 2017 MOCK II | Question 57

Improve Article
Save Article
Like Article

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

Level Up Your GATE Prep!
Embark on a transformative journey towards GATE success by choosing Data Science & AI as your second paper choice with our specialized course. If you find yourself lost in the vast landscape of the GATE syllabus, our program is the compass you need.

Last Updated : 28 Jun, 2021
Like Article
Save Article
Similar Reads