[antlr-interest] Token Boundaries

Arcadio Rubio García arcadiorubiogarcia at gmail.com
Tue Sep 16 09:38:12 PDT 2008


Hi everyone,

what's the way to define tokens so that they take into account word  
boundaries, i.e. "1then" is not accepted as token INT 1 token THEN,  
but rejected.

I know how to do this with a regular expression (using \b, which  
matches word boundaries), but no clue on how to do it succinctly in  
ANTLR.

Thanks in advance.


More information about the antlr-interest mailing list