Repository navigation
Debugging Generated Parsers
Generated parser instrumentation is on by default. Use --no-debug-instrumentation during generation to omit checkpoints, scope events, and value serialization.
Start your existing parser program under the debugger:
ispadbg --purpose matching --purpose ast -b grammar.isc:12 \
--record parser-trace.json -- ./my-parser input.txt
ispadbg --replay parser-trace.jsonPurpose IDs are matching, failure, and ast; failure is the default. The debugger prints selected purposes at startup. Interactive commands include s (step), n (next), f (finish), c (continue), b file:line, p [name], ctx, back, forward, and live. --no-interactive records without pausing. Back and forward inspect recorded snapshots; execution resumes from the live pause.
Run ispadbg-gui for a Tkinter view. Select a parser program and an input string; choose standard input when the program reads stdin. You can step, inspect values, and open or save the same JSON trace format.
C++ generation emits rule/production scopes, match outcomes, captures, source checkpoints, and AST snapshots. Python output uses ispa_debug.py in ispatarget/python; put that directory on PYTHONPATH. Live sessions need POSIX file descriptors. On Windows, use offline replay and help.