Dump bison

John D. Bell jdb at systemsartisans.com
Fri Jun 22 23:24:07 UTC 2018


Gentlemen,


    *Years* ago I used to use yacc, but I quit before bison became the
_de-facto_ standard.  Thus, upon reading its man page I was surprised
and pleased to see the following command-line options available:

  --debug

  --report=THINGS

THINGS comes from the set of 'state', 'itemset', 'lookahead', 'solved'
(shift/reduce conflicts), or 'all'


    Does any of this help?



  - *John D. Bell*



On 06/22/2018 02:24 PM, Eric S. Raymond via devel wrote:
> 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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20180622/a70ada9c/attachment.html>


More information about the devel mailing list