The Gateway to Computer Science Excellence
0 votes
30 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). 

in Compiler Design by Veteran (54.7k points) | 30 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.

by (293 points)

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
50,648 questions
56,429 answers
195,206 comments
99,914 users