[antlr-interest] [newbie] Lexer Confusion

UW Student uw.anon at gmail.com
Sat Jul 5 07:49:31 PDT 2008


>> I would really prefer to have a single token.  Is it possible to 
>> modify Johannes' version to handle that?
 >
> Try this:
> 
> TERM1: '.' ( ('.')=> '.' {$type = TERM2;} )* ;

Will that ensure that the number of DOTs consumed is even?  If I 
understand correctly, it will simply catch any sequence of more than one 
DOT.

-Andrew


More information about the antlr-interest mailing list