jazzyfresh/koan-lang

Use Lookaheads to fix warnings in SyntaxChecker

Closed this issue · 1 comments

We have 19 of these warnings when we javacc koan.jj:

Warning: Choice conflict involving two expansions at
         line 41, column 7 and line 45, column 7 respectively.
         A common prefix is: <CHARLIT> <CHARLIT>
         Consider using a lookahead of 3 or more for earlier expansion.

Let's get them resolved by learning what Lookaheads are and applying them to our syntax checker.

The latest commit/push fixed all the warnings that could be satiated with token lookaheads. The remaining warnings require either syntactic or semantic lookaheads. Most of these warnings spawn from the EXP functions, ID(), and anything with the optional "*".