An LL(k) language requires k tokens of lookahead to make a decision. How many do you need to decide what kind of expr you have?
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
It's not LL(1) because there would be difficulty in determine which choice to follow if the next token is say "id", because now you have expr --> id := expr or factor --> ( expr ) | id
I would think for the solution to this, you would want to look into left factoring.
sloan31
Junior Poster in Training
65 posts since Apr 2008
Reputation Points: 14
Solved Threads: 3