[antlr-interest] Allowing Space characters in string literals under certain circumstances

Matt Benson gudnabrsam at yahoo.com
Wed Jan 14 09:29:29 PST 2004


IIRC, the usual advice here is to switch lexers or
lexer states...

-Matt

--- Ron Denis <rdenisus at yahoo.com> wrote:
> I need the ability to allow space characters inside
> a string literal (not at
> the beginning or end of the literal, only
> internally).  But I need to ignore
> the space as simply whitespace otherwise.
> 
>  
> 
> So, I need to be able to parse:
> 
>  
> 
> = Ron Denis
> 
>  
> 
> But the space before Ron and any spaces after Denis
> are ignored but the
> space between Ron and Denis is part of the string
> literal.  So the token
> will be "Ron Denis".
> 
>  
> 
> Is this possible?
> 
>  
> 
> Ron Denis
> 
> Systems Architect
> 
> FEI.Com
> 
>  
> 
> > BEGIN:VCARD
> VERSION:2.1
> N:Denis;Ron
> FN:rdenisus at yahoo.com
> ORG:Independant Consultant
> TITLE:Systems Architect
> TEL;WORK;VOICE:(410) 712-0590 x26
> TEL;HOME;VOICE:(717) 235-0415
> TEL;CELL;VOICE:(717) 515-5769
> EMAIL;PREF;INTERNET:rdenisus at yahoo.com
> REV:20031215T193956Z
> END:VCARD
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/antlr-interest/

To unsubscribe from this group, send an email to:
 antlr-interest-unsubscribe at yahoogroups.com

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




More information about the antlr-interest mailing list