%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.
This commit is contained in:
Akim Demaille
2001-11-12 09:19:48 +00:00
parent fb28699f95
commit badfc69c26
20 changed files with 512 additions and 177 deletions

View File

@@ -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> 2001-11-12 Akim Demaille <akim@epita.fr>
* tests/regression.at (Conflicts): Rename as... * tests/regression.at (Conflicts): Rename as...

View File

@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@ INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@

15
NEWS
View File

@@ -3,6 +3,21 @@ Bison News
Changes in version 1.30b: 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 incorrect processing of some invalid input.
* Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H. * Fixed CPP guards: 9foo.h uses BISON_9FOO_H instead of 9FOO_H.

View File

@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@ INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@

273
configure vendored
View File

@@ -15,6 +15,7 @@ else
as_expr=false as_expr=false
fi fi
## --------------------- ## ## --------------------- ##
## M4sh Initialization. ## ## M4sh Initialization. ##
## --------------------- ## ## --------------------- ##
@@ -60,6 +61,7 @@ fi
{ $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
{ LC_MESSAGES=C; export LC_MESSAGES; } { LC_MESSAGES=C; export LC_MESSAGES; }
# Name of the executable. # Name of the executable.
as_me=`(basename "$0") 2>/dev/null || as_me=`(basename "$0") 2>/dev/null ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
@@ -93,6 +95,7 @@ if test "${PATH_SEPARATOR+set}" != set; then
rm -f conftest.sh rm -f conftest.sh
fi fi
as_lineno_1=$LINENO as_lineno_1=$LINENO
as_lineno_2=$LINENO as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
@@ -177,6 +180,7 @@ done
exit exit
} }
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C=' *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;; ' 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. # Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
# IFS # IFS
# We need space, tab and new line, in precisely that order. # We need space, tab and new line, in precisely that order.
as_nl=' as_nl='
@@ -225,6 +230,7 @@ IFS=" $as_nl"
# CDPATH. # CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
# Name of the host. # Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too. # so uname gets run too.
@@ -284,6 +290,7 @@ ac_includes_default="\
# include <unistd.h> # include <unistd.h>
#endif" #endif"
# Initialize some variables set by options. # Initialize some variables set by options.
ac_init_help= ac_init_help=
ac_init_version=false ac_init_version=false
@@ -679,6 +686,7 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null test "$silent" = yes && exec 6>/dev/null
# Find the source files, if location was not specified. # Find the source files, if location was not specified.
if test -z "$srcdir"; then if test -z "$srcdir"; then
ac_srcdir_defaulted=yes ac_srcdir_defaulted=yes
@@ -971,12 +979,14 @@ done
cat >&5 <<_ACEOF cat >&5 <<_ACEOF
## ----------- ## ## ----------- ##
## Core tests. ## ## Core tests. ##
## ----------- ## ## ----------- ##
_ACEOF _ACEOF
# Keep a trace of the command line. # Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up. # Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell meta-characters. # 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_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir= ac_aux_dir=
for ac_dir in config $srcdir/config; do for ac_dir in config $srcdir/config; do
if test -f $ac_dir/install-sh; then 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_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# Find a good install program. We prefer a C program (faster), # Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or # so one script is as good as another. But avoid the broken or
# incompatible versions: # incompatible versions:
@@ -1228,6 +1264,7 @@ case $as_dir/ in
esac esac
done done
fi fi
if test "${ac_cv_path_install+set}" = set; then if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install INSTALL=$ac_cv_path_install
@@ -1308,6 +1345,7 @@ _ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed` program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed rm conftest.sed
# expand $ac_aux_dir to an absolute path # expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd` am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -1401,6 +1439,7 @@ if test "x$enable_dependency_tracking" != xno; then
AMDEPBACKSLASH='\' AMDEPBACKSLASH='\'
fi fi
if test "x$enable_dependency_tracking" != xno; then if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE= AMDEP_TRUE=
AMDEP_FALSE='#' AMDEP_FALSE='#'
@@ -1409,6 +1448,7 @@ else
AMDEP_FALSE= AMDEP_FALSE=
fi fi
rm -f .deps 2>/dev/null rm -f .deps 2>/dev/null
mkdir .deps 2>/dev/null mkdir .deps 2>/dev/null
if test -d .deps; then if test -d .deps; then
@@ -1419,6 +1459,7 @@ else
fi fi
rmdir .deps 2>/dev/null rmdir .deps 2>/dev/null
# test to see if srcdir already configured # test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" && if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then test -f $srcdir/config.status; then
@@ -1435,22 +1476,30 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE" #define PACKAGE "$PACKAGE"
_ACEOF _ACEOF
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION" #define VERSION "$VERSION"
_ACEOF _ACEOF
# Some tools Automake needs. # Some tools Automake needs.
ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"} ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
AMTAR=${AMTAR-"${am_missing_run}tar"} AMTAR=${AMTAR-"${am_missing_run}tar"}
install_sh=${install_sh-"$am_aux_dir/install-sh"} 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. # along with our hook.
ac_config_headers="$ac_config_headers config.h:config.hin" ac_config_headers="$ac_config_headers config.h:config.hin"
# Initialize the test suite. # Initialize the test suite.
ac_config_commands="$ac_config_commands tests/package.m4" ac_config_commands="$ac_config_commands tests/package.m4"
ac_config_commands="$ac_config_commands tests/atconfig" ac_config_commands="$ac_config_commands tests/atconfig"
ac_config_files="$ac_config_files tests/bison" ac_config_files="$ac_config_files tests/bison"
ac_config_files="$ac_config_files tests/Makefile tests/atlocal" ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
# Needed by tests/atlocal.in. # Needed by tests/atlocal.in.
# Checks for programs. # Checks for programs.
ac_ext=c ac_ext=c
ac_cpp='$CPP $CPPFLAGS' ac_cpp='$CPP $CPPFLAGS'
@@ -1786,6 +1841,7 @@ fi
fi fi
test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5 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;} echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
{ (exit 1); exit 1; }; } { (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_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_commands="$ac_config_commands depfiles" ac_config_commands="$ac_config_commands depfiles"
am_make=${MAKE-make} am_make=${MAKE-make}
cat > confinc << 'END' cat > confinc << 'END'
doit: doit:
@@ -2263,10 +2320,12 @@ if test "$am__include" = "#"; then
fi fi
fi fi
echo "$as_me:$LINENO: result: $_am_result" >&5 echo "$as_me:$LINENO: result: $_am_result" >&5
echo "${ECHO_T}$_am_result" >&6 echo "${ECHO_T}$_am_result" >&6
rm -f confinc confmf rm -f confinc confmf
depcc="$CC" am_compiler_list= depcc="$CC" am_compiler_list=
echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 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 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
ac_ext=c ac_ext=c
ac_cpp='$CPP $CPPFLAGS' ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 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_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then 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. # 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 \ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h inttypes.h stdint.h unistd.h
do do
@@ -2723,6 +2793,7 @@ fi
done done
if test "${ac_cv_header_minix_config_h+set}" = set; then if test "${ac_cv_header_minix_config_h+set}" = set; then
echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo "$as_me:$LINENO: checking for minix/config.h" >&5
echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
@@ -2830,22 +2901,26 @@ else
MINIX= MINIX=
fi fi
if test "$MINIX" = yes; then if test "$MINIX" = yes; then
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define _POSIX_SOURCE 1 #define _POSIX_SOURCE 1
_ACEOF _ACEOF
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define _POSIX_1_SOURCE 2 #define _POSIX_1_SOURCE 2
_ACEOF _ACEOF
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define _MINIX 1 #define _MINIX 1
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
if test "${ac_cv_lib_cposix_strerror+set}" = set; then 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" LIBS="$LIBS -lcposix"
fi fi
echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5 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 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 if test "${am_cv_prog_cc_stdc+set}" = set; then
@@ -3085,8 +3165,10 @@ else
RANLIB="$ac_cv_prog_RANLIB" RANLIB="$ac_cv_prog_RANLIB"
fi fi
AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"} AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
# Check whether --enable-gcc-warnings or --disable-gcc-warnings was given. # Check whether --enable-gcc-warnings or --disable-gcc-warnings was given.
if test "${enable_gcc_warnings+set}" = set; then if test "${enable_gcc_warnings+set}" = set; then
enableval="$enable_gcc_warnings" enableval="$enable_gcc_warnings"
@@ -3661,6 +3743,7 @@ cat >>confdefs.h <<\_ACEOF
#define _GNU_SOURCE 1 #define _GNU_SOURCE 1
_ACEOF _ACEOF
# Checks for header files. # Checks for header files.
echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
@@ -3801,6 +3884,12 @@ _ACEOF
fi fi
for ac_header in ctype.h locale.h memory.h stdlib.h string.h unistd.h for ac_header in ctype.h locale.h memory.h stdlib.h string.h unistd.h
do do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -3914,6 +4003,7 @@ fi
done done
# Checks for typedefs. # Checks for typedefs.
# Checks for structures. # Checks for structures.
@@ -4167,6 +4257,8 @@ _ACEOF
;; ;;
esac esac
echo "$as_me:$LINENO: checking for function prototypes" >&5 echo "$as_me:$LINENO: checking for function prototypes" >&5
echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
if test "$am_cv_prog_cc_stdc" != no; then if test "$am_cv_prog_cc_stdc" != no; then
@@ -4323,6 +4415,7 @@ _ACEOF
fi fi
for ac_header in string.h for ac_header in string.h
do do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -4436,6 +4529,8 @@ fi
done done
# Checks for library functions. # Checks for library functions.
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless! # for constant arguments. Useless!
@@ -4576,6 +4671,7 @@ cat >>confdefs.h <<\_ACEOF
#define C_ALLOCA 1 #define C_ALLOCA 1
_ACEOF _ACEOF
echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 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 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
if test "${ac_cv_os_cray+set}" = set; then 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 #define STACK_DIRECTION $ac_cv_c_stack_direction
_ACEOF _ACEOF
fi fi
for ac_func in mkstemp setlocale for ac_func in mkstemp setlocale
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 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 #define HAVE_DECL_STPCPY 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STPCPY 0 #define HAVE_DECL_STPCPY 0
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether strndup is declared" >&5 echo "$as_me:$LINENO: checking whether strndup is declared" >&5
echo $ECHO_N "checking whether strndup is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether strndup is declared... $ECHO_C" >&6
@@ -4932,11 +5033,13 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRNDUP 1 #define HAVE_DECL_STRNDUP 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRNDUP 0 #define HAVE_DECL_STRNDUP 0
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether strnlen is declared" >&5 echo "$as_me:$LINENO: checking whether strnlen is declared" >&5
echo $ECHO_N "checking whether strnlen is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether strnlen is declared... $ECHO_C" >&6
@@ -4992,11 +5095,13 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRNLEN 1 #define HAVE_DECL_STRNLEN 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRNLEN 0 #define HAVE_DECL_STRNLEN 0
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether memchr is declared" >&5 echo "$as_me:$LINENO: checking whether memchr is declared" >&5
echo $ECHO_N "checking whether memchr is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether memchr is declared... $ECHO_C" >&6
@@ -5052,13 +5157,21 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_MEMCHR 1 #define HAVE_DECL_MEMCHR 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_MEMCHR 0 #define HAVE_DECL_MEMCHR 0
_ACEOF _ACEOF
fi fi
for ac_func in stpcpy strndup strnlen strspn memchr for ac_func in stpcpy strndup strnlen strspn memchr
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -5136,10 +5249,14 @@ else
fi fi
done done
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define HAVE_DONE_WORKING_MALLOC_CHECK 1 #define HAVE_DONE_WORKING_MALLOC_CHECK 1
_ACEOF _ACEOF
echo "$as_me:$LINENO: checking for working malloc" >&5 echo "$as_me:$LINENO: checking for working malloc" >&5
echo $ECHO_N "checking for working malloc... $ECHO_C" >&6 echo $ECHO_N "checking for working malloc... $ECHO_C" >&6
if test "${jm_cv_func_working_malloc+set}" = set; then if test "${jm_cv_func_working_malloc+set}" = set; then
@@ -5194,10 +5311,13 @@ _ACEOF
fi fi
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define HAVE_DONE_WORKING_REALLOC_CHECK 1 #define HAVE_DONE_WORKING_REALLOC_CHECK 1
_ACEOF _ACEOF
echo "$as_me:$LINENO: checking for working realloc" >&5 echo "$as_me:$LINENO: checking for working realloc" >&5
echo $ECHO_N "checking for working realloc... $ECHO_C" >&6 echo $ECHO_N "checking for working realloc... $ECHO_C" >&6
if test "${jm_cv_func_working_realloc+set}" = set; then if test "${jm_cv_func_working_realloc+set}" = set; then
@@ -5252,6 +5372,10 @@ _ACEOF
fi fi
for ac_func in isascii iswprint mbsinit for ac_func in isascii iswprint mbsinit
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -5327,6 +5451,7 @@ _ACEOF
fi fi
done done
echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5 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 echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6
if test "${jm_cv_func_mbrtowc+set}" = set; then if test "${jm_cv_func_mbrtowc+set}" = set; then
@@ -5380,6 +5505,12 @@ _ACEOF
fi fi
for ac_header in limits.h stddef.h stdlib.h string.h wchar.h wctype.h for ac_header in limits.h stddef.h stdlib.h string.h wchar.h wctype.h
do do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -5632,6 +5763,7 @@ _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether backslash-a works in strings" >&5 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 echo $ECHO_N "checking whether backslash-a works in strings... $ECHO_C" >&6
if test "${ac_cv_c_backslash_a+set}" = set; then if test "${ac_cv_c_backslash_a+set}" = set; then
@@ -5692,6 +5824,8 @@ _ACEOF
fi fi
for ac_header in stdlib.h for ac_header in stdlib.h
do do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -5805,6 +5939,7 @@ fi
done done
echo "$as_me:$LINENO: checking for mbstate_t" >&5 echo "$as_me:$LINENO: checking for mbstate_t" >&5
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6 echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
if test "${ac_cv_type_mbstate_t+set}" = set; then if test "${ac_cv_type_mbstate_t+set}" = set; then
@@ -5862,6 +5997,7 @@ _ACEOF
fi fi
echo "$as_me:$LINENO: checking for function prototypes" >&5 echo "$as_me:$LINENO: checking for function prototypes" >&5
echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6
if test "$am_cv_prog_cc_stdc" != no; then if test "$am_cv_prog_cc_stdc" != no; then
@@ -6018,6 +6154,7 @@ _ACEOF
fi fi
for ac_header in string.h for ac_header in string.h
do do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -6131,6 +6268,12 @@ fi
done done
for ac_func in strerror vprintf doprnt for ac_func in strerror vprintf doprnt
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 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 #define HAVE_DECL_STRERROR 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRERROR 0 #define HAVE_DECL_STRERROR 0
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5 echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6 echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
if test "${ac_cv_have_decl_strerror_r+set}" = set; then 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 #define HAVE_DECL_STRERROR_R 1
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRERROR_R 0 #define HAVE_DECL_STRERROR_R 0
_ACEOF _ACEOF
fi fi
for ac_func in strerror_r for ac_func in strerror_r
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -6653,6 +6803,7 @@ _ACEOF
fi fi
echo "$as_me:$LINENO: checking if malloc debugging is wanted" >&5 echo "$as_me:$LINENO: checking if malloc debugging is wanted" >&5
echo $ECHO_N "checking if malloc debugging is wanted... $ECHO_C" >&6 echo $ECHO_N "checking if malloc debugging is wanted... $ECHO_C" >&6
@@ -6678,6 +6829,7 @@ else
echo "${ECHO_T}no" >&6 echo "${ECHO_T}no" >&6
fi; fi;
ALL_LINGUAS="de es et fr ja nl tr ru" ALL_LINGUAS="de es et fr ja nl tr ru"
# Make sure we can run config.sub. # Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 || $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_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$as_me:$LINENO: checking host system type" >&5 echo "$as_me:$LINENO: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6 echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then 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_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$as_me:$LINENO: checking for off_t" >&5 echo "$as_me:$LINENO: checking for off_t" >&5
echo $ECHO_N "checking for off_t... $ECHO_C" >&6 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
if test "${ac_cv_type_off_t+set}" = set; then if test "${ac_cv_type_off_t+set}" = set; then
@@ -6847,6 +7001,8 @@ _ACEOF
fi fi
for ac_header in stdlib.h unistd.h for ac_header in stdlib.h unistd.h
do do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -6960,6 +7116,7 @@ fi
done done
for ac_func in getpagesize for ac_func in getpagesize
do do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -7203,6 +7360,7 @@ _ACEOF
fi fi
rm -f conftest.mmap rm -f conftest.mmap
echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 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 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 if test "${ac_cv_gnu_library_2_1+set}" = set; then
@@ -7228,12 +7386,26 @@ else
fi fi
rm -f conftest* rm -f conftest*
fi fi
echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5
echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
GLIBC21="$ac_cv_gnu_library_2_1" GLIBC21="$ac_cv_gnu_library_2_1"
for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ 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 stdlib.h string.h unistd.h sys/param.h
do do
@@ -7348,6 +7520,27 @@ fi
done done
for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \ for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next strdup strtoul tsearch __argz_count __argz_stringify __argz_next
@@ -7425,6 +7618,10 @@ _ACEOF
fi fi
done done
# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then if test "${with_libiconv_prefix+set}" = set; then
withval="$with_libiconv_prefix" withval="$with_libiconv_prefix"
@@ -7612,6 +7809,8 @@ _ACEOF
LIBICONV="-liconv" LIBICONV="-liconv"
fi fi
echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
if test "${am_cv_langinfo_codeset+set}" = set; then if test "${am_cv_langinfo_codeset+set}" = set; then
@@ -7732,6 +7931,7 @@ fi;
echo "$as_me:$LINENO: result: $USE_NLS" >&5 echo "$as_me:$LINENO: result: $USE_NLS" >&5
echo "${ECHO_T}$USE_NLS" >&6 echo "${ECHO_T}$USE_NLS" >&6
BUILD_INCLUDED_LIBINTL=no BUILD_INCLUDED_LIBINTL=no
USE_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no
INTLLIBS= 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 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
CATOBJEXT=NONE CATOBJEXT=NONE
if test "${ac_cv_header_libintl_h+set}" = set; then if test "${ac_cv_header_libintl_h+set}" = set; then
echo "$as_me:$LINENO: checking for libintl.h" >&5 echo "$as_me:$LINENO: checking for libintl.h" >&5
echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
@@ -7863,7 +8066,7 @@ fi
if test $ac_cv_header_libintl_h = yes; then if test $ac_cv_header_libintl_h = yes; then
echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6 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 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
@@ -7881,7 +8084,7 @@ int
main () main ()
{ {
bindtextdomain ("", ""); bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr
; ;
return 0; return 0;
} }
@@ -7898,21 +8101,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
gt_cv_func_gnugettext1_libc=yes gt_cv_func_gnugettext2_libc=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
gt_cv_func_gnugettext1_libc=no gt_cv_func_gnugettext2_libc=no
fi fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi fi
echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5 echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libc" >&5
echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6 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 "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6 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 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
gt_save_LIBS="$LIBS" gt_save_LIBS="$LIBS"
@@ -7932,7 +8135,7 @@ int
main () main ()
{ {
bindtextdomain ("", ""); bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr
; ;
return 0; return 0;
} }
@@ -7949,28 +8152,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
gt_cv_func_gnugettext1_libintl=yes gt_cv_func_gnugettext2_libintl=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
gt_cv_func_gnugettext1_libintl=no gt_cv_func_gnugettext2_libintl=no
fi fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$gt_save_LIBS" LIBS="$gt_save_LIBS"
fi fi
echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5 echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libintl" >&5
echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6 echo "${ECHO_T}$gt_cv_func_gnugettext2_libintl" >&6
fi fi
if test "$gt_cv_func_gnugettext1_libc" = "yes" \ if test "$gt_cv_func_gnugettext2_libc" = "yes" \
|| { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \
&& test "$PACKAGE" != gettext; }; then && test "$PACKAGE" != gettext; }; then
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define HAVE_GETTEXT 1 #define HAVE_GETTEXT 1
_ACEOF _ACEOF
if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
INTLLIBS="-lintl $LIBICONV" INTLLIBS="-lintl $LIBICONV"
fi fi
@@ -8130,6 +8334,7 @@ else
echo "${ECHO_T}no" >&6 echo "${ECHO_T}no" >&6
fi fi
# Extract the first word of "xgettext", so it can be a program name with args. # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2 set dummy xgettext; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -8166,11 +8371,14 @@ else
echo "${ECHO_T}no" >&6 echo "${ECHO_T}no" >&6
fi fi
CATOBJEXT=.gmo CATOBJEXT=.gmo
fi fi
fi fi
if test "$CATOBJEXT" = "NONE"; then if test "$CATOBJEXT" = "NONE"; then
nls_cv_use_gnu_gettext=yes nls_cv_use_gnu_gettext=yes
fi fi
@@ -8290,6 +8498,7 @@ else
echo "${ECHO_T}no" >&6 echo "${ECHO_T}no" >&6
fi fi
BUILD_INCLUDED_LIBINTL=yes BUILD_INCLUDED_LIBINTL=yes
USE_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo CATOBJEXT=.gmo
@@ -8321,6 +8530,8 @@ echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
fi fi
ac_config_commands="$ac_config_commands default-1" ac_config_commands="$ac_config_commands default-1"
if test "$PACKAGE" = gettext; then if test "$PACKAGE" = gettext; then
BUILD_INCLUDED_LIBINTL=yes BUILD_INCLUDED_LIBINTL=yes
fi fi
@@ -8389,15 +8600,29 @@ echo "${ECHO_T}$ac_prog_version" >&6
POFILES="$POFILES $lang.po" POFILES="$POFILES $lang.po"
done done
nls_cv_header_intl= nls_cv_header_intl=
nls_cv_header_libgt= nls_cv_header_libgt=
DATADIRNAME=share DATADIRNAME=share
INSTOBJEXT=.mo INSTOBJEXT=.mo
GENCAT=gencat GENCAT=gencat
if test "x$CATOBJEXT" != "x"; then if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then if test "x$ALL_LINGUAS" = "x"; then
LINGUAS= LINGUAS=
@@ -8439,12 +8664,16 @@ echo "${ECHO_T}$LINGUAS" >&6
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi fi
INTL_LIBTOOL_SUFFIX_PREFIX= INTL_LIBTOOL_SUFFIX_PREFIX=
# This is necessary so that .o files in LIBOBJS are also built via # This is necessary so that .o files in LIBOBJS are also built via
# the ANSI2KNR-filtering rules. # the ANSI2KNR-filtering rules.
LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` 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" 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 cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
@@ -8522,6 +8751,7 @@ fi
DEFS=-DHAVE_CONFIG_H DEFS=-DHAVE_CONFIG_H
: ${CONFIG_STATUS=./config.status} : ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS" ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -8585,6 +8815,7 @@ fi
{ $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
{ LC_MESSAGES=C; export LC_MESSAGES; } { LC_MESSAGES=C; export LC_MESSAGES; }
# Name of the executable. # Name of the executable.
as_me=`(basename "$0") 2>/dev/null || as_me=`(basename "$0") 2>/dev/null ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
@@ -8618,6 +8849,7 @@ if test "${PATH_SEPARATOR+set}" != set; then
rm -f conftest.sh rm -f conftest.sh
fi fi
as_lineno_1=$LINENO as_lineno_1=$LINENO
as_lineno_2=$LINENO as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` 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 exit
} }
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C=' *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;; ' 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. # Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
# IFS # IFS
# We need space, tab and new line, in precisely that order. # We need space, tab and new line, in precisely that order.
as_nl=' as_nl='
@@ -8919,8 +9153,11 @@ PACKAGE_BUGREPORT='$PACKAGE_BUGREPORT'
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets for ac_config_target in $ac_config_targets
do 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_srcpath=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_top_srcpath=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` ac_top_srcpath=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
case $INSTALL in case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
*) ac_INSTALL=$ac_top_builddir$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_srcpath=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_top_srcpath=`cd "$ac_dir" && cd $ac_top_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:$LINENO: executing $ac_dest commands" >&5
echo "$as_me: executing $ac_dest commands" >&6;} echo "$as_me: executing $ac_dest commands" >&6;}
case $ac_dest in case $ac_dest in
@@ -9719,6 +9958,7 @@ _ACEOF
chmod +x $CONFIG_STATUS chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save ac_clean_files=$ac_clean_files_save
# configure is writing to config.log, and then calls config.status. # configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log. # config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open # 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. # would make configure fail if this is the last instruction.
$ac_cs_success || { (exit 1); exit 1; } $ac_cs_success || { (exit 1); exit 1; }
fi fi

