How about making GDB act as the interface for debugging Bison
grammars?  GDB already has an IDE, through Emacs.

Another idea occurs to me: generate a function for each state, just to
have a place to put a breakpoint corresponding to that state.  Right
now, Bison generates code for each rule, and that's all.  That makes
grammars compact, which is good for ordinary execution.  However,
having a piece of code for each state could facilitate using GDB as
the debugging interface.

The function's source code could hold whatever information you want
to present about that state, for debugging purposes.

By continuing this idea, maybe you could set it up so that any C debugger
is a good debugger for Bison parsers.


Reply via email to