[antlr-interest] Match until "<@"

mzukowski at yci.com mzukowski at yci.com
Wed May 8 13:42:36 PDT 2002


You are asking it to match until it doesn't see "<@".  How about:

MULTI_LINE_TEXT: ( options { greedy=false; } : .)* "<@";

Monty

> -----Original Message-----
> From: praveen_c [mailto:praveen_c at yahoo.com]
> Sent: Wednesday, May 08, 2002 1:33 PM
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] Match until "<@"
> 
> 
> Hi all,
> 
> Just wondering what is wrong with the following Lexer rule. I'm 
> trying to match all characters until reach the combination "<@" 
> including white space, new lines...everything.
> 
> MULTI_LINE_TEXT: ( options { greedy=false; } : .)* (~("<@"));
> 
> It gives me wierd errors. Is this the right way to specify when I 
> want to have something matched until I see a combination. If you 
> think there is a better way, please let me know.
> 
> Thanks in advance for any help,
> Praveen.
> 
> 
> 
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/ 
> 
> 
> 

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list