Skip to content
Related Articles

Related Articles

GATE | GATE 2017 MOCK II | Question 57

View Discussion
Improve Article
Save Article
  • Last Updated : 28 Jun, 2021

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!