help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do i use the %printer feature?


From: Akim Demaille
Subject: Re: How do i use the %printer feature?
Date: Sat, 12 Mar 2011 11:24:40 +0100

Le 4 mars 2011 à 08:20, Adam Smalin a écrit :

>> Hi
>> 
>> Did you specify %debug?  Did you set yydebug to true?  You don't get any
>> traces, or just not the ones from the %printer?
>> 
>> Also, pay attention that the traces are sent to stderr, and you're
>> outputting onto stdout, so they will not appear where you expect them.
>> 
>> 
> I am unsure i do see i used the t(race)/debug flag. Would that specify
> %debug and set yydebug to true? (i use bison --report=all -y
> --report-file=conflicts -v -t -d file.y).

It seems that you want to look for %debug in the documentation.

> I am not sure what other traces exist or what is consider a tracer but i do
> get a (trace?) dump when i hit a reduce/reduce error in syntax.

I am referring to the trace generated by the parser (during the parse) when it 
details the actions it performs.  See %debug in the documentation.

> But really, i dont know what i should expect from printer or if it will suit
> my needs. Would it help me debug error handling syntax? Regular syntax is
> done.

I'm not sure I understand what you mean.  %debug and %printer help 
understanding what the parser is doing, right or wrong.  It also helps 
understanding its error handling.  It does not improve the error recovery per 
se, it helps _your_ understanding, which, in turn, might result in improvements 
in your grammar.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]