]> git.saurik.com Git - bison.git/commitdiff
%expext was not functioning at all.
authorAkim Demaille <akim@epita.fr>
Mon, 12 Nov 2001 09:19:48 +0000 (09:19 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 12 Nov 2001 09:19:48 +0000 (09:19 +0000)
* src/conflicts.c (expected_conflicts): Set to -1.
(conflict_report): Use ngettext.
(conflicts_print): Check %expect and make its violation an error.
* doc/bison.texinfo (Expect Decl): Adjust.
* configure.in (AM_GNU_GETTEXT): Ask for ngettext.
* tests/regression.at (%expect not enough, %expect right)
(%expect too much): New.

20 files changed:
ChangeLog
Makefile.in
NEWS
config/Makefile.in
configure
configure.in
doc/Makefile.in
doc/bison.info
doc/bison.info-1
doc/bison.info-3
doc/bison.texinfo
doc/stamp-vti
doc/version.texi
lib/Makefile.in
m4/Makefile.in
src/Makefile.in
src/conflicts.c
src/main.c
tests/Makefile.in
tests/regression.at

index 8db502150713d8c43c93d456f4e983e15b73cd5c..73ff8f636e18a4dc0429a15c604b6d70b72ed3b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2001-11-12  Akim Demaille  <akim@epita.fr>
+
+       %expext was not functioning at all.
+
+       * src/conflicts.c (expected_conflicts): Set to -1.
+       (conflict_report): Use ngettext.
+       (conflicts_print): Check %expect and make its violation an error.
+       * doc/bison.texinfo (Expect Decl): Adjust.
+       * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
+       * tests/regression.at (%expect not enough, %expect right)
+       (%expect too much): New.
+
 2001-11-12  Akim Demaille  <akim@epita.fr>
 
        * tests/regression.at (Conflicts): Rename as...
index 78b1cc105ccfd84116d78424be903935abe1adc6..4a73077a69055fd3db9acfa13f2dc90bf675706d 100644 (file)
@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
 INTLOBJS = @INTLOBJS@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIB = @LIB@
 LIBICONV = @LIBICONV@
-LIBOBJS = @LIBOBJS@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 PACKAGE = @PACKAGE@
diff --git a/NEWS b/NEWS
index fa0ac5eed1389e397e0f41f64b211ddbfcf9646f..308bb492e0eee79a9a6b0b6b0b64ec33ff01f604 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,21 @@ Bison News
 
 Changes in version 1.30b:
 
+* Fixed parser memory leaks.
+  When the generated parser was using malloc to extend its stacks, the
+  previous allocations were not freed.
+
+* Fixed verbose output file.
+  Some newlines were missing.
+  Some conflicts in state descriptions were missing.
+
+* Fixed conflict report.
+  Option -v was needed to get the result.
+
+* %expect
+  Was not used.
+  Mismatches are errors, not warnings.
+
 * Fixed incorrect processing of some invalid input.
 
 * Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H.
index 49072ba4d8f83864efb1ee6098ee473438b2fcc6..99b15f97119a5ecfc5c0d0a46d723e57871d9cfb 100644 (file)
@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
 INTLOBJS = @INTLOBJS@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIB = @LIB@
 LIBICONV = @LIBICONV@
-LIBOBJS = @LIBOBJS@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 PACKAGE = @PACKAGE@
index 77a79e195dce2796eb76feeb32afd95e7eb88b22..23c7b36078d3f6f6db638775a1ba228d8f3b0cbb 100755 (executable)
--- a/configure
+++ b/configure
@@ -15,6 +15,7 @@ else
   as_expr=false
 fi
 
+
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
@@ -60,6 +61,7 @@ fi
     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
       { LC_MESSAGES=C; export LC_MESSAGES; }
 
+
 # Name of the executable.
 as_me=`(basename "$0") 2>/dev/null ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
@@ -93,6 +95,7 @@ if test "${PATH_SEPARATOR+set}" != set; then
   rm -f conftest.sh
 fi
 
+
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
@@ -177,6 +180,7 @@ done
   exit
 }
 
+
 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
   *c*,-n*) ECHO_N= ECHO_C='
 ' ECHO_T='     ' ;;
@@ -216,6 +220,7 @@ as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
 # Sed expression to map a string onto a valid variable name.
 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
 
+
 # IFS
 # We need space, tab and new line, in precisely that order.
 as_nl='
@@ -225,6 +230,7 @@ IFS="       $as_nl"
 # CDPATH.
 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
 
+
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 # so uname gets run too.
@@ -284,6 +290,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
+
 # Initialize some variables set by options.
 ac_init_help=
 ac_init_version=false
@@ -679,6 +686,7 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
 
 test "$silent" = yes && exec 6>/dev/null
 
+
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
@@ -971,12 +979,14 @@ done
 
 cat >&5 <<_ACEOF
 
+
 ## ----------- ##
 ## Core tests. ##
 ## ----------- ##
 
 _ACEOF
 
+
 # Keep a trace of the command line.
 # Strip out --no-create and --no-recursion so they do not pile up.
 # Also quote any args containing shell meta-characters.
@@ -1149,6 +1159,31 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 ac_aux_dir=
 for ac_dir in config $srcdir/config; do
   if test -f $ac_dir/install-sh; then
@@ -1174,6 +1209,7 @@ ac_config_guess="$SHELL $ac_aux_dir/config.guess"
 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
+
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
@@ -1228,6 +1264,7 @@ case $as_dir/ in
 esac
 done
 
+
 fi
   if test "${ac_cv_path_install+set}" = set; then
     INSTALL=$ac_cv_path_install
@@ -1308,6 +1345,7 @@ _ACEOF
 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
 rm conftest.sed
 
+
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
@@ -1401,6 +1439,7 @@ if test "x$enable_dependency_tracking" != xno; then
   AMDEPBACKSLASH='\'
 fi
 
+
 if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
   AMDEP_FALSE='#'
@@ -1409,6 +1448,7 @@ else
   AMDEP_FALSE=
 fi
 
+
 rm -f .deps 2>/dev/null
 mkdir .deps 2>/dev/null
 if test -d .deps; then
@@ -1419,6 +1459,7 @@ else
 fi
 rmdir .deps 2>/dev/null
 
+
 # test to see if srcdir already configured
 if test "`cd $srcdir && pwd`" != "`pwd`" &&
    test -f $srcdir/config.status; then
@@ -1435,22 +1476,30 @@ cat >>confdefs.h <<_ACEOF
 #define PACKAGE "$PACKAGE"
 _ACEOF
 
+
 cat >>confdefs.h <<_ACEOF
 #define VERSION "$VERSION"
 _ACEOF
 
+
+
 # Some tools Automake needs.
 
 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
 
+
 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
 
+
 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
 
+
 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
+
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
+
 AMTAR=${AMTAR-"${am_missing_run}tar"}
 
 install_sh=${install_sh-"$am_aux_dir/install-sh"}
@@ -1464,17 +1513,23 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 # along with our hook.
 ac_config_headers="$ac_config_headers config.h:config.hin"
 
+
+
+
 # Initialize the test suite.
 ac_config_commands="$ac_config_commands tests/package.m4"
 
+
 ac_config_commands="$ac_config_commands tests/atconfig"
 
+
 ac_config_files="$ac_config_files tests/bison"
 
 ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
 
 # Needed by tests/atlocal.in.
 
+
 # Checks for programs.
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -1786,6 +1841,7 @@ fi
 
 fi
 
+
 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
    { (exit 1); exit 1; }; }
@@ -2230,6 +2286,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 ac_config_commands="$ac_config_commands depfiles"
 
+
 am_make=${MAKE-make}
 cat > confinc << 'END'
 doit:
@@ -2263,10 +2320,12 @@ if test "$am__include" = "#"; then
    fi
 fi
 
+
 echo "$as_me:$LINENO: result: $_am_result" >&5
 echo "${ECHO_T}$_am_result" >&6
 rm -f confinc confmf
 
+
 depcc="$CC"   am_compiler_list=
 
 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
@@ -2335,6 +2394,8 @@ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2535,6 +2596,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+
 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
 if test "${ac_cv_header_stdc+set}" = set; then
@@ -2676,6 +2738,14 @@ fi
 
 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
 
+
+
+
+
+
+
+
+
 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
                   inttypes.h stdint.h unistd.h
 do
@@ -2723,6 +2793,7 @@ fi
 
 done
 
+
 if test "${ac_cv_header_minix_config_h+set}" = set; then
   echo "$as_me:$LINENO: checking for minix/config.h" >&5
 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
@@ -2830,22 +2901,26 @@ else
   MINIX=
 fi
 
+
 if test "$MINIX" = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define _POSIX_SOURCE 1
 _ACEOF
 
+
 cat >>confdefs.h <<\_ACEOF
 #define _POSIX_1_SOURCE 2
 _ACEOF
 
+
 cat >>confdefs.h <<\_ACEOF
 #define _MINIX 1
 _ACEOF
 
 fi
 
+
         echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
 echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
 if test "${ac_cv_lib_cposix_strerror+set}" = set; then
@@ -2905,6 +2980,11 @@ if test $ac_cv_lib_cposix_strerror = yes; then
   LIBS="$LIBS -lcposix"
 fi
 
+
+
+
+
+
 echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
 if test "${am_cv_prog_cc_stdc+set}" = set; then
@@ -3085,8 +3165,10 @@ else
   RANLIB="$ac_cv_prog_RANLIB"
 fi
 
+
 AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
 
+
 # Check whether --enable-gcc-warnings or --disable-gcc-warnings was given.
 if test "${enable_gcc_warnings+set}" = set; then
   enableval="$enable_gcc_warnings"
@@ -3661,6 +3743,7 @@ cat >>confdefs.h <<\_ACEOF
 #define _GNU_SOURCE 1
 _ACEOF
 
+
 # Checks for header files.
 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
@@ -3801,6 +3884,12 @@ _ACEOF
 
 fi
 
+
+
+
+
+
+
 for ac_header in ctype.h locale.h memory.h stdlib.h string.h unistd.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -3914,6 +4003,7 @@ fi
 
 done
 
+
 # Checks for typedefs.
 
 # Checks for structures.
@@ -4167,6 +4257,8 @@ _ACEOF
  ;;
 esac
 
+
+
 echo "$as_me:$LINENO: checking for function prototypes" >&5
 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
 if test "$am_cv_prog_cc_stdc" != no; then
@@ -4323,6 +4415,7 @@ _ACEOF
 
 fi
 
+
 for ac_header in string.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -4436,6 +4529,8 @@ fi
 
 done
 
+
+
 # Checks for library functions.
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
@@ -4576,6 +4671,7 @@ cat >>confdefs.h <<\_ACEOF
 #define C_ALLOCA 1
 _ACEOF
 
+
 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
 if test "${ac_cv_os_cray+set}" = set; then
@@ -4741,8 +4837,11 @@ cat >>confdefs.h <<_ACEOF
 #define STACK_DIRECTION $ac_cv_c_stack_direction
 _ACEOF
 
+
 fi
 
+
+
 for ac_func in mkstemp setlocale
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -4872,11 +4971,13 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STPCPY 1
 _ACEOF
 
+
 else
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STPCPY 0
 _ACEOF
 
+
 fi
 echo "$as_me:$LINENO: checking whether strndup is declared" >&5
 echo $ECHO_N "checking whether strndup is declared... $ECHO_C" >&6
@@ -4932,11 +5033,13 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STRNDUP 1
 _ACEOF
 
+
 else
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STRNDUP 0
 _ACEOF
 
+
 fi
 echo "$as_me:$LINENO: checking whether strnlen is declared" >&5
 echo $ECHO_N "checking whether strnlen is declared... $ECHO_C" >&6
@@ -4992,11 +5095,13 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STRNLEN 1
 _ACEOF
 
+
 else
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STRNLEN 0
 _ACEOF
 
+
 fi
 echo "$as_me:$LINENO: checking whether memchr is declared" >&5
 echo $ECHO_N "checking whether memchr is declared... $ECHO_C" >&6
@@ -5052,13 +5157,21 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_MEMCHR 1
 _ACEOF
 
+
 else
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_MEMCHR 0
 _ACEOF
 
+
 fi
 
+
+
+
+
+
+
 for ac_func in stpcpy strndup strnlen strspn memchr
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -5136,10 +5249,14 @@ else
 fi
 done
 
+
+
+
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_DONE_WORKING_MALLOC_CHECK 1
 _ACEOF
 
+
  echo "$as_me:$LINENO: checking for working malloc" >&5
 echo $ECHO_N "checking for working malloc... $ECHO_C" >&6
 if test "${jm_cv_func_working_malloc+set}" = set; then
@@ -5194,10 +5311,13 @@ _ACEOF
 
   fi
 
+
+
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_DONE_WORKING_REALLOC_CHECK 1
 _ACEOF
 
+
  echo "$as_me:$LINENO: checking for working realloc" >&5
 echo $ECHO_N "checking for working realloc... $ECHO_C" >&6
 if test "${jm_cv_func_working_realloc+set}" = set; then
@@ -5252,6 +5372,10 @@ _ACEOF
 
   fi
 
+
+
+
+
 for ac_func in isascii iswprint mbsinit
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -5327,6 +5451,7 @@ _ACEOF
 fi
 done
 
+
   echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5
 echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6
 if test "${jm_cv_func_mbrtowc+set}" = set; then
@@ -5380,6 +5505,12 @@ _ACEOF
 
   fi
 
+
+
+
+
+
+
 for ac_header in limits.h stddef.h stdlib.h string.h wchar.h wctype.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -5632,6 +5763,7 @@ _ACEOF
 
 fi
 
+
   echo "$as_me:$LINENO: checking whether backslash-a works in strings" >&5
 echo $ECHO_N "checking whether backslash-a works in strings... $ECHO_C" >&6
 if test "${ac_cv_c_backslash_a+set}" = set; then
@@ -5692,6 +5824,8 @@ _ACEOF
 
   fi
 
+
+
 for ac_header in stdlib.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -5805,6 +5939,7 @@ fi
 
 done
 
+
    echo "$as_me:$LINENO: checking for mbstate_t" >&5
 echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
 if test "${ac_cv_type_mbstate_t+set}" = set; then
@@ -5862,6 +5997,7 @@ _ACEOF
 
    fi
 
+
 echo "$as_me:$LINENO: checking for function prototypes" >&5
 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
 if test "$am_cv_prog_cc_stdc" != no; then
@@ -6018,6 +6154,7 @@ _ACEOF
 
 fi
 
+
 for ac_header in string.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -6131,6 +6268,12 @@ fi
 
 done
 
+
+
+
+
+
+
 for ac_func in strerror vprintf doprnt
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -6260,13 +6403,16 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STRERROR 1
 _ACEOF
 
+
 else
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STRERROR 0
 _ACEOF
 
+
 fi
 
+
   echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
 echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
 if test "${ac_cv_have_decl_strerror_r+set}" = set; then
@@ -6321,13 +6467,17 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STRERROR_R 1
 _ACEOF
 
+
 else
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STRERROR_R 0
 _ACEOF
 
+
 fi
 
+
+
 for ac_func in strerror_r
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -6653,6 +6803,7 @@ _ACEOF
 
 fi
 
+
 echo "$as_me:$LINENO: checking if malloc debugging is wanted" >&5
 echo $ECHO_N "checking if malloc debugging is wanted... $ECHO_C" >&6
 
@@ -6678,6 +6829,7 @@ else
 echo "${ECHO_T}no" >&6
 fi;
 
+
 ALL_LINGUAS="de es et fr ja nl tr ru"
 # Make sure we can run config.sub.
 $ac_config_sub sun4 >/dev/null 2>&1 ||
@@ -6710,6 +6862,7 @@ build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
+
 echo "$as_me:$LINENO: checking host system type" >&5
 echo $ECHO_N "checking host system type... $ECHO_C" >&6
 if test "${ac_cv_host+set}" = set; then
@@ -6731,6 +6884,7 @@ host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
+
 echo "$as_me:$LINENO: checking for off_t" >&5
 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
 if test "${ac_cv_type_off_t+set}" = set; then
@@ -6847,6 +7001,8 @@ _ACEOF
 
 fi
 
+
+
 for ac_header in stdlib.h unistd.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -6960,6 +7116,7 @@ fi
 
 done
 
+
 for ac_func in getpagesize
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -7203,6 +7360,7 @@ _ACEOF
 fi
 rm -f conftest.mmap
 
+
     echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5
 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
 if test "${ac_cv_gnu_library_2_1+set}" = set; then
@@ -7228,12 +7386,26 @@ else
 fi
 rm -f conftest*
 
+
+
 fi
 echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5
 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
 
     GLIBC21="$ac_cv_gnu_library_2_1"
 
+
+
+
+
+
+
+
+
+
+
+
+
 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
 stdlib.h string.h unistd.h sys/param.h
 do
@@ -7348,6 +7520,27 @@ fi
 
 done
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
@@ -7425,6 +7618,10 @@ _ACEOF
 fi
 done
 
+
+
+
+
 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
 if test "${with_libiconv_prefix+set}" = set; then
   withval="$with_libiconv_prefix"
@@ -7612,6 +7809,8 @@ _ACEOF
     LIBICONV="-liconv"
   fi
 
+
+
   echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
 if test "${am_cv_langinfo_codeset+set}" = set; then
@@ -7732,6 +7931,7 @@ fi;
     echo "$as_me:$LINENO: result: $USE_NLS" >&5
 echo "${ECHO_T}$USE_NLS" >&6
 
+
     BUILD_INCLUDED_LIBINTL=no
     USE_INCLUDED_LIBINTL=no
     INTLLIBS=
@@ -7759,6 +7959,9 @@ echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
                                CATOBJEXT=NONE
 
+
+
+
        if test "${ac_cv_header_libintl_h+set}" = set; then
   echo "$as_me:$LINENO: checking for libintl.h" >&5
 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
@@ -7863,7 +8066,7 @@ fi
 if test $ac_cv_header_libintl_h = yes; then
   echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
 echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6
-if test "${gt_cv_func_gnugettext1_libc+set}" = set; then
+if test "${gt_cv_func_gnugettext2_libc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -7881,7 +8084,7 @@ int
 main ()
 {
 bindtextdomain ("", "");
-return (int) gettext ("") + _nl_msg_cat_cntr
+return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr
   ;
   return 0;
 }
@@ -7898,21 +8101,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gt_cv_func_gnugettext1_libc=yes
+  gt_cv_func_gnugettext2_libc=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-gt_cv_func_gnugettext1_libc=no
+gt_cv_func_gnugettext2_libc=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5
-echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6
+echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libc" >&5
+echo "${ECHO_T}$gt_cv_func_gnugettext2_libc" >&6
 
-          if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
+          if test "$gt_cv_func_gnugettext2_libc" != "yes"; then
             echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
 echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6
-if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then
+if test "${gt_cv_func_gnugettext2_libintl+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   gt_save_LIBS="$LIBS"
@@ -7932,7 +8135,7 @@ int
 main ()
 {
 bindtextdomain ("", "");
-return (int) gettext ("") + _nl_msg_cat_cntr
+return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr
   ;
   return 0;
 }
@@ -7949,28 +8152,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gt_cv_func_gnugettext1_libintl=yes
+  gt_cv_func_gnugettext2_libintl=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-gt_cv_func_gnugettext1_libintl=no
+gt_cv_func_gnugettext2_libintl=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
                LIBS="$gt_save_LIBS"
 fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5
-echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6
+echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libintl" >&5
+echo "${ECHO_T}$gt_cv_func_gnugettext2_libintl" >&6
           fi
 
-                                          if test "$gt_cv_func_gnugettext1_libc" = "yes" \
-             || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
+                                          if test "$gt_cv_func_gnugettext2_libc" = "yes" \
+             || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \
                   && test "$PACKAGE" != gettext; }; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_GETTEXT 1
 _ACEOF
 
-            if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+
+            if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
                                       INTLLIBS="-lintl $LIBICONV"
             fi
 
@@ -8130,6 +8334,7 @@ else
 echo "${ECHO_T}no" >&6
 fi
 
+
                     # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -8166,11 +8371,14 @@ else
 echo "${ECHO_T}no" >&6
 fi
 
+
             CATOBJEXT=.gmo
           fi
 
 fi
 
+
+
         if test "$CATOBJEXT" = "NONE"; then
                          nls_cv_use_gnu_gettext=yes
         fi
@@ -8290,6 +8498,7 @@ else
 echo "${ECHO_T}no" >&6
 fi
 
+
        BUILD_INCLUDED_LIBINTL=yes
        USE_INCLUDED_LIBINTL=yes
         CATOBJEXT=.gmo
@@ -8321,6 +8530,8 @@ echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
     fi
     ac_config_commands="$ac_config_commands default-1"
 
+
+
             if test "$PACKAGE" = gettext; then
       BUILD_INCLUDED_LIBINTL=yes
     fi
@@ -8389,15 +8600,29 @@ echo "${ECHO_T}$ac_prog_version" >&6
       POFILES="$POFILES $lang.po"
     done
 
+
+
+
+
+
+
+
+
+
+
         nls_cv_header_intl=
     nls_cv_header_libgt=
 
         DATADIRNAME=share
 
+
         INSTOBJEXT=.mo
 
+
         GENCAT=gencat
 
+
+
    if test "x$CATOBJEXT" != "x"; then
      if test "x$ALL_LINGUAS" = "x"; then
        LINGUAS=
@@ -8439,12 +8664,16 @@ echo "${ECHO_T}$LINGUAS" >&6
      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
    fi
 
+
       INTL_LIBTOOL_SUFFIX_PREFIX=
 
+
+
 # This is necessary so that .o files in LIBOBJS are also built via
 # the ANSI2KNR-filtering rules.
 LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
 
+
 ac_config_files="$ac_config_files Makefile config/Makefile intl/Makefile po/Makefile.in lib/Makefile src/Makefile doc/Makefile m4/Makefile"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -8522,6 +8751,7 @@ fi
 
 DEFS=-DHAVE_CONFIG_H
 
+
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -8585,6 +8815,7 @@ fi
     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
       { LC_MESSAGES=C; export LC_MESSAGES; }
 
+
 # Name of the executable.
 as_me=`(basename "$0") 2>/dev/null ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
@@ -8618,6 +8849,7 @@ if test "${PATH_SEPARATOR+set}" != set; then
   rm -f conftest.sh
 fi
 
+
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
@@ -8704,6 +8936,7 @@ echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;
   exit
 }
 
