retagged by
519 views
0 votes
0 votes
Is following grammar LR(1)?

S-> asa | bS |epsilon
retagged by

2 Answers

2 votes
2 votes

This is definitely not LL(1) because FOLLOW(S) and FIRST(S) sets are not disjoint.

It's not LR(1) also as shown in the following snapshot, there is S/R conflict in second state:

1 votes
1 votes
At initial state itself there is shift reduce conflict on lookahead symbol $. Hence not LR(1).

Related questions