Re: hint infrastructure setup (v3) - Mailing list pgsql-patches

From Tom Lane
Subject Re: hint infrastructure setup (v3)
Date
Msg-id 28523.1080924365@sss.pgh.pa.us
Whole thread Raw
In response to Re: hint infrastructure setup (v3)  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: hint infrastructure setup (v3)
List pgsql-patches
Andrew Dunstan <andrew@dunslane.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

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: hint infrastructure setup (v3)
Next
From: Bruce Momjian
Date:
Subject: Re: hint infrastructure setup (v3)