2,380 views

3 Answers

Best answer
5 votes
5 votes

1.   E'->.E

      E->.E+T / .T

      T-> .i

2. on shift E :

    E'->E. , E->E.+T  -  There is no conflict because E'->E. is like as E'->E.$, it is not recuding, it shows it is the end.

And there is no other conflict

So, It is LR(0)

selected by
2 votes
2 votes

It is SLR grammar. Shift reduce conflict there but reduce reduce conflict will not be there if we derive it.

 S'-->E.  ,  E--> E. + T contains SR conflict.So, it is SLR.

edited by
0 votes
0 votes
I think it is LR(0).

Related questions

2 votes
2 votes
0 answers
1
rahul sharma 5 asked Oct 14, 2017
1,534 views
Consider the following grammer:-Stmts - Stmt | Stmts;StmtStmt - Var =EVar ->id[E] | idE- id | (E)Find the number of conflicts in LR(0)?
8 votes
8 votes
3 answers
3
Parshu gate asked Nov 13, 2017
15,460 views
Suppose we are given a grammar and asked to find the type of that grammar , what is the algorithm which needs to be followed for each of them? LL(1), OR LR(0) , OR CLR(1...