Re: hint infrastructure setup (v3)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: hint infrastructure setup (v3)
Date: 2004-04-02 16:46:05
Message-ID: 28523.1080924365@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> You *really* don't want to go there. If you want to see what the parser
> is doing you can run "bison -r all" over the grammar and examine the
> .output file. But please, let's not examine the internal states. Talk
> about unmaintainability!

What I was suggesting was that we might be able to extract the "follow
set" from bison's tables, ie, the set of grammar symbols that are legal
next inputs given the current parse state stack. I surely agree that
we don't want code that goes like "if state is N then print message X"
... but the follow set should be stable. One way of describing Fabien's
existing patch is that it's essentially keeping track of the follow set
by hand :-(

> Also, I suspect that bison does a good bit of
> optimisation by way of combining states that removes some of the
> information you might need, but I haven't looked into it closely.

That could be a showstopper if true, but it's all speculation at this
point.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-04-03 01:43:14 Re: hint infrastructure setup (v3)
Previous Message Tom Lane 2004-04-02 16:32:34 Re: hint infrastructure setup (v3)