1,058 views
2 votes
2 votes

Whether followingis SLR(1) or Not ?

E->E+T/T

T->TF/F

F->F*/a/b

Doubt : While making state you will get one state as I1(E'->E. & E->E.+T ) , is this shift reduce or not ?

if not then while making parsing table for LR(0) what will you put in I1 state .... ( All Shift/Reduce Entry as Accept or not) ?

1 Answer

0 votes
0 votes
it is not a S-R conflict

since the accepting state comes on augmented production(that you added explicitly) therefore in LR(0) table show accepting move under $ and shift move under '+'

Related questions

1 votes
1 votes
2 answers
1
Nishu asked Mar 3, 2016
9,431 views
Consider the following grammer:S- aAb | ScA- d | Sd | SThe above grammer is:a) SLR(1)b) LL(1)c) LR(0)d) none of the above
2 votes
2 votes
1 answer
2
sripo asked Nov 10, 2018
3,252 views
Can you give an example which is not LL(1) but is CLR(1)
0 votes
0 votes
2 answers
3
sripo asked Nov 1, 2018
2,379 views
S→(XS→E]S→E)X→E)X→E]E→ϵIs this grammar CLR(1)? The answer says it is but I find a shift reduce conflict for E- epsilon with lookup symbols ),]
4 votes
4 votes
1 answer
4
Akshay Jindal asked Oct 19, 2015
3,579 views
Do we directly say it is not LL(1) because it is left recursive or do we eliminate the left recursion, create the parsing table and then make a decision.