Re: Keyword list sanity check

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Keyword list sanity check
Date: 2009-04-30 11:41:12
Message-ID: 603c8f070904300441v63eca91cv4ef0845fdda011a7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 30, 2009 at 3:27 AM, David Fetter <david(at)fetter(dot)org> wrote:
> On Tue, Apr 28, 2009 at 11:33:28AM +0300, Heikki Linnakangas wrote:
>> I wrote a little perl script to perform a basic sanity check to
>> keywords  in gram.y and kwlist.h. It checks that all lists are in
>> alphabetical  order, all keywords present in gram.y are listed in
>> kwlist.h in the  right category, and conversely that all keywords
>> listed in kwlist.h are  listed in gram.y.
>>
>> It found one minor issue already:
>>
>> $ perl src/tools/check_keywords.pl 'SCHEMA' after 'SERVER' in
>> unreserved_keyword list is misplaced
>>
>> SERVER is not in the right place in gram.y, it should go between
>> SERIALIZABLE and SERVER. I'll fix that.
>>
>> I'll put this into src/tools. It's heavily dependent on the format
>> of  the lists in gram.y and kwlist.h but if it bitrots due to
>> changes in  those files, we can either fix it or just remove it if
>> it's not deemed  useful anymore.
>
> Please clean up this code at least to the point where it's
> strict-clean, which means putting "use strict;" right after the
> shebang line and not checking it in until it runs that way.

And "use warnings;", too.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Blewett 2009-04-30 12:10:03 Re: Python 3.0 does not work with PL/Python
Previous Message Heikki Linnakangas 2009-04-30 10:30:02 Re: Keyword list sanity check