[antlr-interest] SQL string literals

Balvinder Singh bals1978 at hotmail.com
Fri May 31 04:58:00 PDT 2002




STRING
     : '"'! (~('"')|(options( {greedy=false;}):'"''"'!)* ) '"'!
     ;


>From: Pete Forman <pete.forman at westerngeco.com>
>Reply-To: antlr-interest at yahoogroups.com
>To: antlr-interest at yahoogroups.com
>Subject: Re: [antlr-interest] SQL string literals
>Date: Fri, 31 May 2002 11:38:53 +0100
>
>At 2002-05-31 14:41 +0530, Balvinder Singh wrote:
> >This is due to greedy apporach of lexer, it consumes " in loop.
> >
> >use the following :
> >
> >STRING
> >     : '"'! ( options { greedy=false; } (~('"')|'"''"'!)* ) '"'!
> >     ;
>
>That does not help, even after putting in the colon after the brace.
>
>sql.g:4:10: warning:Being nongreedy only makes sense for (...)+ and (...)*
>sql.g:4: warning: lexical nondeterminism upon
>sql.g:4:        k==1:'"'
>sql.g:4:        between alt 2 and exit branch of block
>
>--
>Pete Forman                -./\.-  Disclaimer: This post is originated
>WesternGeco                  -./\.-   by myself and does not represent
>pete.forman at westerngeco.com    -./\.-   opinion of Schlumberger, Baker
>http://petef.port5.com           -./\.-   Hughes or their divisions.
>
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>




_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


 

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



More information about the antlr-interest mailing list