Skip site navigation (1) Skip section navigation (2)

Re: Keyword list sanity check

From: David Fetter <david(at)fetter(dot)org>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Keyword list sanity check
Date: 2009-04-28 19:17:20
Message-ID: 20090428191720.GT1539@fetter.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Apr 28, 2009 at 11:57:19AM +0300, Heikki Linnakangas wrote:
> Greg Stark wrote:
>> I had previously considered adding an assertion in the backend to
>> check they're sorted properly. That would be less formatting
>> dependent and  would be only a couple lines of C.
>>
>> I don't think we can do that with the gram.y check though.
>
> Well, the ordering in gram.y is just pro forma anyway. Checking that
> all  keywords are present and correctly labeled in kwlist.h is more
> important. What's still missing is to check that all keywords
> defined  with "%token <keyword>" in gram.y are present in one of the
> keyword lists.
>
> Hmm, it just occurred to me that this script is only a few steps
> away  from actually generating kwlist.h from gram.y, instead of
> merely  cross-checking them.

Single Point of Truth is good :)

Cheers,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2009-04-28 19:41:59
Subject: Re: Building Postgresql under Windows question
Previous:From: Dann CorbitDate: 2009-04-28 19:07:42
Subject: Re: Building Postgresql under Windows question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group