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

From Gokulakannan Somasundaram
Subject Re: A bug in scan.l
Date
Msg-id 9362e74e0909011910x677020beh90a77f3a36abd1bd@mail.gmail.com
Whole thread Raw
List pgsql-hackers
The previous change should follow with this.

uescape            [uU][eE][sS][cC][aA][pP][eE]{space}*{quote}[^']{quote}

Thanks,
Gokul.

On Wed, Sep 2, 2009 at 7:35 AM, Gokulakannan Somasundaram <gokul007@gmail.com> wrote:
There is a rule like this in scan.l

uescapefail        ("-"|[uU][eE][sS][cC][aA][pP][eE]{whitespace}*"-"|[uU][eE][sS][cC][aA][pP][eE]{whitespace}*{quote}[^']|[uU][eE][sS][cC][aA][pP][eE]{whitespace}*{quote}|[uU][eE][sS][cC][aA][pP][eE]{whitespace}*|[uU][eE][sS][cC][aA][pP]|[uU][eE][sS][cC][aA]|[uU][eE][sS][cC]|[uU][eE][sS]|[uU][eE]|[uU])


I think this should be corrected to


uescapefail        ("-"|[uU][eE][sS][cC][aA][pP][eE]{space}*"-"|[uU][eE][sS][cC][aA][pP][eE]{space}*{quote}[^']|[uU][eE][sS][cC][aA][pP][eE]{space}*{quote}|[uU][eE][sS][cC][aA][pP][eE]{space}*|[uU][eE][sS][cC][aA][pP]|[uU][eE][sS][cC][aA]|[uU][eE][sS][cC]|[uU][eE][sS]|[uU][eE]|[uU])


I have replaced whitespace with space. This has to be done because whitespace allows comments. This would cause conflict between some of the alternatives. I found this, while trying to make this rule work with LL(1). Just thought, it might be useful.

Thanks,
Gokul.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Linux LSB init script
Next
From: Itagaki Takahiro
Date:
Subject: make installcheck is broken in HEAD on mingw