I would like to learn how to solve transferring grammar to LL(1). I have following problem:
E -> E + E
E -> E * E
E -> E[ E ]
E -> int
E -> id
Regarding operators '+' and '*' I know the solution:
E -> TA
A -> + TA
A -> epsilon
T -> FB
B -> * FB
B -> epsilon
the problem is what to do with indexing operator while in the same time we have to avoid left recursion?
Does anybody know the solution?
Thanks.