View File

@@ -90,12 +90,12 @@ jm_PREREQ_ERROR
AM_WITH_DMALLOC AM_WITH_DMALLOC
ALL_LINGUAS="de es et fr ja nl tr ru" 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 # This is necessary so that .o files in LIBOBJS are also built via
# the ANSI2KNR-filtering rules. # the ANSI2KNR-filtering rules.
LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` LIB@&t@OBJS=`echo $LIB@&t@OBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
AC_SUBST(LIBOBJS) AC_SUBST(LIB@&t@OBJS)
AC_OUTPUT([Makefile AC_OUTPUT([Makefile
config/Makefile config/Makefile

View File

@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@ INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@

View File

@@ -31,115 +31,115 @@ instead of in the original English.
 
Indirect: Indirect:
bison.info-1: 1313 bison.info-1: 1313
bison.info-2: 50689 bison.info-2: 50690
bison.info-3: 100579 bison.info-3: 100580
bison.info-4: 147579 bison.info-4: 147602
bison.info-5: 197449 bison.info-5: 197472
 
Tag Table: Tag Table:
(Indirect) (Indirect)
Node: Top1313 Node: Top1313
Node: Introduction8967 Node: Introduction8968
Node: Conditions10242 Node: Conditions10243
Node: Copying11706 Node: Copying11707
Node: Concepts30909 Node: Concepts30910
Node: Language and Grammar31988 Node: Language and Grammar31989
Node: Grammar in Bison37004 Node: Grammar in Bison37005
Node: Semantic Values38928 Node: Semantic Values38929
Node: Semantic Actions41029 Node: Semantic Actions41030
Node: Locations Overview42218 Node: Locations Overview42219
Node: Bison Parser43665 Node: Bison Parser43666
Node: Stages45977 Node: Stages45978
Node: Grammar Layout47260 Node: Grammar Layout47261
Node: Examples48517 Node: Examples48518
Node: RPN Calc49715 Node: RPN Calc49716
Node: Rpcalc Decls50689 Node: Rpcalc Decls50690
Node: Rpcalc Rules52276 Node: Rpcalc Rules52277
Node: Rpcalc Input54076 Node: Rpcalc Input54077
Node: Rpcalc Line55537 Node: Rpcalc Line55538
Node: Rpcalc Expr56652 Node: Rpcalc Expr56653
Node: Rpcalc Lexer58597 Node: Rpcalc Lexer58598
Node: Rpcalc Main61169 Node: Rpcalc Main61170
Node: Rpcalc Error61567 Node: Rpcalc Error61568
Node: Rpcalc Gen62575 Node: Rpcalc Gen62576
Node: Rpcalc Compile63724 Node: Rpcalc Compile63725
Node: Infix Calc64599 Node: Infix Calc64600
Node: Simple Error Recovery67306 Node: Simple Error Recovery67307
Node: Location Tracking Calc69195 Node: Location Tracking Calc69196
Node: Ltcalc Decls69925 Node: Ltcalc Decls69926
Node: Ltcalc Rules70834 Node: Ltcalc Rules70835
Node: Ltcalc Lexer72895 Node: Ltcalc Lexer72896
Node: Multi-function Calc75233 Node: Multi-function Calc75234
Node: Mfcalc Decl76800 Node: Mfcalc Decl76801
Node: Mfcalc Rules78823 Node: Mfcalc Rules78824
Node: Mfcalc Symtab80203 Node: Mfcalc Symtab80204
Node: Exercises86576 Node: Exercises86577
Node: Grammar File87082 Node: Grammar File87083
Node: Grammar Outline87930 Node: Grammar Outline87931
Node: C Declarations88664 Node: C Declarations88665
Node: Bison Declarations89244 Node: Bison Declarations89245
Node: Grammar Rules89656 Node: Grammar Rules89657
Node: C Code90116 Node: C Code90117
Node: Symbols91046 Node: Symbols91047
Node: Rules96127 Node: Rules96128
Node: Recursion97766 Node: Recursion97767
Node: Semantics99485 Node: Semantics99486
Node: Value Type100579 Node: Value Type100580
Node: Multiple Types101251 Node: Multiple Types101252
Node: Actions102268 Node: Actions102269
Node: Action Types105053 Node: Action Types105054
Node: Mid-Rule Actions106356 Node: Mid-Rule Actions106357
Node: Locations111926 Node: Locations111927
Node: Location Type112574 Node: Location Type112575
Node: Actions and Locations113132 Node: Actions and Locations113133
Node: Location Default Action115288 Node: Location Default Action115289
Node: Declarations116751 Node: Declarations116752
Node: Token Decl118070 Node: Token Decl118071
Node: Precedence Decl120083 Node: Precedence Decl120084
Node: Union Decl121634 Node: Union Decl121635
Node: Type Decl122478 Node: Type Decl122479
Node: Expect Decl123384 Node: Expect Decl123385
Node: Start Decl124930 Node: Start Decl124953
Node: Pure Decl125308 Node: Pure Decl125331
Node: Decl Summary126985 Node: Decl Summary127008
Node: Multiple Parsers133113 Node: Multiple Parsers133136
Node: Interface134607 Node: Interface134630
Node: Parser Function135479 Node: Parser Function135502
Node: Lexical136314 Node: Lexical136337
Node: Calling Convention137720 Node: Calling Convention137743
Node: Token Values140491 Node: Token Values140514
Node: Token Positions141640 Node: Token Positions141663
Node: Pure Calling142525 Node: Pure Calling142548
Node: Error Reporting145457 Node: Error Reporting145480
Node: Action Features147579 Node: Action Features147602
Node: Algorithm150874 Node: Algorithm150897
Node: Look-Ahead153167 Node: Look-Ahead153190
Node: Shift/Reduce155299 Node: Shift/Reduce155322
Node: Precedence158211 Node: Precedence158234
Node: Why Precedence158862 Node: Why Precedence158885
Node: Using Precedence160727 Node: Using Precedence160750
Node: Precedence Examples161695 Node: Precedence Examples161718
Node: How Precedence162396 Node: How Precedence162419
Node: Contextual Precedence163545 Node: Contextual Precedence163568
Node: Parser States165336 Node: Parser States165359
Node: Reduce/Reduce166579 Node: Reduce/Reduce166602
Node: Mystery Conflicts170140 Node: Mystery Conflicts170163
Node: Stack Overflow173526 Node: Stack Overflow173549
Node: Error Recovery174899 Node: Error Recovery174922
Node: Context Dependency180035 Node: Context Dependency180058
Node: Semantic Tokens180883 Node: Semantic Tokens180906
Node: Lexical Tie-ins183900 Node: Lexical Tie-ins183923
Node: Tie-in Recovery185448 Node: Tie-in Recovery185471
Node: Debugging187620 Node: Debugging187643
Node: Invocation190921 Node: Invocation190944
Node: Bison Options192173 Node: Bison Options192196
Node: Environment Variables195723 Node: Environment Variables195746
Node: Option Cross Key196571 Node: Option Cross Key196594
Node: VMS Invocation197449 Node: VMS Invocation197472
Node: Table of Symbols198233 Node: Table of Symbols198256
Node: Glossary206201 Node: Glossary206224
Node: Copying This Manual212505 Node: Copying This Manual212528
Node: GNU Free Documentation License212714 Node: GNU Free Documentation License212737
Node: Index232579 Node: Index232602
 
End Tag Table End Tag Table

View File

@@ -34,7 +34,7 @@ File: bison.info, Node: Top, Next: Introduction, Up: (dir)
Bison Bison
***** *****
This manual documents version 1.30b of Bison, updated 5 November This manual documents version 1.30b of Bison, updated 12 November
2001. 2001.
* Menu: * Menu:

View File

@@ -623,19 +623,20 @@ Suppressing Conflict Warnings
Bison normally warns if there are any conflicts in the grammar Bison normally warns if there are any conflicts in the grammar
(*note Shift/Reduce Conflicts: Shift/Reduce.), but most real grammars (*note Shift/Reduce Conflicts: Shift/Reduce.), but most real grammars
have harmless shift/reduce conflicts which are resolved in a have harmless shift/reduce conflicts which are resolved in a predictable
predictable way and would be difficult to eliminate. It is desirable way and would be difficult to eliminate. It is desirable to suppress
to suppress the warning about these conflicts unless the number of the warning about these conflicts unless the number of conflicts
conflicts changes. You can do this with the `%expect' declaration. changes. You can do this with the `%expect' declaration.
The declaration looks like this: The declaration looks like this:
%expect N %expect N
Here N is a decimal integer. The declaration says there should be no Here N is a decimal integer. The declaration says there should be
warning if there are N shift/reduce conflicts and no reduce/reduce 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. An error, instead of the usual warning, is given if there
conflicts, or if there are any reduce/reduce conflicts. are either more or fewer conflicts, or if there are any reduce/reduce
conflicts.
In general, using `%expect' involves these steps: In general, using `%expect' involves these steps:

View File

@@ -3070,11 +3070,11 @@ terminal symbol. All kinds of token declarations allow
@findex %expect @findex %expect
Bison normally warns if there are any conflicts in the grammar 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 (@pxref{Shift/Reduce, ,Shift/Reduce Conflicts}), but most real grammars
conflicts which are resolved in a predictable way and would be difficult to have harmless shift/reduce conflicts which are resolved in a predictable
eliminate. It is desirable to suppress the warning about these conflicts way and would be difficult to eliminate. It is desirable to suppress
unless the number of conflicts changes. You can do this with the the warning about these conflicts unless the number of conflicts
@code{%expect} declaration. changes. You can do this with the @code{%expect} declaration.
The declaration looks like this: The declaration looks like this:
@@ -3082,10 +3082,11 @@ The declaration looks like this:
%expect @var{n} %expect @var{n}
@end example @end example
Here @var{n} is a decimal integer. The declaration says there should be no Here @var{n} is a decimal integer. The declaration says there should be
warning if there are @var{n} shift/reduce conflicts and no reduce/reduce no warning if there are @var{n} shift/reduce conflicts and no
conflicts. The usual warning is given if there are either more or fewer reduce/reduce conflicts. An error, instead of the usual warning, is
conflicts, or if there are any reduce/reduce conflicts. 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: In general, using @code{%expect} involves these steps:

View File

@@ -1,4 +1,4 @@
@set UPDATED 5 November 2001 @set UPDATED 12 November 2001
@set UPDATED-MONTH November 2001 @set UPDATED-MONTH November 2001
@set EDITION 1.30b @set EDITION 1.30b
@set VERSION 1.30b @set VERSION 1.30b

View File

@@ -1,4 +1,4 @@
@set UPDATED 5 November 2001 @set UPDATED 12 November 2001
@set UPDATED-MONTH November 2001 @set UPDATED-MONTH November 2001
@set EDITION 1.30b @set EDITION 1.30b
@set VERSION 1.30b @set VERSION 1.30b

View File

@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@ INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@

View File

@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@ INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@

View File

@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@ INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@

View File

@@ -19,6 +19,7 @@
02111-1307, USA. */ 02111-1307, USA. */
#include "system.h" #include "system.h"
#include "complain.h"
#include "getargs.h" #include "getargs.h"
#include "files.h" #include "files.h"
#include "gram.h" #include "gram.h"
@@ -29,7 +30,8 @@
#include "LR0.h" #include "LR0.h"
errs **err_table = NULL; errs **err_table = NULL;
int expected_conflicts; /* -1 stands for not specified. */
int expected_conflicts = -1;
static char *conflicts = NULL; static char *conflicts = NULL;
static unsigned *shiftset = NULL; static unsigned *shiftset = NULL;
@@ -404,31 +406,23 @@ conflict_report (int src_num, int rrc_num)
static char res[4096]; static char res[4096];
char *cp = res; char *cp = res;
if (src_num == 1) if (src_num >= 1)
{ {
sprintf (cp, _(" 1 shift/reduce conflict")); sprintf (cp, ngettext ("%d shift/reduce conflict",
cp += strlen (cp); "%d shift/reduce conflicts", src_num), src_num);
}
else if (src_num > 1)
{
sprintf (cp, _(" %d shift/reduce conflicts"), src_num);
cp += strlen (cp); cp += strlen (cp);
} }
if (src_num > 0 && rrc_num > 0) if (src_num > 0 && rrc_num > 0)
{ {
sprintf (cp, _(" and")); sprintf (cp, " %s ", _("and"));
cp += strlen (cp); cp += strlen (cp);
} }
if (rrc_num == 1) if (rrc_num >= 1)
{ {
sprintf (cp, _(" 1 reduce/reduce conflict")); sprintf (cp, ngettext ("%d reduce/reduce conflict",
cp += strlen (cp); "%d reduce/reduce conflicts", rrc_num), rrc_num);
}
else if (rrc_num > 1)
{
sprintf (cp, _(" %d reduce/reduce conflicts"), rrc_num);
cp += strlen (cp); cp += strlen (cp);
} }
@@ -451,7 +445,7 @@ conflicts_output (FILE *out)
for (i = 0; i < nstates; i++) for (i = 0; i < nstates; i++)
if (conflicts[i]) if (conflicts[i])
{ {
fprintf (out, _("State %d contains"), i); fprintf (out, _("State %d contains "), i);
fputs (conflict_report (count_sr_conflicts (i), fputs (conflict_report (count_sr_conflicts (i),
count_rr_conflicts (i)), out); count_rr_conflicts (i)), out);
} }
@@ -495,9 +489,19 @@ conflicts_print (void)
} }
else else
{ {
fprintf (stderr, _("%s contains"), infile); fprintf (stderr, _("%s contains "), infile);
fputs (conflict_report (src_total, rrc_total), stderr); 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);
}
} }

