[antlr-interest] Re: dummy ambiguity question

Lubos Vnuk lubos.vnuk at rts.at
Mon Jul 7 02:29:06 PDT 2003


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/ 




More information about the antlr-interest mailing list