bison-patches
[Top][All Lists]
Advanced

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

FYI: 1.3x: Horrible Gettext Heck


From: Akim Demaille
Subject: FYI: 1.3x: Horrible Gettext Heck
Date: 03 Jan 2002 14:40:20 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * src/files.c, src/files.h (strsuffix): Not static.
        * src/conflicts.c (conflicts_print): Don't consider it is an error
        to have a %expectation violation on a file ending by `plural.y'.
        Eek.

Index: NEWS
===================================================================
RCS file: /cvsroot/bison/bison/NEWS,v
retrieving revision 1.21.2.42
diff -u -u -r1.21.2.42 NEWS
--- NEWS 3 Jan 2002 11:10:50 -0000 1.21.2.42
+++ NEWS 3 Jan 2002 13:36:44 -0000
@@ -3,6 +3,12 @@
 
 Changes in version 1.30j:
 
+* GNU Gettext and %expect
+  GNU Gettext asserts 10 s/r conflicts, but there are 7.  Now that
+  Bison dies on incorrect %expectations, we fear there will be
+  too many bug reports for Gettext, so _for the time being_, %expect
+  does not trigger an error when the input file is named `plural.y'.
+
 Changes in version 1.30i:
 
 * Use of alloca in parsers
Index: src/conflicts.c
===================================================================
RCS file: /cvsroot/bison/bison/src/conflicts.c,v
retrieving revision 1.22.2.31
diff -u -u -r1.22.2.31 conflicts.c
--- src/conflicts.c 22 Dec 2001 14:41:15 -0000 1.22.2.31
+++ src/conflicts.c 3 Jan 2002 13:36:44 -0000
@@ -401,7 +401,14 @@
 
   if (expected_conflicts != -1 && !src_ok)
     {
-      complain_message_count++;
+      /* FIXME: BIG ATTROCIOUS HACK.  For flames, complaints and so
+        on, see Bruno Haible.  GNU Gettext's plural.y's %expect is
+        wrong, and newer Bison reject it.  But then, Bruno will be
+        overwhelmed by bug reports, until a fixed Gettext is
+        released.  So for the 1.3x generation only, we leave a puke
+        puke hack.  */
+      if (!strsuffix (infile, "plural.y"))
+       complain_message_count++;
       fprintf (stderr, ngettext ("expected %d shift/reduce conflict\n",
                                 "expected %d shift/reduce conflicts\n",
                                 expected_conflicts),
Index: src/files.c
===================================================================
RCS file: /cvsroot/bison/bison/src/files.c,v
retrieving revision 1.51.2.13
diff -u -u -r1.51.2.13 files.c
--- src/files.c 27 Nov 2001 18:42:32 -0000 1.51.2.13
+++ src/files.c 3 Jan 2002 13:36:44 -0000
@@ -1,5 +1,6 @@
 /* Open and close files for bison,
-   Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002
+   Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -58,7 +59,7 @@
 | Is SUFFIX ending STRING?  |
 `--------------------------*/
 
-static int
+int
 strsuffix (const char *string, const char *suffix)
 {
   size_t string_len = strlen (string);
Index: src/files.h
===================================================================
RCS file: /cvsroot/bison/bison/src/files.h,v
retrieving revision 1.18.2.4
diff -u -u -r1.18.2.4 files.h
--- src/files.h 24 Sep 2001 15:54:18 -0000 1.18.2.4
+++ src/files.h 3 Jan 2002 13:36:44 -0000
@@ -1,7 +1,5 @@
-#ifndef FILES_H_
-# define FILES_H_
 /* File names and variables for bison,
-   Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
+   Copyright 1984, 1989, 2000, 2002 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -19,6 +17,9 @@
    along with Bison; see the file COPYING.  If not, write to
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+#ifndef FILES_H_
+# define FILES_H_
 
 /* These two should be pathnames for opening the sample parser files.
    When bison is installed, they should be absolute pathnames.



reply via email to

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