in Compiler Design retagged by
3,516 views
1 vote
1 vote

 

grammar is CLR(1) or not?

if yes then how?

 

in Compiler Design retagged by
3.5k views

1 comment

Yes..the grammar is CLR(1), the only chance of having SR conflict is when you have multiple productions in a state. Only state which have multiple productions apart from start state is the state on transition c from the start state, even in state, SR conflict won't occur. so the grammar is CLR(1).
0
0

4 Answers

1 vote
1 vote
Best answer
yes, grammar is clr(1).

there are no chance RR conflict

but you may think there is SR conflict but they cannot create multiple entry in parsing table so no SR conflict.
selected by
0 votes
0 votes
We can see that one state has SR conflict , but this won't lead to multiple entries in the parsing table.

Thus the grammar is CLR(1)
0 votes
0 votes
Yes , Grammar is CLR(1) as there is no conflict (SR , RR).
0 votes
0 votes
Yes..the grammar is CLR(1),

the only chance of having SR conflict is when you have multiple productions in a state.

Only state which have multiple productions apart from start state is the state on transition c from the start state, even in state, SR conflict won't occur. so the grammar is CLR(1).

Related questions