Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE-CS-2016 (Set 2) | Question 55

Improve Article
Save Article
Like Article
  • Last Updated : 07 Sep, 2021
Improve Article
Save Article
Like Article

Which one of the following grammars is free from left recursion?

z3

(A) A
(B) B
(C) C
(D) D


Answer: (B)

Explanation: Grammar A has direct left recursion because of the production rule: A->Aa.
Grammar C has indirect left recursion because of the production rules:S-> Aa and A->Sc
Grammar D has indirect left recursion because of production rules : A-> Bd and B-> Ae
Grammar B doesn’t have any left recursion (neither direct nor indirect).



Quiz of this Question

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!