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?

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.