Re: A bug in scan.l - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A bug in scan.l
Date
Msg-id 2751.1251902101@sss.pgh.pa.us
Whole thread Raw
In response to Re: A bug in scan.l  (Gokulakannan Somasundaram <gokul007@gmail.com>)
List pgsql-hackers
Gokulakannan Somasundaram <gokul007@gmail.com> writes:
> Well, i am at a very beginner level with Flex. I could see how flex works
> with it even if it is a ambiguity. Since it matches the rule with the
> maximum text and we don't allow a new line character in the rule, it works
> fine.  Even in LL(1), it works fine, but throws warnings. So i just thought
> of suggesting to remove the ambiguity.

Well, that whole rule is only there for implementation-specific reasons
--- a flex scanner is faster if it doesn't need to back up.  You might
be best off to just remove the anti-backup rules in the LL translation.

> But do we need to allow comments as part of unicode escapes?

If they're like normal strings, yes.

regression=# select 'this is' -- comment
regression-# ' one string';     ?column?      
--------------------this is one string
(1 row)

Don't blame us, blame the SQL committee.  This was not one of their
better ideas IMO.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Linux LSB init script
Next
From: Tom Lane
Date:
Subject: Re: window functions maybe bug