+
 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
   *c*,-n*) ECHO_N= ECHO_C='
 ' ECHO_T='     ' ;;
@@ -8743,6 +8976,7 @@ as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
 # Sed expression to map a string onto a valid variable name.
 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
 
+
 # IFS
 # We need space, tab and new line, in precisely that order.
 as_nl='
@@ -8919,8 +9153,11 @@ PACKAGE_BUGREPORT='$PACKAGE_BUGREPORT'
 
 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 
+
 _ACEOF
 
+
+
 cat >>$CONFIG_STATUS <<\_ACEOF
 for ac_config_target in $ac_config_targets
 do
@@ -9214,6 +9451,7 @@ ac_top_buildpath=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
 ac_srcpath=`cd "$ac_dir" && cd $ac_srcdir && pwd`
 ac_top_srcpath=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
 
+
   case $INSTALL in
   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
@@ -9570,6 +9808,7 @@ ac_top_buildpath=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
 ac_srcpath=`cd "$ac_dir" && cd $ac_srcdir && pwd`
 ac_top_srcpath=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
 
+
   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
 echo "$as_me: executing $ac_dest commands" >&6;}
   case $ac_dest in
@@ -9719,6 +9958,7 @@ _ACEOF
 chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
+
 # configure is writing to config.log, and then calls config.status.
 # config.status does its own redirection, appending to config.log.
 # Unfortunately, on DOS this fails, as config.log is still kept open
