[antlr-interest] Failure on OpenJDK on Debian

Gavin Lambert antlr at mirality.co.nz
Wed Apr 1 05:37:01 PDT 2009


At 00:02 2/04/2009, Sam Barnett-Cormack wrote:
 >However, k=*, it'll do whatever lookahead is needed, so there
 >isn't actually an ambiguity with LL(*). It would be silly to
 >left-factor, say:
 >
 >EVERY : 'every';
 >EACH : 'each';
 >EVENT : 'event';
 >
 >Because it just makes it unreadable. ANTLR knows what to do with 

 >this, so why left-factor? You'll end up with equivalent decision 

 >making, even.

Right, which is why those aren't the problem -- they can always be 
resolved with static lookahead, so they shouldn't take long to 
figure out.

Where you can get into trouble is when there's a common left 
prefix involving a loop -- such as the INT vs FLOAT vs RANGE case.



More information about the antlr-interest mailing list