From: Akim Demaille Date: Thu, 3 Jan 2002 13:39:20 +0000 (+0000) Subject: * src/files.c, src/files.h (strsuffix): Not static. X-Git-Tag: BISON-1_30j~14 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/ffc03584ad0402bcbc68a6e90d0593d52aaf4add * 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. --- diff --git a/ChangeLog b/ChangeLog index 37cdee28..2ba98e39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-01-03 Akim Demaille + + * 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. + 2002-01-03 Akim Demaille * tests/bison.in: Adjust to CVS Autoconf. diff --git a/NEWS b/NEWS index 35bd1d02..c5dc1fce 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,12 @@ Bison News 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 diff --git a/src/conflicts.c b/src/conflicts.c index 21c1f11c..03fca121 100644 --- a/src/conflicts.c +++ b/src/conflicts.c @@ -401,7 +401,14 @@ conflicts_print (void) 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), diff --git a/src/files.c b/src/files.c index f6f3c2f7..8dcf357f 100644 --- a/src/files.c +++ b/src/files.c @@ -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 @@ const char *header_extension = NULL; | Is SUFFIX ending STRING? | `--------------------------*/ -static int +int strsuffix (const char *string, const char *suffix) { size_t string_len = strlen (string); diff --git a/src/files.h b/src/files.h index fa99d6aa..b4a09537 100644 --- a/src/files.h +++ b/src/files.h @@ -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. @@ -20,6 +18,9 @@ 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. XPFILE1 and XPFILE2 normally come from config.h. */