Log In
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
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
0 votes
Given a LR grammar {S->A|B, A->Aa|epsilon, B->Bb|Sc|epsilon} can I solve it in following way?
1) S->A|Bb|Sc|epsilon (Placing B’s productions in S)
=> AS' | BbS' | epsilon & S'->cS' | epsilon
2) A->A' & A'->aA' | epsilon
3)B->ScB' | B' & B'->bB' | epsilon
in Compiler Design 5 points 13 views

1 Answer

1 vote


For LL(1) You have to check by using First and Follow method.

For LR(0) and SLR(1) you have to do augmented transition method, and then by making state transition diagram, you have to look where Shift-Reduce and Reduce Reduce conflicts are present and according to that you've to eliminate the parser….

For LR(1) items such as CLR(1), LALR(1) you've to do again state transition diagram again using Look-Ahead....











633 points