108 views
Consider the below grammar

$S \rightarrow (L) |a\\L \rightarrow L,S|S$

The maximum size of stack required during LL(1) parsing for the input string (a,a) is..?
closed with the note: Poorly Framed Question
closed | 108 views
0
Is this LL(1) grammar.Because there is left recursion.

L -> L.
0
I was wondering that only.

But in solution, they have converted this grammar into Non-left recursive one and then solved it.
0
What is the final grammar after removing left recursion ???
0
It should be this

$S\rightarrow (L)|a\\L \rightarrow SL'\\L' \rightarrow,SL' | \epsilon$
0

what is the final answer? Is it 5?

0
Leave it.Poorly framed question.Grammar itself is not LL(1).

1