@@ -9736,3 +9976,4 @@ if test "$no_create" != yes; then
   # would make configure fail if this is the last instruction.
   $ac_cs_success || { (exit 1); exit 1; }
 fi
+
index 524f989176e75af52909ddcaf473460725654fc0..6dc21cb176bf0c80868f21f37089e602cbe13168 100644 (file)
@@ -90,12 +90,12 @@ jm_PREREQ_ERROR
 AM_WITH_DMALLOC
 
 ALL_LINGUAS="de es et fr ja nl tr ru"
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT(, need-ngettext)
 
 # This is necessary so that .o files in LIBOBJS are also built via
 # the ANSI2KNR-filtering rules.
-LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
-AC_SUBST(LIBOBJS)
+LIB@&t@OBJS=`echo $LIB@&t@OBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
+AC_SUBST(LIB@&t@OBJS)
 
 AC_OUTPUT([Makefile
            config/Makefile
index 04a3a2fbb4c5dfa114665db06c6d91f7551e380d..d7affd5177ab4e46dc539d0c6b8d2faf4932afa1 100644 (file)
@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
 INTLOBJS = @INTLOBJS@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIB = @LIB@
 LIBICONV = @LIBICONV@
-LIBOBJS = @LIBOBJS@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 PACKAGE = @PACKAGE@
index 4cf67b8dd17e456e518f587a1b50132125d4f1d2..8cde7afa2e010a37e318f5fca74b0a0321d1bc35 100644 (file)
@@ -31,115 +31,115 @@ instead of in the original English.
 \1f
 Indirect:
 bison.info-1: 1313
-bison.info-2: 50689
-bison.info-3: 100579
-bison.info-4: 147579
-bison.info-5: 197449
+bison.info-2: 50690
+bison.info-3: 100580
+bison.info-4: 147602
+bison.info-5: 197472
 \1f
 Tag Table:
 (Indirect)
 Node: Top\7f1313
-Node: Introduction\7f8967
-Node: Conditions\7f10242
-Node: Copying\7f11706
-Node: Concepts\7f30909
-Node: Language and Grammar\7f31988
-Node: Grammar in Bison\7f37004
-Node: Semantic Values\7f38928
-Node: Semantic Actions\7f41029
-Node: Locations Overview\7f42218
-Node: Bison Parser\7f43665
-Node: Stages\7f45977
-Node: Grammar Layout\7f47260
-Node: Examples\7f48517
-Node: RPN Calc\7f49715
-Node: Rpcalc Decls\7f50689
-Node: Rpcalc Rules\7f52276
-Node: Rpcalc Input\7f54076
-Node: Rpcalc Line\7f55537
-Node: Rpcalc Expr\7f56652
-Node: Rpcalc Lexer\7f58597
-Node: Rpcalc Main\7f61169
-Node: Rpcalc Error\7f61567
-Node: Rpcalc Gen\7f62575
-Node: Rpcalc Compile\7f63724
-Node: Infix Calc\7f64599
-Node: Simple Error Recovery\7f67306
-Node: Location Tracking Calc\7f69195
-Node: Ltcalc Decls\7f69925
-Node: Ltcalc Rules\7f70834
-Node: Ltcalc Lexer\7f72895
-Node: Multi-function Calc\7f75233
-Node: Mfcalc Decl\7f76800
-Node: Mfcalc Rules\7f78823
-Node: Mfcalc Symtab\7f80203
-Node: Exercises\7f86576
-Node: Grammar File\7f87082
-Node: Grammar Outline\7f87930
-Node: C Declarations\7f88664
-Node: Bison Declarations\7f89244
-Node: Grammar Rules\7f89656
-Node: C Code\7f90116
-Node: Symbols\7f91046
-Node: Rules\7f96127
-Node: Recursion\7f97766
-Node: Semantics\7f99485
-Node: Value Type\7f100579
-Node: Multiple Types\7f101251
-Node: Actions\7f102268
-Node: Action Types\7f105053
-Node: Mid-Rule Actions\7f106356
-Node: Locations\7f111926
-Node: Location Type\7f112574
-Node: Actions and Locations\7f113132
-Node: Location Default Action\7f115288
-Node: Declarations\7f116751
-Node: Token Decl\7f118070
-Node: Precedence Decl\7f120083
-Node: Union Decl\7f121634
-Node: Type Decl\7f122478
-Node: Expect Decl\7f123384
-Node: Start Decl\7f124930
-Node: Pure Decl\7f125308
-Node: Decl Summary\7f126985
-Node: Multiple Parsers\7f133113
-Node: Interface\7f134607
-Node: Parser Function\7f135479
-Node: Lexical\7f136314
-Node: Calling Convention\7f137720
-Node: Token Values\7f140491
-Node: Token Positions\7f141640
-Node: Pure Calling\7f142525
-Node: Error Reporting\7f145457
-Node: Action Features\7f147579
-Node: Algorithm\7f150874
-Node: Look-Ahead\7f153167
-Node: Shift/Reduce\7f155299
-Node: Precedence\7f158211
-Node: Why Precedence\7f158862
-Node: Using Precedence\7f160727
-Node: Precedence Examples\7f161695
-Node: How Precedence\7f162396
-Node: Contextual Precedence\7f163545
-Node: Parser States\7f165336
-Node: Reduce/Reduce\7f166579
-Node: Mystery Conflicts\7f170140
-Node: Stack Overflow\7f173526
-Node: Error Recovery\7f174899
-Node: Context Dependency\7f180035
-Node: Semantic Tokens\7f180883
-Node: Lexical Tie-ins\7f183900
-Node: Tie-in Recovery\7f185448
-Node: Debugging\7f187620
-Node: Invocation\7f190921
-Node: Bison Options\7f192173
-Node: Environment Variables\7f195723
-Node: Option Cross Key\7f196571
-Node: VMS Invocation\7f197449
-Node: Table of Symbols\7f198233
-Node: Glossary\7f206201
-Node: Copying This Manual\7f212505
-Node: GNU Free Documentation License\7f212714
-Node: Index\7f232579
+Node: Introduction\7f8968
+Node: Conditions\7f10243
+Node: Copying\7f11707
+Node: Concepts\7f30910
+Node: Language and Grammar\7f31989
+Node: Grammar in Bison\7f37005
+Node: Semantic Values\7f38929
+Node: Semantic Actions\7f41030
+Node: Locations Overview\7f42219
+Node: Bison Parser\7f43666
+Node: Stages\7f45978
+Node: Grammar Layout\7f47261
+Node: Examples\7f48518
+Node: RPN Calc\7f49716
+Node: Rpcalc Decls\7f50690
+Node: Rpcalc Rules\7f52277
+Node: Rpcalc Input\7f54077
+Node: Rpcalc Line\7f55538
+Node: Rpcalc Expr\7f56653
+Node: Rpcalc Lexer\7f58598
+Node: Rpcalc Main\7f61170
+Node: Rpcalc Error\7f61568
+Node: Rpcalc Gen\7f62576
+Node: Rpcalc Compile\7f63725
+Node: Infix Calc\7f64600
+Node: Simple Error Recovery\7f67307
+Node: Location Tracking Calc\7f69196
+Node: Ltcalc Decls\7f69926
+Node: Ltcalc Rules\7f70835
+Node: Ltcalc Lexer\7f72896
+Node: Multi-function Calc\7f75234
+Node: Mfcalc Decl\7f76801
+Node: Mfcalc Rules\7f78824
+Node: Mfcalc Symtab\7f80204
+Node: Exercises\7f86577
+Node: Grammar File\7f87083
+Node: Grammar Outline\7f87931
+Node: C Declarations\7f88665
+Node: Bison Declarations\7f89245
+Node: Grammar Rules\7f89657
+Node: C Code\7f90117
+Node: Symbols\7f91047
+Node: Rules\7f96128
+Node: Recursion\7f97767
+Node: Semantics\7f99486
+Node: Value Type\7f100580
+Node: Multiple Types\7f101252
+Node: Actions\7f102269
+Node: Action Types\7f105054
+Node: Mid-Rule Actions\7f106357
+Node: Locations\7f111927
+Node: Location Type\7f112575
+Node: Actions and Locations\7f113133
+Node: Location Default Action\7f115289
+Node: Declarations\7f116752
+Node: Token Decl\7f118071
+Node: Precedence Decl\7f120084
+Node: Union Decl\7f121635
+Node: Type Decl\7f122479
+Node: Expect Decl\7f123385
+Node: Start Decl\7f124953
+Node: Pure Decl\7f125331
+Node: Decl Summary\7f127008
+Node: Multiple Parsers\7f133136
+Node: Interface\7f134630
+Node: Parser Function\7f135502
+Node: Lexical\7f136337
+Node: Calling Convention\7f137743
+Node: Token Values\7f140514
+Node: Token Positions\7f141663
+Node: Pure Calling\7f142548
+Node: Error Reporting\7f145480
+Node: Action Features\7f147602
+Node: Algorithm\7f150897
+Node: Look-Ahead\7f153190
+Node: Shift/Reduce\7f155322
+Node: Precedence\7f158234
+Node: Why Precedence\7f158885
+Node: Using Precedence\7f160750
+Node: Precedence Examples\7f161718
+Node: How Precedence\7f162419
+Node: Contextual Precedence\7f163568
+Node: Parser States\7f165359
+Node: Reduce/Reduce\7f166602
+Node: Mystery Conflicts\7f170163
+Node: Stack Overflow\7f173549
+Node: Error Recovery\7f174922
+Node: Context Dependency\7f180058
+Node: Semantic Tokens\7f180906
+Node: Lexical Tie-ins\7f183923
+Node: Tie-in Recovery\7f185471
+Node: Debugging\7f187643
+Node: Invocation\7f190944
+Node: Bison Options\7f192196
+Node: Environment Variables\7f195746
+Node: Option Cross Key\7f196594
+Node: VMS Invocation\7f197472
+Node: Table of Symbols\7f198256
+Node: Glossary\7f206224
+Node: Copying This Manual\7f212528
+Node: GNU Free Documentation License\7f212737
+Node: Index\7f232602
 \1f
 End Tag Table
index ff8b5b95450c2f074571511eff08213ac324c797..7f973cd6ad5b60b4d3dbf2cfb02ad274f54c83a2 100644 (file)
@@ -34,7 +34,7 @@ File: bison.info,  Node: Top,  Next: Introduction,  Up: (dir)
 Bison
 *****
 
-   This manual documents version 1.30b of Bison, updated 5 November
+   This manual documents version 1.30b of Bison, updated 12 November
 2001.
 
 * Menu:
index 33e4a5daee2449b4a40f86b8af4b19133f96130e..72b2a2ac84a1513b927052ade68f74ae683fc5c5 100644 (file)
@@ -623,19 +623,20 @@ Suppressing Conflict Warnings
 
    Bison normally warns if there are any conflicts in the grammar
 (*note Shift/Reduce Conflicts: Shift/Reduce.), but most real grammars
-have harmless shift/reduce conflicts which are resolved in a
-predictable way and would be difficult to eliminate.  It is desirable
-to suppress the warning about these conflicts unless the number of
-conflicts changes.  You can do this with the `%expect' declaration.
+have harmless shift/reduce conflicts which are resolved in a predictable
+way and would be difficult to eliminate.  It is desirable to suppress
+the warning about these conflicts unless the number of conflicts
+changes.  You can do this with the `%expect' declaration.
 
    The declaration looks like this:
 
      %expect N
 
-   Here N is a decimal integer.  The declaration says there should be no
-warning if there are N shift/reduce conflicts and no reduce/reduce
-conflicts.  The usual warning is given if there are either more or fewer
-conflicts, or if there are any reduce/reduce conflicts.
+   Here N is a decimal integer.  The declaration says there should be
+no warning if there are N shift/reduce conflicts and no reduce/reduce
+conflicts.  An error, instead of the usual warning, is given if there
+are either more or fewer conflicts, or if there are any reduce/reduce
+conflicts.
 
    In general, using `%expect' involves these steps:
 
