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

Re: Call for objections: revision of keyword classification

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Call for objections: revision of keyword classification
Date: 2001-11-09 06:21:57
Message-ID: 3BEB7605.30DA5F4D@fourpalms.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

In response to

Responses

pgsql-hackers by date

Next:From: Jean-Michel POUREDate: 2001-11-09 06:33:23
Subject: Re: How to optimize a column type change???
Previous:From: Tom LaneDate: 2001-11-09 04:52:28
Subject: Re: Call for objections: revision of keyword classification

pgsql-patches by date

Next:From: Klaus NaumannDate: 2001-11-09 07:48:46
Subject: Re: Patch for Makefile race against current cvs
Previous:From: Tom LaneDate: 2001-11-09 05:07:37
Subject: Re: Enhanced index details using \d in psql

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