Re: Call for objections: revision of keyword classification

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
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 18:25:58
Message-ID: 21036.1005330358@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Thomas Lockhart <lockhart(at)fourpalms(dot)org> writes:
>> BTW, another thing in the back of my mind is that we should try to
>> figure out some way to unify ecpg's SQL grammar with the backend's.
>> Maintaining that thing is an even bigger headache than getting the
>> backend's own parser right.

> That would be nice. Unfortunately that would lead to the main parser
> having the same machinations used in ecpg, with separate subroutine
> calls for *every* production. Yuck.

The thing is that most of the actions in ecpg's grammar could easily be
generated mechanically. My half-baked idea here is some sort of script
that would take the backend grammar, strip out the backend's actions and
replace 'em with mechanically-generated actions that reconstruct the
query string, and finally merge with a small set of hand-maintained
rules that reflect ecpg's distinctive features.

You're quite right that nothing like this will reduce the amount that
maintainers have to know. But I think it could reduce the amount of
tedious, purely mechanical, and error-prone maintenance work that we
have to do to keep various files and lists in sync.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Jacobs 2001-11-09 18:32:11 Re: Possible major bug in PlPython (plus some other ideas)
Previous Message Thomas Lockhart 2001-11-09 18:14:09 Re: Call for objections: revision of keyword classification

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-11-09 18:49:24 Re: Call for objections: revision of keyword classification
Previous Message Thomas Lockhart 2001-11-09 18:14:09 Re: Call for objections: revision of keyword classification