index d0a44bb1f5e8eeb6b9a830186d70133d408233d3..97fbb4e67cebe79e350d306cff64dcf4287c6361 100644 (file)
@@ -3070,11 +3070,11 @@ terminal symbol.  All kinds of token declarations allow
 @findex %expect
 
 Bison normally warns if there are any conflicts in the grammar
-(@pxref{Shift/Reduce, ,Shift/Reduce Conflicts}), but most real grammars have harmless shift/reduce
-conflicts which are resolved in a predictable way and would be difficult to
-eliminate.  It is desirable to suppress the warning about these conflicts
-unless the number of conflicts changes.  You can do this with the
-@code{%expect} declaration.
+(@pxref{Shift/Reduce, ,Shift/Reduce Conflicts}), but most real grammars
+have harmless shift/reduce conflicts which are resolved in a predictable
+way and would be difficult to eliminate.  It is desirable to suppress
+the warning about these conflicts unless the number of conflicts
+changes.  You can do this with the @code{%expect} declaration.
 
 The declaration looks like this:
 
@@ -3082,10 +3082,11 @@ The declaration looks like this:
 %expect @var{n}
 @end example
 
-Here @var{n} is a decimal integer.  The declaration says there should be no
-warning if there are @var{n} shift/reduce conflicts and no reduce/reduce
-conflicts.  The usual warning is given if there are either more or fewer
-conflicts, or if there are any reduce/reduce conflicts.
+Here @var{n} is a decimal integer.  The declaration says there should be
+no warning if there are @var{n} shift/reduce conflicts and no
+reduce/reduce conflicts.  An error, instead of the usual warning, is
+given if there are either more or fewer conflicts, or if there are any
+reduce/reduce conflicts.
 
 In general, using @code{%expect} involves these steps:
 
