[antlr-interest] Antlrworks bug?
Johannes Luber
jaluber at gmx.de
Wed Nov 21 03:40:44 PST 2007
Steve Bennett wrote:
> Or maybe I don't understand. The test rig generated by Antlrworks for
> this grammar won't compile:
>
> grammar tiny;
> tiny : ('a'..'z')+;
It's no bug but a feature. ;) Joking aside, you can't do closures with
ranges in parser rules. The correct way is the one below.
> However this will compile:
> grammar tiny;
> L : ('a'..'z');
> tiny : L+;
>
> Using ANTLRworks 1.1.4.
>
> Steve
>
Johannes
More information about the antlr-interest
mailing list