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

Lubos Vnuk lubos.vnuk at rts.at
Wed Jan 14 11:46:00 PST 2004


Hi Ron,

How about:

STRING_LITERAL : (STRCHAR)+ ( (' ')+ (STRCHAR)+ )*
;

HTH,
Lubos.

--- In antlr-interest at yahoogroups.com, "Ron Denis" <rdenisus at y...> 
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


 

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