in Compiler Design edited by
3,166 views
0 votes
0 votes

Consider an $\varepsilon$-tree CFG. If for every pair of productions $A\rightarrow u$ and $A\rightarrow v$

  1. If $\text{FIRST(u)} \cap \text{FIRST(v)}$ is empty then the CFG has to be $LL(1).$
  2. If the CFG is $LL(1)$ then $\text{FIRST(u)} \cap \text{FIRST(v)}$ has to be empty.
  3. Both $(A)$ and $(B)$
  4. None of the above
in Compiler Design edited by
by
3.2k views

1 comment

what if u and v are terminals?
0
0

1 Answer

1 vote
1 vote
FIRST(u) ∩ FIRST(v) is empty iff the CFG has to be LL(1).

Hence Option C should be correct.
by
Answer:

Related questions