• retagged by
771 views

1 Answer

2 2 votes

After some googling, I found this grammar to be LL(1) but not LALR

S -> (X | E] | F)
X -> E) | F]
E -> A
F -> A
A -> ε

LALR fails because there is reduce reduce conflicts in E and F productions.

With LL(1), decision is made based on the FIRST set of alternatives where ')' and ']' falls in different set of alternatives.

Credits: stackoverflow

Position:
Show:

Related questions

0 0 votes
1 1 answer
942
942 views
GateAspirant999 asked Dec 10, 2016
942 views
$S\rightarrow (x$$\text{ }| E]$$\text{ }| F)$$X\rightarrow E)$$\text{ }| F]$$E\rightarrow A$$F\rightarrow A$$A\rightarrow \lambda$
1 1 vote
1 answers 1 answer
596
596 views
learner_geek asked Aug 2, 2017
596 views
is this given diagram correct or incorrect if incorrect then please correct it .
2 2 votes
2 answers 2 answers
4.2k
4.2k views
sripo asked Nov 10, 2018
4,204 views
Can you give an example which is not LL(1) but is CLR(1)
0 0 votes
3 answers 3 answers
2.4k
2.4k views
Parshu gate asked Dec 5, 2017
2,381 views
Why isn't it LL(1) ?