[antlr-interest] How to best resolve ambiguity?

Jeff Barnes jbarnesweb at yahoo.com
Fri Dec 30 19:52:33 PST 2005


> Yes, as we define all loops to be greedy.  You may want the warning  
> though as it usually indicates you have weird thing in my language or  
> grammar like, blech, allowing random trailing semicolons and commas  
> like certain unmentioned languages. ;)
 
Yeah, I had to rub my eyes a few times when I compiled this the first time:
 
public class Test
{
    public static void main(String[] args)
    {
        byte[] a = {0,0,0,}
        ;
        ;
        ;
    }
}
 
Regards,
Jeff


More information about the antlr-interest mailing list