I have three grammars:
A → aB | b | CBB
B → aB | ba | Abb
C → aaA | b | Cab
I need to "determine whether [they] are LL grammars by performing a pairwise disjoint test, showing the first sets of each RHS of each nonterminal.
This is what I still have ...
A → aB | b | CBB
first (aB) = a
first (b) = b
first (CBB) = aaA = a
This is what I came across. Am I doing the CBB right? If so, I would say that they intersect and the rule does not pass the test. (Right?)
B → aB | ba | Abb
first (aB) = a
first (ba) = b
first (aBb) = a
They intersect and therefore the rule does not pass the test.
C → aaA | b | Cab
first (aaA) = a
first (b) = b
first (caB) = c
They do not intersect and therefore the rule passes
source share