help-bison
[Top][All Lists]
Advanced

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

Debugging Bison Under Windows


From: Bob Smith
Subject: Debugging Bison Under Windows
Date: Wed, 25 Oct 2006 23:24:52 -0400
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

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 - address@hidden - http://www.sudleyplace.com

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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