[antlr-interest] beta6, alternation produces non compiling code.

Johannes Luber jaluber at gmx.de
Wed Feb 28 03:06:11 PST 2007


Hello!

I'm wondering myself, if I miss something, but

> Grammar list;
> 
> list : ELEM (COMMA ELEM)* ;
> 
> COMMA : ',' ;
> ELEM : 'a'..'z' | 'A'..'Z'  ;

doesn't look different to me than

> list.g:
> ------
> grammar list;
> list : elem (',' elem)* ;
> elem : 'a'..'z'|'A'..'Z' ;
> ------

(unless you count the COMMA). Why doesn't work the latter?

Best regards,
Johannes Luber



More information about the antlr-interest mailing list