help-bison
[Top][All Lists]
Advanced

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

Dumping the parse tree of a GLR parser


From: Kelly Leahy
Subject: Dumping the parse tree of a GLR parser
Date: Mon, 13 Dec 2004 20:57:22 -0800 (PST)

I'm using a GLR parser, and I see that when there is
an ambiguity during parsing that is not resolved by
precedence or merging rules, it is printed to the
output (when YYDEBUG is enabled with yydebug != 0)
using the function yyreportTree(...).

Is there some way I can call yyreportTree in my
top-level rule (start production for my grammar) to
dump the tree myself, or is that information no longer
available once the stacks have been merged back into a
single stack?

I would really like to be able to see this information
for debugging purposes, even when the parse was
unambiguous, but every attempt I've made at trying to
call this function results in a bus error because I'm
sure I haven't figured out which expression to use for
the first argument.

Thanks,
Kelly




reply via email to

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