[antlr-interest] Re: dummy ambiguity question

Lloyd Dupont lloyd at galador.net
Mon Jul 7 02:37:07 PDT 2003


simple and elegant, thanks :-)

----- Original Message ----- 
From: "Lubos Vnuk" <lubos.vnuk at rts.at>
To: <antlr-interest at yahoogroups.com>
Sent: Monday, July 07, 2003 7:29 PM
Subject: [antlr-interest] Re: dummy ambiguity question


> Try this one:
>
> class NUMLexer extends Lexer;
> options {
> k = 2;
> }
>
> NUMBER :
>   N ( '.' (N)? )?  (EXPONENT)?
> | '.' N (EXPONENT)?
> | '.' {$setType(DOT);}
> ;
>
> protected EXPONENT : 'e' ( '+' | '-' )? N
> ;
>
> protected N : ( '0' .. '9' )+
> ;
>
>
>
>
> HTH,
> Lubos
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list