[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reentrant issue
From: |
Hans-Bernhard Broeker |
Subject: |
Re: reentrant issue |
Date: |
Mon, 11 Nov 2002 15:31:17 +0100 (MET) |
On Mon, 11 Nov 2002, Danut Lipsa wrote:
> I create a grammar for parsing SQL commands. I cannot use %pointer
> option because of strings containing escaped quotes. I need to use
> %array option in case input Sql contains strings, which have an
> escaped quote in them eg.
> Select * from table1 where book = 'Lee''s book'.
> In this case I'm trying to peek and check if the single quote is
> closing quote for the string or a part of the string. This cannot be
> achieved if I use the %pointer option.
What makes you think so? The %pointer option doesn't collide with any of
the usual methods of achieving such "pre-filtering" steps I know of. A
tiny little bit of stateful lexing should be all this takes. I.e. have a
special rule that matches '' and is only active inside a string constant,
and have that rule leave a single quote for yymore() to store in yytext.
--
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.