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

GATE · 2016 · CS · Set 2 · Computer Science & IT

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

  1. A.
    S → AB
    A → Aa | b
    B → c
  2. B.
    S → Ab | Bb | c
    A → Bd | ε
    B → e
  3. C.
    S → Aa | B
    A → Bb | Sc | ε
    B → d
  4. D.
    S → Aa | Bb | c
    A → Bd | ε
    B → Ae | ε

Attempted by 474 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…