491 views

2 Answers

Best answer
4 votes
4 votes
In LALR(1) we merge states of CLR(1) if they have same reduction but different lookaheads. So if there is no mergeable states in CLR(1) then it is also  LALR(1).
selected by
0 votes
0 votes

Just to add a few points,

  1. If a grammar is not CLR(1) then it is definitely not LALR(1).
  2. If a grammar is CLR(1), it may or may not be LALR(1) always.

 

Related questions

0 votes
0 votes
1 answer
1
worst_engineer asked Jan 9, 2016
1,389 views
Will not there be 3 SR conflicts in CLR(1) reduction ?In fact their ans also says this :In the state I1 , will it not be SR conflict ?
1 votes
1 votes
2 answers
2
Shubhanshu asked Aug 30, 2017
4,636 views
I am confused in following kinds of Grammar they are;-1) S - AB A - Ba B - Bb B - c2) S - AB A - Ba B - Bb B - Epsilon3) S - AB A - Ba B - Bb...
1 votes
1 votes
4 answers
4
Rahul_Rathod_ asked Jan 21, 2019
3,601 views
grammar is CLR(1) or not?if yes then how?