91 views

Show that the following grammar

• $S\rightarrow Aa\mid bAc\mid Bc\mid bBa$
• $A\rightarrow d$
• $B\rightarrow d$

is LR(1) but not LALR(1).

| 91 views

From the state diagram we can say that the given grammar is LR(1) but not LALR(1). Moreover if the grammar is LR(1) it may not be LALR(1) always.