bison-patches
[Top][All Lists]
Advanced

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

Re: user destructor for unresolved GLR semantic value


From: Joel E. Denny
Subject: Re: user destructor for unresolved GLR semantic value
Date: Thu, 25 Aug 2005 11:01:30 -0400 (EDT)

On Wed, 24 Aug 2005, Paul Eggert wrote:

> Thanks for diagnosing the problem and providing a patch.  I installed
> the following somewhat-different patch to glr.c, along with your test
> case; does it work for you?

<snip>

> -      yydestruct ("Error: popping",
> -               yystos[yys->yylrState],
> -               &yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[);
> +      if (yys->yyresolved)
> +     yydestruct ("Error: popping",
> +                 yystos[yys->yylrState],
> +                 &yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[);

This approach is much easier, but it drops some diagnostic messages.  I
thought trying to invoke YY_SYMBOL_PRINT() would be worthwhile.

Joel





reply via email to

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