For two distinct productions A → α | β of a grammar G, the grammar is LL(1) if…

PYQ UGC NET 2014Modified — slightly modified from the official paper; see the solution

For two distinct productions A → α | β of a grammar G, the grammar is LL(1) if and only if the following conditions hold:

I. FIRST(α) ∩ FIRST(β) contains no terminal symbol.

II. ε ∉ FIRST(α) ∩ FIRST(β).

III. FIRST(α) ∩ FOLLOW(A) = ∅ if ε ∈ FIRST(β); symmetrically, FIRST(β) ∩ FOLLOW(A) = ∅ if ε ∈ FIRST(α).

  1. A.

    I and II

  2. B.

    I and III

  3. C.

    II and III

  4. D.

    I, II and III

Attempted by 244 students.

Sign up free to check your answer

Sign up free

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…