[Top][All Lists]

[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 00:20:14 -0400 (EDT)

On Wed, 24 Aug 2005, Joel E. Denny wrote:

> It's clear to me now that YYPRINT()'s only purpose is to print the
> semantic value.  If there isn't a semantic value, then there's no point in
> invoking YYPRINT().  Thus, yysymprint() can just check whether yyvaluep is
> NULL to decide whether to invoke YYPRINT().

Sigh....  I suppose this was a moot point.  YYPRINT() is only for tokens.
Token semantic values are never unresolved.

> Index: data/c.m4
> ===================================================================
> RCS file: /cvsroot/bison/bison/data/c.m4,v
> retrieving revision 1.30
> diff -p -u -r1.30 c.m4


> @@ -407,7 +409,7 @@ b4_location_if([  (void) yylocationp;
>  ])dnl
>  [
>  # ifdef YYPRINT
> -  if (yytype < YYNTOKENS)
> +  if (yytype < YYNTOKENS && yyvaluep)
>      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
>  # endif
>    switch (yytype)

So I guess this particular change wasn't necessary, but it seems a little
cleaner anyway.


reply via email to

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