>> 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