I have been given a task to transform this grammar to LL(1)
E → E+E | E-E | E*E | E/E | E^E | -E | (E)| id | num
So for first step I eliminated ambiguity and got this:
E → E+T | E-T | T
T → T*P | T/P | P
P → P ^ F | F
F → id | num | -E | (E)
And after that I have eliminated left-recursion and got this:
E → TE'
E' → +TE' | -TE' | ɛ
T → PT'
T' → *PT' | /PT' | ɛ
P → FP'
P' → ^FP' | ɛ
F → id | num | -E | (E)
When I put this into JFLAP and click 'Build LL(1) parse table' I get warning that grammar above is not LL(1).
Why this grammar is not LL(1), and what do I need to change to be LL(1).