in Compiler Design retagged by
3,723 views
2 votes
2 votes

is it correct please tell me its urgent!

in Compiler Design retagged by
3.7k views

3 Comments

why you extented your dfa..

in first canonical set itself there was RR conflict(A--->epsilon B--->epsilon).., there itself you can say that it is not LR(0)...

one more thing, A---> .epsilon, is itself reduce move, so you need not take transition on it.

3
3
Had it been just one epsilon move(say we dont have B-> epsiln), then will there be any SR conflict in state 1?
0
0
in the initial state itself we can justify that its not LR(0) BECAUSE it contain RR-conflict
0
0

2 Answers

2 votes
2 votes

yes...correct

given grammar is not LR(0).....due to RR conflict....

and u need not to go to other state.....A->.eps  can be also be written as A->.  

means in the  beginning conflict occurs....

1 comment

In 1st and second productions I.e,

S ->AaAb

S->BbBA

If we try to construct LR(0) parsing table entries going to be same cell I.e, {a,b} intersection {b} =b  so there is RR conflict so it is not LR(0).
0
0
0 votes
0 votes
Given grammer is not LR(0). Clearly mentioned that grammar has  reduce reduce conflict for the rule

A--> epsilon and B---> epsilon

Related questions