index 52edc15fc1f863a5355fbced2d3d3a297d3f828f..01604380f1303329bbded946c7bb9ff134e8bbbb 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 5 November 2001
+@set UPDATED 12 November 2001
 @set UPDATED-MONTH November 2001
 @set EDITION 1.30b
 @set VERSION 1.30b
index 52edc15fc1f863a5355fbced2d3d3a297d3f828f..01604380f1303329bbded946c7bb9ff134e8bbbb 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 5 November 2001
+@set UPDATED 12 November 2001
 @set UPDATED-MONTH November 2001
 @set EDITION 1.30b
 @set VERSION 1.30b
index a3639d39c8a925ca3232bc26d53a9c7e73de93ef..30994f2a0126bfcc1189d88f3a37305b3ce6a230 100644 (file)
@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
 INTLOBJS = @INTLOBJS@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIB = @LIB@
 LIBICONV = @LIBICONV@
-LIBOBJS = @LIBOBJS@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 PACKAGE = @PACKAGE@
index 96e5c2448824dacc24591a327c039442b3d622cf..f60a500a9b43e6245fb4cef85931daae7bd15802 100644 (file)
@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
 INTLOBJS = @INTLOBJS@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIB = @LIB@
 LIBICONV = @LIBICONV@
-LIBOBJS = @LIBOBJS@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 PACKAGE = @PACKAGE@
index ba7e746f60797265b9aa3e813ed1e06b38ec6f10..6535ef167ad97e7f3b1b58518141fe49e927ed21 100644 (file)
@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
 INTLOBJS = @INTLOBJS@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIB = @LIB@
 LIBICONV = @LIBICONV@
