Dump bison

Hal Murray hmurray at megapathdsl.net
Tue Jun 19 17:46:33 UTC 2018


esr at thyrsus.com said:
> What I think one needs for a test harness is the ability to dump the parse
> tree structure in a textual form.  Changing parser generators won't give us
> that. What really matters is whether our target language has introspection
> capability and dynamic dump code. 

Is there a parse tree?  I thought the parser called out when it had enough 
info to build a chunk of the tree.  I think that chunk is either a final leaf 
node or one level up, a node with several parameters.

My expectation is that we would write a collection of dummy called-out 
routines that printed out the parameters rather than building ntpd's 
equivalent of a chunk of the parse tree.


>> When we ripped that stuff out, why didn't we add something better?
> Because it wasn't actually used in the unit tests anywhere.  I concluded from
> this that it was probably broken and nobody had had the round tuits to fix it
> or remove it. So I removed it. 

There was a script that fed it a config file, wrote it out, and diffed them.  
It wasn't integrated with either the test harness or with waf check, but it 
worked.



-- 
These are my opinions.  I hate spam.





More information about the devel mailing list