The Gateway to Computer Science Excellence
0 votes

 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). 

in Compiler Design by | 91 views

1 Answer

0 votes

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.


Related questions

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
52,315 questions
60,432 answers
95,257 users