-LIBOBJS = @LIBOBJS@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 PACKAGE = @PACKAGE@
index 1e5f29cf44bf713a50f8df1b67571a3462aa1914..913453667025e2347faaed86ed72581ef3995f33 100644 (file)
@@ -19,6 +19,7 @@
    02111-1307, USA.  */
 
 #include "system.h"
+#include "complain.h"
 #include "getargs.h"
 #include "files.h"
 #include "gram.h"
@@ -29,7 +30,8 @@
 #include "LR0.h"
 
 errs **err_table = NULL;
-int expected_conflicts;
+/* -1 stands for not specified. */
+int expected_conflicts = -1;
 static char *conflicts = NULL;
 
 static unsigned *shiftset = NULL;
@@ -404,31 +406,23 @@ conflict_report (int src_num, int rrc_num)
   static char res[4096];
   char *cp = res;
 
-  if (src_num == 1)
+  if (src_num >= 1)
     {
-      sprintf (cp, _(" 1 shift/reduce conflict"));
-      cp += strlen (cp);
-    }
-  else if (src_num > 1)
-    {
-      sprintf (cp, _(" %d shift/reduce conflicts"), src_num);
+      sprintf (cp, ngettext ("%d shift/reduce conflict",
+                            "%d shift/reduce conflicts", src_num), src_num);
       cp += strlen (cp);
     }
 
   if (src_num > 0 && rrc_num > 0)
     {
-      sprintf (cp, _(" and"));
+      sprintf (cp, " %s ", _("and"));
       cp += strlen (cp);
     }
 
