To remove the left recursion
E->E+T|E-T|T
T->T*F|T/F|F
for + and *, I am sure it should be
E->TE'
E'->+TE'|(e) (e) is empty string
T->FT'
T'->*FT'|(e)
but for - or /, I am not sure how to remove left recursion, and I came up with the following one, is it right for - and /? Take an example, for plus, a+b = b+a, but for minus, a - b != b -a. So if we use the following right recursive, do we got the problem like a-b?
E->TE'
E'->+TE'|-TE'|(e)
T->FT'
T'->*FT'|/FT'|(e)
Anyone know compiler explains to me?Thanks in advance.