[antlr-interest] related question: multiple grammars..
Gavin Lambert
antlr at mirality.co.nz
Thu Mar 29 14:00:00 PDT 2007
At 08:41 30/03/2007, Eitan Suez wrote:
>measure returns [Measure value]
> : INT Unit
> {
> $value = new Measure(Integer.parseInt($INT.text),
> $Unit.text);
> }
> ;
>Unit : 'pt' | 'px' | 'em' | 'ex' ;
>INT : ('0'..'9')+ ;
>
>WS : (' '|'\t'|'\n'|'\r'|'\f')+ { $channel=HIDDEN; } ;
Well, that grammar successfully matches both "20px" and "20 px" as
a 'measure' for me.
More information about the antlr-interest
mailing list