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(α).
- A.
I and II
- B.
I and III
- C.
II and III
- D.
I, II and III
Attempted by 244 students.
Sign up free to check your answer
Sign up freeLoading lesson…

