Dump bison

Eric S. Raymond esr at thyrsus.com
Fri Jun 22 18:24:54 UTC 2018


Hal Murray <hmurray at megapathdsl.net>:
> 
> esr at thyrsus.com said:
> > If we had introspection in the target language we would automatically get the
> > entire parse structure when we dumped each syntax tree, rather than an ad-hoc
> > representation that's mostly leaf nodes.  We would also get things like
> > dumping the composed filter blocks from multiple restrictions rather than
> > each partial specification. 
> 
> I'm not on the right wavelength.
> 
> Do you want to test the parser, or the restriction setup/lookup routines?

My goal was a visualization of the control structures the rest of the daemon
sees - so, as far inside and as digested as possible (this is what the code
I deleted was aiming at, I think).

> My proposal of "just" print out the info from the leaf node callout routines 
> only checks the parser.  It's not hard to implement.  If you were working in 
> that area, it would be reassuring that you hadn't broken anything.

It...never actually occurred to me that we might be worried about the parsing
*itself.*  Duh.  Blind spot on my part, I guess I'm just too used to Yacc/Lex
parsers Just Working.

I think, though, that if we did the "deep" visualization we'd get a
check on almost all of the parser as a side effect.  Restriction
blocks might be the only exception.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.




More information about the devel mailing list