-  if (rrc_num == 1)
+  if (rrc_num >= 1)
     {
-      sprintf (cp, _(" 1 reduce/reduce conflict"));
-      cp += strlen (cp);
-    }
-  else if (rrc_num > 1)
-    {
-      sprintf (cp, _(" %d reduce/reduce conflicts"), rrc_num);
+      sprintf (cp, ngettext ("%d reduce/reduce conflict",
+                            "%d reduce/reduce conflicts", rrc_num), rrc_num);
       cp += strlen (cp);
     }
 
@@ -451,7 +445,7 @@ conflicts_output (FILE *out)
   for (i = 0; i < nstates; i++)
     if (conflicts[i])
       {
-       fprintf (out, _("State %d contains"), i);
+       fprintf (out, _("State %d contains "), i);
        fputs (conflict_report (count_sr_conflicts (i),
                                count_rr_conflicts (i)), out);
       }
@@ -495,9 +489,19 @@ conflicts_print (void)
       }
     else
       {
-       fprintf (stderr, _("%s contains"), infile);
+       fprintf (stderr, _("%s contains "), infile);
        fputs (conflict_report (src_total, rrc_total), stderr);
       }
+
+  if (expected_conflicts != -1
+      && src_total != expected_conflicts)
+    {
+      complain_message_count++;
+      fprintf (stderr, ngettext ("expected %d shift/reduce conflict",
+                                "expected %d shift/reduce conflicts",
+                                expected_conflicts),
+              expected_conflicts);
+    }
 }
 
 
