bison-patches
[Top][All Lists]
Advanced

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

Re: <reductions>


From: Akim Demaille
Subject: Re: <reductions>
Date: Sun, 28 Oct 2007 10:24:41 +0100


Can someone explain what was intended by the following code in reduce.c?

  static void
  reduce_print (void)
  {
    if (yacc_flag && nuseless_productions)
      fprintf (stderr, ngettext ("%d rule never reduced\n",
                                 "%d rules never reduced\n",
                                 nuseless_productions),
               nuseless_productions);

That is, why does -y cause Bison to report the count of grammatically
useless rules as "rules never reduced"?  Later in this function, Bison
reports the count again but as "useless rules". Surely this is wrong, but
I'm not sure what was intended.

I might be wrong, but ISTR that that message
was forged by Paul to follow POSIX.  At that time
there was not such emphasis on the fact that there
were both grammar- and parser- useless rules.





reply via email to

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