retagged by
3,512 views
1 votes
1 votes

 

grammar is CLR(1) or not?

if yes then how?

 

retagged by

4 Answers

Best answer
1 votes
1 votes
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..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

2 votes
2 votes
1 answer
2
sripo asked Nov 10, 2018
3,182 views
Can you give an example which is not LL(1) but is CLR(1)
0 votes
0 votes
2 answers
3
sripo asked Nov 1, 2018
2,292 views
S→(XS→E]S→E)X→E)X→E]E→ϵIs this grammar CLR(1)? The answer says it is but I find a shift reduce conflict for E- epsilon with lookup symbols ),]
8 votes
8 votes
3 answers
4
Parshu gate asked Nov 13, 2017
15,199 views
Suppose we are given a grammar and asked to find the type of that grammar , what is the algorithm which needs to be followed for each of them? LL(1), OR LR(0) , OR CLR(1...