index 3b84380a3f137a7d1c8200d3363a0726b56b2967..f6231386fc531533638248eb79f5eaa0ece82f8f 100644 (file)
@@ -62,15 +62,16 @@ main (int argc, char *argv[])
   if (complain_message_count)
     exit (1);
 
-  /* find useless nonterminals and productions and reduce the grammar.  In
-     file reduce.c */
+  /* Find useless nonterminals and productions and reduce the grammar.
+     In file reduce.c.  */
   reduce_grammar ();
 
-  /* record other info about the grammar.  In files derives and nullable.  */
+  /* Record other info about the grammar.  In files derives and
+     nullable.  */
   set_derives ();
   set_nullable ();
 
-  /* convert to nondeterministic finite state machine.  In file LR0.
+  /* Convert to nondeterministic finite state machine.  In file LR0.
      See state.h for more info.  */
   generate_states ();
 
@@ -101,14 +102,14 @@ main (int argc, char *argv[])
   /* Output the tables and the parser to ftable.  In file output.  */
   output ();
 
+  /* Close the input files. */
+  close_files ();
+
   /* Free the symbol table data structure.  */
   free_symtab ();
 
   lex_free ();
 
-  /* Close the input files. */
-  close_files ();
-
   reduce_free ();
   free_conflicts ();
   free_nullable ();
index b4be88bbe016a7fd730f56b73c5630113ed5b9f9..eb8fa7277c4fbfc163565313f2803541fa1bee6a 100644 (file)
@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
 INTLOBJS = @INTLOBJS@
 INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIB = @LIB@
 LIBICONV = @LIBICONV@
-LIBOBJS = @LIBOBJS@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 PACKAGE = @PACKAGE@
index 14ce95ac0e7893d1f647c18db20ffbadcc88cede..da2ab065ccfda7b303058545546f380eb9bad1b6 100644 (file)
@@ -239,6 +239,66 @@ state 6
 AT_CLEANUP(input.c input.output)
 
 
+
+## -------------------- ##
+## %expect not enough.  ##
+## -------------------- ##
+
+AT_SETUP([%expect not enough])
+
+AT_DATA([input.y],
+[[%token NUM OP
+%expect 0
+%%
+exp: exp OP exp | NUM;
+]])
+
+AT_CHECK([bison input.y -o input.c], 1, [],
+[input.y contains 1 shift/reduce conflict.
+expected 0 shift/reduce conflicts
+])
+AT_CLEANUP(input.c)
+
+
+## --------------- ##
+## %expect right.  ##
+## --------------- ##
+
+AT_SETUP([%expect right])
+
+AT_DATA([input.y],
+[[%token NUM OP
+%expect 1
+%%
+exp: exp OP exp | NUM;
+]])
+
+AT_CHECK([bison input.y -o input.c], 0, [],
+[input.y contains 1 shift/reduce conflict.
+])
+AT_CLEANUP(input.c)
+
+
+## ------------------ ##
+## %expect too much.  ##
+## ------------------ ##
+
+AT_SETUP([%expect too much])
+
+AT_DATA([input.y],
+[[%token NUM OP
+%expect 2
+%%
+exp: exp OP exp | NUM;
+]])
+
+AT_CHECK([bison input.y -o input.c], 1, [],
+[input.y contains 1 shift/reduce conflict.
+expected 2 shift/reduce conflicts
+])
+AT_CLEANUP(input.c)
+
+
 ## ---------------------- ##
 ## Mixing %token styles.  ##
 ## ---------------------- ##