Re: Call for objections: revision of keyword classification - Mailing list pgsql-patches

From Tom Lane
Subject Re: Call for objections: revision of keyword classification
Date
Msg-id 18535.1005274131@sss.pgh.pa.us
Whole thread Raw
In response to Re: Call for objections: revision of keyword classification  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Call for objections: revision of keyword classification
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Can we move the keywords out into another file and somehow pull them
> into gram.y with the proper attributes so they get into all the places
> they need to be with little fiddling?

Thinking about that, it seems like it might be nice to have a master
keyword file that contains just keywords and classifications:

    AS        Hard-reserved
    CASE        ColLabel
    ABSOLUTE    TypeFuncId
    BIT        ColId

and make some scripts that generate both keyword.c and the list
productions in gram.y automatically.  (Among other things, we could stop
trusting manual sorting of the keyword.c entries ...)  Peter's
documentation generator would no doubt be a lot happier too --- we
could add indications of SQL92 and SQL99 reserved status to this
master file, for example.

However, right offhand I don't see any equivalent of #include in the
Bison manual, so I'm not sure how the autogenerated list productions
could be included into the hand-maintained part of gram.y.  Thoughts?

            regards, tom lane

PS: no, I'm *not* suggesting we do this during beta.

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Call for objections: revision of keyword classification
Next
From: Tom Lane
Date:
Subject: Re: Patch for Makefile race against current cvs