Andrew Dunstan <[EMAIL PROTECTED]> 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

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to