[antlr-interest] Problems with lexing tokens containing blanks

Terence Parr parrt at cs.usfca.edu
Wed Nov 29 12:22:40 PST 2006


On Nov 29, 2006, at 8:44 AM, Bernd Vogt wrote:

> Hi all,
>
> in my current project I have the requirement to lex some tokens  
> like this:
>
> lexer grammar ExampleLexer;
>> INDEX : 'index' ;
> INDEX_OF : 'index of' ;
> INT : '0' | '1'..'9' '0'..'9'* ;

Hi, try putting

INDEX_OF : 'index of' ;

before INDEX.

Ter



More information about the antlr-interest mailing list