edited by
773 views

3 Answers

2 votes
2 votes
There is a mistake in solution, c is not going to be added as Look-ahead  But the final solution is right .

There are 2 SR conflicts in two different states

First conflicts according to the given solution is in state I-7 which is Sr conflict between E (reduce move) and c (shift move)

same conflict is in I-8 (E---> EcE.,$) (Reduce move )   ( E-->E.cE,$) (shift move on c)
2 votes
2 votes

Solution is absolutely correct.At first I also missed this point but later got it..

In state I0 :

E -> .EcE adds another lookahead c. because of this particular production .I0 will have some other productions as

E->.abE,c

E->.EcE,c

E->.d,c

E->.e,c

and so c is added to $ as lookahead here. 

0 votes
0 votes
Well I made the DFA but i didn't find any conflicts in any state...So the answer should be option d.

Related questions

1 votes
1 votes
2 answers
1
KISHALAY DAS asked Nov 6, 2016
1,021 views
Which states of LR(0) is having conflict..anyone please check
0 votes
0 votes
1 answer
2
sourabh asked Dec 29, 2015
207 views
0 votes
0 votes
1 answer
3
aditi19 asked Mar 25, 2019
1,132 views
Can lookahead symbol be epsilon in LR(1) parsing?andpls give the LR(1) diagram for the following grammar?A->AB | aB->*AC | Cb | ∈C->+ABc | ∈
0 votes
0 votes
1 answer
4
abc1 asked Jan 26, 2019
4,037 views
consider the grammar G: S->A|B A->a|c B->b|c where {S,A,B} are non-terminals,{a,b,c} are terminals.Does LR(1) can parse all strings that are generated by gr...