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

Re: Keyword list sanity check

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Keyword list sanity check
Date: 2009-04-28 08:57:19
Message-ID: 49F6C4EF.2080807@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-hackers by date

Next:From: Gevik BabakhaniDate: 2009-04-28 12:38:04
Subject: view columns and pg_depend
Previous:From: Greg StarkDate: 2009-04-28 08:49:12
Subject: Re: Keyword list sanity check

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