[antlr-interest] Re: Match until "<@"

praveen_c praveen_c at yahoo.com
Wed May 8 15:24:40 PDT 2002


Monty,

Wow that response was quick! Thanks for the reply. But I donot wan't 
the "<@" piece to be included in the current token. This should be 
part of another token. Should I use !"<@" then?

Thanks again,
Praveen.

--- In antlr-interest at y..., mzukowski at y... wrote:
> 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 y...]
> > Sent: Wednesday, May 08, 2002 1:33 PM
> > To: antlr-interest at y...
> > 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