retagged by
456 views
0 votes
0 votes
Consider the following grammar:

S --> aPbSQ/a

Q --> tS/ ε

P --> r

 

Is the above grammar SLR(1) ?
retagged by

1 Answer

1 votes
1 votes
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

Related questions

0 votes
0 votes
2 answers
1