Using Bison version 2.3 (Cygwin), I have incorporated the
resulting C
file into a Windows app, however, I'm having trouble
figuring out how
to debug the parser. I've #define YYDEBUG 1, and set
yydebug to 1,
but the output is going to fprintf (stderr, ...) which
doesn't help a
Windows app.
It seems that the formatting and output of the debugging
information
are all bound up into one #define. I want the first part,
but not the
second.
I already have a debugging window for my app defined, so I'd
like to
capture the output and display it in that window (it's a
Listbox).
* I tried AllocConsole () hoping that the stderr output
would go
there, but nothing was displayed.
* I tried redefining yacc.c, and then using -S myyacc.c, but
it
appears to rely upon an external program m4 which didn't
seem to get
called, so the C compiler choked on the m4 stuff. That was
puzzling
as I would think that it would be called for the default
skeleton
(yacc.c).
* I tried defining YYFPRINTF but I couldn't come up with
anything that
worked, mostly because of the variable number of arguments.
I'm sure that you clever people have solved this tricky
problem
before. Any help you can provide is greatly appreciated.
--
____________________________________________________________
___
Bob Smith - bsmith sudleyplace.com - http://www.sudleyplace.com
_______________________________________________
help-bison gnu.org http
://lists.gnu.org/mailman/listinfo/help-bison |