View File

@@ -62,15 +62,16 @@ main (int argc, char *argv[])
if (complain_message_count) if (complain_message_count)
exit (1); exit (1);
/* find useless nonterminals and productions and reduce the grammar. In /* Find useless nonterminals and productions and reduce the grammar.
file reduce.c */ In file reduce.c. */
reduce_grammar (); 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_derives ();
set_nullable (); 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. */ See state.h for more info. */
generate_states (); generate_states ();
@@ -101,14 +102,14 @@ main (int argc, char *argv[])
/* Output the tables and the parser to ftable. In file output. */ /* Output the tables and the parser to ftable. In file output. */
output (); output ();
/* Close the input files. */
close_files ();
/* Free the symbol table data structure. */ /* Free the symbol table data structure. */
free_symtab (); free_symtab ();
lex_free (); lex_free ();
/* Close the input files. */
close_files ();
reduce_free (); reduce_free ();
free_conflicts (); free_conflicts ();
free_nullable (); free_nullable ();

View File

@@ -84,8 +84,8 @@ INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@ INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@ INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIB = @LIB@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@

View File

@@ -239,6 +239,66 @@ state 6
AT_CLEANUP(input.c input.output) 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. ## ## Mixing %token styles. ##
## ---------------------- ## ## ---------------------- ##