The Gateway to Computer Science Excellence
0 votes
628 views

 

grammar is CLR(1) or not?

if yes then how?

 

in Compiler Design by | 628 views
0
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).

4 Answers

0 votes
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.
by
selected by
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)
by
0 votes
Yes , Grammar is CLR(1) as there is no conflict (SR , RR).
by
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).
by

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,345 questions
60,483 answers
201,810 comments
95,288 users