0

This is the grammar I have that is not left recursive. I have to make it LL(1). How do I go about doing this?

S -> Exp eof
Exp -> Term Exp2
Exp2 -> + Term Exp2 | - Term Exp2| e 
Term -> Factor Term2
Term2 ->  * Factor Term2 | / Factor Term2 | e 
Factor -> id | num | Fncall | Aref | (Exp)
Fncall -> id (Arguments)
Aref -> id [Indices]
Arguments -> Exp | Exp, Arguments
Incides -> Exp | Exp, Indices
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user2352335
  • 19
  • 1
  • 2

0 Answers0