help-bison
[Top][All Lists]
Advanced

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

Re: Dumping the parse tree of a GLR parser


From: Hans Aberg
Subject: Re: Dumping the parse tree of a GLR parser
Date: Tue, 14 Dec 2004 18:56:55 +0100
User-agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6

 At 20:57 -0800 2004/12/13, Kelly Leahy wrote:
>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?

If you do not get a better answer from somebody else, my guess is that the
GLR parser only holds what is available the minimum required for the
parsing, i.e., once a branch has expired, that info is not longer available.
So if I am right on this, you will have to build your own parse trees, just
as in the case of the   deterministic parser. You might attempt to modify
the skeleton file.

  Hans Aberg






reply via email to

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