A bug in scan.l

From: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>
To: pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: A bug in scan.l
Date: 2009-09-02 02:05:44
Message-ID: 9362e74e0909011905l3a405ad0la2b1449be5852a0f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gokulakannan Somasundaram 2009-09-02 02:10:40 Re: A bug in scan.l
Previous Message Tom Lane 2009-09-02 01:43:37 Re: Linux LSB init script