[antlr-interest] v3 ignore=WS gone?

Terence Parr parrt at cs.usfca.edu
Tue Feb 20 11:51:35 PST 2007


v3 doesn't have this feature. sorry.
Ter
On Feb 20, 2007, at 5:39 AM, Martin d'Anjou wrote:

> Yes, I have read about HIDDEN and skip(), but that's not what I  
> meant. I meant ignoring whitespace in the lexer rules before the  
> tokens get to the parser: ie how to tell the INCLUDE lexer rule  
> below to ignore whitespace between it's '#include' and  
> QUOTED_STRING tokens:
>
> WS : ' ';
>
> INCLUDE :
>   options { ignore=WS; }
>   '#include' QUOTED_STRING ;
>   ;
>
> QUOTED_STRING :
>   '"' ( 'a'..'z' | 'A'..'Z' | '.' | ... etc. ) '"'
>   ;
>
> Thanks,
> Martin



More information about the antlr-interest mailing list