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

From Thomas Lockhart
Subject Re: Call for objections: revision of keyword classification
Date
Msg-id 3BEB7605.30DA5F4D@fourpalms.org
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
...
> Thinking about that, it seems like it might be nice to have a master
> keyword file that contains just keywords and classifications:
...
> 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.

istm that we would have a better time using gram.y as the definitive
source for this list. Trying to stuff gram.y from some other source file
moves the information another step away from bison, which is the
definitive arbiter of correct behavior and syntax. Complaints that
things are too hard to figure out won't get better by having more
indirection in the process, and no matter how we do it one will still
need to understand the relationships between tokens and productions.

We could have a perl script (haven't looked; maybe Peter's utility
already does this?) which rummages through gram.y and generates
keyword.c. And if we wanted to categorize what we implement wrt SQL9x
definitions, we should do a join from lists in SQL9x against our
keywords, rather than trying to maintain that relationship manually. We
could even find some database to do it for us ;)

                           - Thomas

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Enhanced index details using \d in psql
Next
From: Klaus Naumann
Date:
Subject: Re: Patch for Makefile race against current cvs