http://dickgrune.com/Books/PTAPG_1st_Edition/BookBody.pdfThe book by Grune and Jacobs presents an example of a grammar that is $LL(K + 1)$ but not $LL(K)$The example is $S -> a^kb/a^ka$The grammar of this type is $LL(K + 1)$ but not $LL(K)$.I have an example based on the grammar shown. Is this also $LL(2)$ ?$S-> cca/ccb$ Based on the information above, I just want to confirm that is this grammar also $LL(2)$ but not $LL(1)$ ?
Is the given grammar LL(2)?
automata;formal grammars;compilers;parsers
It is neither LL(2) nor LL(1). Read the Grune and Jacobs argument carefully. What is the k in this example? If the first two characters of the input are cc, would you know which production to apply? So how can it be LL(2)? 