The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
171 views

 

grammar is CLR(1) or not?

if yes then how?

 

asked in Compiler Design by (415 points) | 171 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).

3 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.
answered by (141 points)
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)
answered by Loyal (5.5k points)
0 votes
Yes , Grammar is CLR(1) as there is no conflict (SR , RR).
answered by (113 points)

Related questions

0 votes
3 answers
5
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
49,541 questions
54,080 answers
187,200 comments
70,990 users