edited by
352 views
0 votes
0 votes
E -> E+T / T

T -> id

grammar after left recursion is

a) E->T +E / T                   

T ->id

b)E ->T / E + T

T ->id

c) E->E' T

T->+TE' / epsilon

d)E ->TX

X- > +TX / epsilon

Actually it should be option c...with a slight variation that its is actually E -> T E'..the position of E and T is interchanged.in the option..........is that a pproblem???

the answer is given as option D

can someone please help
edited by

1 Answer

2 votes
2 votes
yes answer should be d

reason is simple  they just replaced E' with X

when u eliminate the left recursion u can use any new non terminal symbol it is not neccesary to  have to  be E'

Related questions

0 votes
0 votes
1 answer
1
Sanket_ asked Nov 17, 2016
3,243 views
S->AaAb|BbA->εB->εhow can this grammar be left factored grammar?
1 votes
1 votes
1 answer
3
2 votes
2 votes
2 answers
4
A_i_$_h asked Oct 20, 2017
905 views
Eliminate left recurrsion from $S\rightarrow S0S1S | 01$