# Is grammar S→aaab | aab in LL(2) but not SLL(2)?

I'm trying to figure out how to create grammars which are LL(k) and not SLL(i).

Is this grammar LL(2) and not SLL(2)?

$S \to aaab \mid aab$

Where S is a starting symbol. I think it is not SLL:

FIRST$_2$(aaab) is FIRST(aab)

And I think that it's LL(2) and LL(1) too because there are no non-terminal symbols which could cause conflict.

Is it true?

• What have you tried towards checking if your answer is correct? Where did you get stuck? – Raphael Nov 10 '16 at 17:16
• If that's an exercise problem, it's a weird one. Parsing finite languages is trivial. – Raphael Nov 10 '16 at 17:18