• retagged by
936 views
0 0 votes
Consider the following grammar:

S --> aPbSQ/a

Q --> tS/ ε

P --> r

 

Is the above grammar SLR(1) ?

1 Answer

1 1 vote
no  it is not SLR(1)

u will get confused only in one state where we get
S->aPbS.Q
Q->.tS/.

here there is reduce move also and shift move on t also....but we will keep this is\n follow of Q which is $ and t(follow of Q=follow of S which is t and $)...
• edited by
Position:
Show:

Related questions

0 0 votes
1 1 answer
2.4k
2.4k views
Souvik33 asked Jan 1, 2023
2,384 views
Let G be any grammar with the following productions:X → X+Y | YY→ Y*Z | ZZ → (X)Z → idIf LR(1) parser is used to parse the above grammar, then total how many look-a-heads...
0 0 votes
3 3 answers
1.5k
1.5k views
ADITYA CHAURASIYA 5 asked Nov 18, 2017
1,517 views
Q9-Consider the following grammar:S → aPbSQ | aQ → t | εP → rThe number of states will reduce when a LALR(1) parse is computed out of CLR(1) parser for the above grammar ...
0 0 votes
2 answers 2 answers
825
825 views
0 0 votes
3 3 answers
2.1k
2.1k views
User007 asked Oct 5, 2016
2,104 views
Consider the following augmented grammar G which is used to build LR (0) parsing table.E' __ EE __ E+T/TT __ T*F/FF >(E)/idThe number of shift reduce conflict in the LR(...