in Compiler Design
536 views
0 votes
0 votes

For given production for a LR(1) grammar

B->b.C ,$|c



 here C is non terminal



C->c. ,$|c



   and here c is terminal. $|c are lookup symbols



Will there be a shift reduce conflict if a non terminal is visited.Please explain how shift reduce conflict works

in Compiler Design
by
536 views

1 Answer

0 votes
0 votes
Upon seeing a look ahead, if a production has a two different moves for same terminal then its a conflict.

If a state, after seeing a look ahead, points to another non final state, then its Shift move. If it points to final state, then its a reduce move. And if both takes place, then it's a SR conflict.

Now, in given question,

no such condition occurs, hence it's conflict free grammer, neither SR nor RR.

Related questions