The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x

ME_Test [closed]

0 votes
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
asked in Compiler Design by Boss (24.6k points)
closed by | 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

@Ayush Upadhyaya

what is the final answer? Is it 5?

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

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,541 questions
54,083 answers
187,208 comments
70,992 users