Compare commits

...

3 Commits

Author SHA1 Message Date
Thomas E. Dickey
7856d035dd
snapshot of project "byacc", label t20260126 2026-01-24 18:38:41 +00:00
Thomas E. Dickey
fc0cf764dd
snapshot of project "byacc", label t20251214 2025-12-15 00:42:08 +00:00
Thomas E. Dickey
2cb9a03c0e
snapshot of project "byacc", label t20251007 2025-10-08 00:26:56 +00:00
46 changed files with 986 additions and 741 deletions

78
CHANGES
View File

@ -1,3 +1,81 @@
2026-01-24 Thomas E. Dickey <dickey@invisible-island.net>
* test/expr.oxout.h, test/btyacc/calc_code_all.tab.c,
test/btyacc/calc_code_all.tab.h, test/btyacc/calc_code_default.tab.c,
test/btyacc/calc_code_provides.tab.c,
test/btyacc/calc_code_provides.tab.h,
test/btyacc/calc_code_requires.tab.c,
test/btyacc/calc_code_requires.tab.h, test/btyacc/calc_code_top.tab.c,
test/btyacc/ok_syntax1.tab.c, test/btyacc/ok_syntax1.tab.h,
test/yacc/calc_code_all.tab.c, test/yacc/calc_code_all.tab.h,
test/yacc/calc_code_default.tab.c, test/yacc/calc_code_provides.tab.c,
test/yacc/calc_code_provides.tab.h,
test/yacc/calc_code_requires.tab.c, test/yacc/calc_code_requires.tab.h,
test/yacc/calc_code_top.tab.c, test/yacc/ok_syntax1.tab.c,
test/yacc/ok_syntax1.tab.h:
trim
* output.c, defs.h, reader.c:
add/use puts_trim() to trim trailing blanks from output files
* package/debian/copyright: bump
* configure: regen
* VERSION, package/byacc.spec, package/debian/changelog,
package/mingw-byacc.spec, package/pkgsrc/Makefile:
bump
2025-12-25 Thomas E. Dickey <dickey@invisible-island.net>
* aclocal.m4: resync with my-autoconf
2025-12-14 Thomas E. Dickey <dickey@invisible-island.net>
* VERSION, package/byacc.spec, package/debian/changelog,
package/mingw-byacc.spec, package/pkgsrc/Makefile:
bump
* configure: regen
* aclocal.m4:
resync with my-autoconf: reduces warnings if "modern" autoconf is used
* configure.in: adjusted with autoupdate
2025-11-11 Thomas E. Dickey <dickey@invisible-island.net>
* configure: regen
* aclocal.m4: resync with my-autoconf
fixes for portability vs "t64" variants of glibc
2025-10-07 Thomas E. Dickey <dickey@invisible-island.net>
* main.c, closure.c, graph.c, lalr.c, lr0.c, mkpar.c, output.c,
reader.c, verbose.c, warshall.c:
cppcheck
* package/debian/copyright, VERSION, package/byacc.spec,
package/debian/changelog, package/mingw-byacc.spec,
package/pkgsrc/Makefile:
bump
* configure: regen
* aclocal.m4: resync with my-autoconf
use CF_PROG_INSTALL
* configure.in: use CF_PROG_INSTALL
2025-07-09 Thomas E. Dickey <dickey@invisible-island.net>
* config.guess, config.sub: update to 2025-07-10
2025-06-08 Thomas E. Dickey <dickey@invisible-island.net>
* install-sh: fix license
2024-12-31 Thomas E. Dickey <dickey@invisible-island.net>
* package/pkgsrc/distinfo: regen

View File

@ -1,4 +1,4 @@
MANIFEST for byacc, version t20241231
MANIFEST for byacc, version t20260126
--------------------------------------------------------------------------------
MANIFEST this file
ACKNOWLEDGEMENTS original version of byacc - 1993

View File

@ -1 +1 @@
20241231
20260126

202
aclocal.m4 vendored
View File

@ -1,7 +1,7 @@
dnl $Id: aclocal.m4,v 1.67 2024/12/21 13:44:12 tom Exp $
dnl $Id: aclocal.m4,v 1.71 2025/12/25 23:43:31 tom Exp $
dnl Macros for byacc configure script (Thomas E. Dickey)
dnl ---------------------------------------------------------------------------
dnl Copyright 2004-2022,2023 Thomas E. Dickey
dnl Copyright 2004-2024,2025 Thomas E. Dickey
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the
@ -184,7 +184,7 @@ dnl Allow user to enable a normally-off option.
AC_DEFUN([CF_ARG_ENABLE],
[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ARG_OPTION version: 5 updated: 2015/05/10 19:52:14
dnl CF_ARG_OPTION version: 6 updated: 2025/08/05 04:09:09
dnl -------------
dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
dnl values.
@ -193,7 +193,7 @@ dnl Parameters:
dnl $1 = option name
dnl $2 = help-string
dnl $3 = action to perform if option is not default
dnl $4 = action if perform if option is default
dnl $4 = action to perform if option is default
dnl $5 = default option value (either 'yes' or 'no')
AC_DEFUN([CF_ARG_OPTION],
[AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes)
@ -207,7 +207,7 @@ ifelse([$3],,[ :]dnl
])dnl
])])dnl
dnl ---------------------------------------------------------------------------
dnl CF_C11_NORETURN version: 4 updated: 2023/02/18 17:41:25
dnl CF_C11_NORETURN version: 5 updated: 2025/12/14 17:40:20
dnl ---------------
AC_DEFUN([CF_C11_NORETURN],
[
@ -220,12 +220,12 @@ AC_MSG_RESULT($enable_stdnoreturn)
if test $enable_stdnoreturn = yes; then
AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn,
[AC_TRY_COMPILE([
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
$ac_includes_default
#include <stdnoreturn.h>
static _Noreturn void giveup(void) { exit(0); }
],
[if (feof(stdin)) giveup()],
[if (feof(stdin)) giveup()])],
cf_cv_c11_noreturn=yes,
cf_cv_c11_noreturn=no)
])
@ -344,7 +344,7 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_CLANG_COMPILER version: 9 updated: 2023/02/18 17:41:25
dnl CF_CLANG_COMPILER version: 11 updated: 2025/12/14 17:46:02
dnl -----------------
dnl Check if the given compiler is really clang. clang's C driver defines
dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does
@ -363,12 +363,12 @@ ifelse([$2],,CLANG_COMPILER,[$2])=no
if test "$ifelse([$1],,[$1],GCC)" = yes ; then
AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler)
cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
AC_TRY_COMPILE([],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[
#ifdef __clang__
#else
#error __clang__ is not defined
#endif
],[ifelse([$2],,CLANG_COMPILER,[$2])=yes
])],[ifelse([$2],,CLANG_COMPILER,[$2])=yes
],[])
ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2]))
@ -397,9 +397,9 @@ if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then
AC_MSG_CHECKING(if option $cf_clang_opt works)
cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $cf_clang_opt"
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <stdio.h>],[
printf("hello!\\n");],[
printf("hello!\\n");])],[
cf_clang_optok=yes],[
cf_clang_optok=no])
AC_MSG_RESULT($cf_clang_optok)
@ -412,7 +412,7 @@ if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then
fi
])
dnl ---------------------------------------------------------------------------
dnl CF_CONST_X_STRING version: 9 updated: 2024/12/04 03:49:57
dnl CF_CONST_X_STRING version: 10 updated: 2025/12/14 17:40:20
dnl -----------------
dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most
dnl character-strings.
@ -437,22 +437,22 @@ AC_REQUIRE([AC_PATH_XTRA])
CF_SAVE_XTRA_FLAGS([CF_CONST_X_STRING])
AC_TRY_COMPILE(
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[
$ac_includes_default
#include <X11/Intrinsic.h>
],
[String foo = malloc(1); free((void*)foo)],[
[String foo = malloc(1); free((void*)foo)])],[
AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[
AC_TRY_COMPILE(
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[
#undef _CONST_X_STRING
#define _CONST_X_STRING /* X11R7.8 (perhaps) */
#undef XTSTRINGDEFINES /* X11R5 and later */
$ac_includes_default
#include <X11/Intrinsic.h>
],[String foo = malloc(1); *foo = 0],[
],[String foo = malloc(1); *foo = 0])],[
cf_cv_const_x_string=no
],[
cf_cv_const_x_string=yes
@ -473,6 +473,11 @@ esac
])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_DIRNAME version: 5 updated: 2020/12/31 20:19:42
dnl ----------
dnl "dirname" is not portable, so we fake it with a shell script.
AC_DEFUN([CF_DIRNAME],[$1=`echo "$2" | sed -e 's%/[[^/]]*$%%'`])dnl
dnl ---------------------------------------------------------------------------
dnl CF_DISABLE_ECHO version: 14 updated: 2021/09/04 06:35:04
dnl ---------------
dnl You can always use "make -n" to see the actual options, but it is hard to
@ -605,7 +610,7 @@ fi
AC_SUBST(EXTRA_CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GCC_ATTRIBUTES version: 24 updated: 2021/03/20 12:00:25
dnl CF_GCC_ATTRIBUTES version: 28 updated: 2025/12/25 18:43:31
dnl -----------------
dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary
@ -632,7 +637,8 @@ cat > conftest.i <<EOF
EOF
if test "$GCC" = yes
then
AC_CHECKING([for $CC __attribute__ directives])
AC_MSG_CHECKING([for $CC __attribute__ directives])
test -n "$verbose" && AC_MSG_RESULT()
cat > "conftest.$ac_ext" <<EOF
#line __oline__ "${as_me:-configure}"
#include <stdio.h>
@ -660,7 +666,7 @@ EOF
do
CF_UPPER(cf_ATTRIBUTE,$cf_attribute)
cf_directive="__attribute__(($cf_attribute))"
echo "checking for $CC $cf_directive" 1>&AC_FD_CC
echo "checking for $CC $cf_directive" 1>&AS_MESSAGE_LOG_FD
case "$cf_attribute" in
(printf)
@ -735,7 +741,7 @@ CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GCC_WARNINGS version: 43 updated: 2024/12/21 08:44:12
dnl CF_GCC_WARNINGS version: 45 updated: 2025/12/24 09:07:25
dnl ---------------
dnl Check if the compiler supports useful warning options. There's a few that
dnl we don't use, simply because they're too noisy:
@ -776,7 +782,8 @@ then
# remark #981: operands are evaluated in unspecified order
# warning #279: controlling expression is constant
AC_CHECKING([for $CC warning options])
AC_MSG_CHECKING([for $CC warning options])
test -n "$verbose" && AC_MSG_RESULT()
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
for cf_opt in \
@ -799,7 +806,8 @@ then
CFLAGS="$cf_save_CFLAGS"
elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
then
AC_CHECKING([for $CC warning options])
AC_MSG_CHECKING([for $CC warning options])
test -n "$verbose" && AC_MSG_RESULT()
cf_save_CFLAGS="$CFLAGS"
cf_warn_CONST=""
test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
@ -849,7 +857,7 @@ rm -rf ./conftest*
AC_SUBST(EXTRA_CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GETOPT_HEADER version: 9 updated: 2024/08/10 10:30:39
dnl CF_GETOPT_HEADER version: 10 updated: 2025/12/14 17:40:20
dnl ----------------
dnl Check for getopt's variables which are commonly defined in stdlib.h,
dnl unistd.h or (nonstandard) in getopt.h
@ -861,9 +869,9 @@ AC_CACHE_CHECK(for header declaring getopt variables,cf_cv_getopt_header,[
cf_cv_getopt_header=none
for cf_header in stdio.h stdlib.h unistd.h getopt.h
do
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <$cf_header>],
[int x = optind; char *y = optarg; (void)x; (void)y],
[int x = optind; char *y = optarg; (void)x; (void)y])],
[cf_cv_getopt_header=$cf_header
break])
done
@ -896,7 +904,7 @@ AC_SUBST(GLOB_FULLPATH_POSIX)
AC_SUBST(GLOB_FULLPATH_OTHER)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNU_SOURCE version: 10 updated: 2018/12/10 20:09:41
dnl CF_GNU_SOURCE version: 11 updated: 2025/12/14 17:40:20
dnl -------------
dnl Check if we must define _GNU_SOURCE to get a reasonable value for
dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect
@ -912,14 +920,14 @@ AC_DEFUN([CF_GNU_SOURCE],
cf_gnu_xopen_source=ifelse($1,,500,$1)
AC_CACHE_CHECK(if this is the GNU C library,cf_cv_gnu_library,[
AC_TRY_COMPILE([#include <sys/types.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>],[
#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
return 0;
#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
return 0;
#else
# error not GNU C library
#endif],
#endif])],
[cf_cv_gnu_library=yes],
[cf_cv_gnu_library=no])
])
@ -932,14 +940,14 @@ if test x$cf_cv_gnu_library = xyes; then
AC_CACHE_CHECK(if _DEFAULT_SOURCE can be used as a basis,cf_cv_gnu_library_219,[
cf_save="$CPPFLAGS"
CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE)
AC_TRY_COMPILE([#include <sys/types.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>],[
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
return 0;
#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
return 0;
#else
# error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
#endif],
#endif])],
[cf_cv_gnu_library_219=yes],
[cf_cv_gnu_library_219=no])
CPPFLAGS="$cf_save"
@ -949,7 +957,7 @@ if test x$cf_cv_gnu_library = xyes; then
cf_save="$CPPFLAGS"
AC_CACHE_CHECK(if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE,cf_cv_gnu_dftsrc_219,[
CF_ADD_CFLAGS(-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source)
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <limits.h>
#include <sys/types.h>
],[
@ -957,7 +965,7 @@ if test x$cf_cv_gnu_library = xyes; then
return 0;
#else
# error GNU C library is too old
#endif],
#endif])],
[cf_cv_gnu_dftsrc_219=yes],
[cf_cv_gnu_dftsrc_219=no])
])
@ -969,17 +977,17 @@ if test x$cf_cv_gnu_library = xyes; then
if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
AC_TRY_COMPILE([#include <sys/types.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>],[
#ifndef _XOPEN_SOURCE
#error expected _XOPEN_SOURCE to be defined
#endif],
#endif])],
[cf_cv_gnu_source=no],
[cf_save="$CPPFLAGS"
CF_ADD_CFLAGS(-D_GNU_SOURCE)
AC_TRY_COMPILE([#include <sys/types.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>],[
#ifdef _XOPEN_SOURCE
#error expected _XOPEN_SOURCE to be undefined
#endif],
#endif])],
[cf_cv_gnu_source=no],
[cf_cv_gnu_source=yes])
CPPFLAGS="$cf_save"
@ -990,10 +998,10 @@ if test x$cf_cv_gnu_library = xyes; then
then
AC_CACHE_CHECK(if we should also define _DEFAULT_SOURCE,cf_cv_default_source,[
CF_APPEND_TEXT(CPPFLAGS,-D_GNU_SOURCE)
AC_TRY_COMPILE([#include <sys/types.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>],[
#ifdef _DEFAULT_SOURCE
#error expected _DEFAULT_SOURCE to be undefined
#endif],
#endif])],
[cf_cv_default_source=no],
[cf_cv_default_source=yes])
])
@ -1007,7 +1015,7 @@ if test x$cf_cv_gnu_library = xyes; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_INSTALL_MAN version: 6 updated: 2024/04/01 04:21:53
dnl CF_INSTALL_MAN version: 7 updated: 2025/12/14 18:08:20
dnl --------------
dnl Call this to generate a script "install-man" which uses the detected
dnl manpage-format to compress the resulting manpage. Providing this as a
@ -1030,7 +1038,7 @@ AC_DEFUN([CF_INSTALL_MAN],
[
AC_REQUIRE([AC_ARG_PROGRAM])
AC_REQUIRE([AC_PROG_INSTALL])
AC_REQUIRE([AC_LN_S])
AC_REQUIRE([AC_PROG_LN_S])
AC_REQUIRE([CF_MANPAGE_FORMAT])
cf_install_man=install-man
ac_config_files="$ac_config_files $cf_install_man"
@ -1152,7 +1160,7 @@ exit 0
CF_EOF
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_INTEL_COMPILER version: 9 updated: 2023/02/18 17:41:25
dnl CF_INTEL_COMPILER version: 10 updated: 2025/12/14 17:40:20
dnl -----------------
dnl Check if the given compiler is really the Intel compiler for Linux. It
dnl tries to imitate gcc, but does not return an error when it finds a mismatch
@ -1175,12 +1183,12 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then
AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler)
cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc"
AC_TRY_COMPILE([],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[
#ifdef __INTEL_COMPILER
#else
#error __INTEL_COMPILER is not defined
#endif
],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
])],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
cf_save_CFLAGS="$cf_save_CFLAGS -we147"
],[])
ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
@ -1292,9 +1300,9 @@ AC_SUBST(MAKE_UPPER_TAGS)
AC_SUBST(MAKE_LOWER_TAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_MANPAGE_FORMAT version: 19 updated: 2024/03/30 08:27:40
dnl CF_MANPAGE_FORMAT version: 20 updated: 2025/11/11 20:09:36
dnl -----------------
dnl Option to allow user to override automatic configuration of manpage format.
dnl Option to allow user to override automatic configuration of man page format.
dnl There are several special cases:
dnl
dnl compress - man checks for, can display compressed files
@ -1307,15 +1315,15 @@ dnl formatted - installer should format (put files in cat-directory)
dnl catonly - installer should only format, e.g., for a turnkey system.
dnl
dnl There are other configurations which this macro does not test, e.g., HPUX's
dnl compressed manpages (but uncompressed manpages are fine, and HPUX's naming
dnl compressed man pages (but uncompressed man pages are fine, and HPUX's naming
dnl convention would not match our use).
AC_DEFUN([CF_MANPAGE_FORMAT],
[
AC_REQUIRE([CF_PATHSEP])
AC_MSG_CHECKING(format of man-pages)
AC_MSG_CHECKING(format of man pages)
AC_ARG_WITH(manpage-format,
[ --with-manpage-format specify manpage-format: gzip/compress/bzip2/xz,
[ --with-manpage-format specify man page format: gzip/compress/bzip2/xz,
BSDI/normal and optionally formatted/catonly,
e.g., gzip,formatted],
[MANPAGE_FORMAT=$withval],
@ -1332,7 +1340,7 @@ case "$MANPAGE_FORMAT" in
MANPATH="/usr/man:/usr/share/man"
fi
# look for the 'date' man-page (it is most likely to be installed!)
# look for the 'date' man page (it is most likely to be installed!)
MANPAGE_FORMAT=
cf_preform="no"
cf_catonly="yes"
@ -1379,7 +1387,7 @@ case "$MANPAGE_FORMAT" in
test "$cf_found" = yes && break
fi
done
# only check the first directory in $MANPATH where we find manpages
# only check the first directory in $MANPATH where we find man pages
if test -n "$MANPAGE_FORMAT" ; then
break
fi
@ -1403,7 +1411,7 @@ esac
AC_MSG_RESULT($MANPAGE_FORMAT)
if test -n "$cf_unknown" ; then
AC_MSG_WARN(Unexpected manpage-format $cf_unknown)
AC_MSG_WARN(Unexpected man page format $cf_unknown)
fi
cf_manpage_format=no
@ -1481,7 +1489,7 @@ fi
test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_MKSTEMP version: 13 updated: 2023/12/01 17:22:50
dnl CF_MKSTEMP version: 14 updated: 2025/12/14 18:08:20
dnl ----------
dnl Check for a working mkstemp. This creates two files, checks that they are
dnl successfully created and distinct (AmigaOS apparently fails on the last).
@ -1491,7 +1499,7 @@ unistd.h \
)
AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[
rm -rf ./conftest*
AC_TRY_RUN([
AC_RUN_IFELSE([AC_LANG_SOURCE([[
$ac_includes_default
int main(void)
@ -1521,7 +1529,7 @@ int main(void)
result = 1;
${cf_cv_main_return:-return}(result);
}
],[cf_cv_func_mkstemp=yes
]])],[cf_cv_func_mkstemp=yes
],[cf_cv_func_mkstemp=no
],[cf_cv_func_mkstemp=maybe])
])
@ -1533,12 +1541,12 @@ if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; th
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32
dnl CF_MSG_LOG version: 6 updated: 2025/12/14 17:51:46
dnl ----------
dnl Write a debug message to config.log, along with the line number in the
dnl configure script.
AC_DEFUN([CF_MSG_LOG],[
echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AS_MESSAGE_LOG_FD
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_NO_LEAKS_OPTION version: 9 updated: 2021/06/13 19:45:41
@ -1596,7 +1604,7 @@ ifelse([$1],,,[$1=$PATH_SEPARATOR])
AC_MSG_RESULT($PATH_SEPARATOR)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PATH_SYNTAX version: 19 updated: 2024/08/03 13:08:58
dnl CF_PATH_SYNTAX version: 20 updated: 2025/12/16 04:09:03
dnl --------------
dnl Check the argument to see that it looks like a pathname. Rewrite it if it
dnl begins with one of the prefix/exec_prefix variables, and then again if the
@ -1628,12 +1636,12 @@ case "x[$]$1" in
$1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%`
;;
(*)
ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)
ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not "[$]$1"])],$2)
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_POSIX_C_SOURCE version: 12 updated: 2023/02/18 17:41:25
dnl CF_POSIX_C_SOURCE version: 13 updated: 2025/12/14 17:40:20
dnl -----------------
dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
dnl
@ -1662,10 +1670,10 @@ CF_REMOVE_DEFINE(cf_trim_CPPFLAGS,$cf_save_CPPFLAGS,_POSIX_C_SOURCE)
AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[
CF_MSG_LOG(if the symbol is already defined go no further)
AC_TRY_COMPILE([#include <sys/types.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>],[
#ifndef _POSIX_C_SOURCE
#error _POSIX_C_SOURCE is not defined
#endif],
#endif])],
[cf_cv_posix_c_source=no],
[cf_want_posix_source=no
case .$cf_POSIX_C_SOURCE in
@ -1681,10 +1689,10 @@ AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[
;;
esac
if test "$cf_want_posix_source" = yes ; then
AC_TRY_COMPILE([#include <sys/types.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>],[
#ifdef _POSIX_SOURCE
#error _POSIX_SOURCE is defined
#endif],[],
#endif])],[],
cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE")
fi
CF_MSG_LOG(ifdef from value $cf_POSIX_C_SOURCE)
@ -1692,10 +1700,10 @@ AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[
CPPFLAGS="$cf_trim_CPPFLAGS"
CF_APPEND_TEXT(CPPFLAGS,$cf_cv_posix_c_source)
CF_MSG_LOG(if the second compile does not leave our definition intact error)
AC_TRY_COMPILE([#include <sys/types.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>],[
#ifndef _POSIX_C_SOURCE
#error _POSIX_C_SOURCE is not defined
#endif],,
#endif])],,
[cf_cv_posix_c_source=no])
CFLAGS="$cf_save_CFLAGS"
CPPFLAGS="$cf_save_CPPFLAGS"
@ -1712,7 +1720,7 @@ fi # cf_cv_posix_visible
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_POSIX_VISIBLE version: 1 updated: 2018/12/31 20:46:17
dnl CF_POSIX_VISIBLE version: 2 updated: 2025/12/14 17:40:20
dnl ----------------
dnl POSIX documents test-macros which an application may set before any system
dnl headers are included to make features available.
@ -1728,14 +1736,14 @@ dnl conflicting definition.
AC_DEFUN([CF_POSIX_VISIBLE],
[
AC_CACHE_CHECK(if the POSIX test-macros are already defined,cf_cv_posix_visible,[
AC_TRY_COMPILE([#include <stdio.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>],[
#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
#error conflicting symbols found
#endif
],[cf_cv_posix_visible=no],[cf_cv_posix_visible=yes])
])],[cf_cv_posix_visible=no],[cf_cv_posix_visible=yes])
])
])dnl
dnl ---------------------------------------------------------------------------
@ -1785,6 +1793,34 @@ AC_SUBST(GROFF_NOTE)
AC_SUBST(NROFF_NOTE)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PROG_INSTALL version: 13 updated: 2025/10/21 16:28:49
dnl ---------------
dnl Force $INSTALL to be an absolute-path. Otherwise, edit_man.sh and the
dnl misc/tabset install won't work properly. Usually this happens only when
dnl using the fallback mkinstalldirs script
AC_DEFUN([CF_PROG_INSTALL],
[AC_PROG_INSTALL
AC_REQUIRE([CF_GLOB_FULLPATH])dnl
if test "x$INSTALL" = "x./install-sh -c"; then
if test -f /usr/sbin/install ; then
case "$host_os" in
(linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
INSTALL=/usr/sbin/install
;;
esac
fi
fi
case x$INSTALL in
(x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
;;
(*)
CF_DIRNAME(cf_dir,$INSTALL)
test -z "$cf_dir" && cf_dir=.
INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PROG_LINT version: 7 updated: 2024/11/30 14:37:45
dnl ------------
AC_DEFUN([CF_PROG_LINT],
@ -1837,17 +1873,17 @@ $1=`echo "$2" | \
-e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_TRY_XOPEN_SOURCE version: 4 updated: 2022/09/10 15:16:16
dnl CF_TRY_XOPEN_SOURCE version: 5 updated: 2025/12/14 17:40:20
dnl -------------------
dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we
dnl can define it successfully.
AC_DEFUN([CF_TRY_XOPEN_SOURCE],[
AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY)],
[cf_cv_xopen_source=no],
[cf_save="$CPPFLAGS"
CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE)
AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY)],
[cf_cv_xopen_source=no],
[cf_cv_xopen_source=$cf_XOPEN_SOURCE])
CPPFLAGS="$cf_save"
@ -1871,11 +1907,11 @@ AC_DEFUN([CF_UPPER],
$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12
dnl CF_VERBOSE version: 4 updated: 2025/12/14 17:51:46
dnl ----------
dnl Use AC_VERBOSE w/o the warnings
AC_DEFUN([CF_VERBOSE],
[test -n "$verbose" && echo " $1" 1>&AC_FD_MSG
[test -n "$verbose" && echo " $1" 1>&AS_MESSAGE_FD
CF_MSG_LOG([$1])
])dnl
dnl ---------------------------------------------------------------------------
@ -2097,7 +2133,7 @@ AC_SUBST(MAN2HTML_PATH)
AC_SUBST(MAN2HTML_TEMP)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_WITH_SYSTYPE version: 1 updated: 2013/01/26 16:26:12
dnl CF_WITH_SYSTYPE version: 2 updated: 2025/12/14 18:08:20
dnl ---------------
dnl For testing, override the derived host system-type which is used to decide
dnl things such as the linker commands used to build shared libraries. This is
@ -2108,7 +2144,7 @@ dnl This is different from the --host option: it is used only for testing parts
dnl of the configure script which would not be reachable with --host since that
dnl relies on the build environment being real, rather than mocked up.
AC_DEFUN([CF_WITH_SYSTYPE],[
CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
CF_CHECK_CACHE([AC_CANONICAL_TARGET])
AC_ARG_WITH(system-type,
[ --with-system-type=XXX test: override derived host system-type],
[AC_MSG_WARN(overriding system type to $withval)
@ -2125,7 +2161,7 @@ CF_NO_LEAKS_OPTION(valgrind,
[USE_VALGRIND])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_XOPEN_SOURCE version: 68 updated: 2024/11/09 18:07:29
dnl CF_XOPEN_SOURCE version: 71 updated: 2025/12/14 17:40:20
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
@ -2185,7 +2221,7 @@ case "$host_os" in
cf_xopen_source="-D_SGI_SOURCE"
cf_XOPEN_SOURCE=
;;
(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
(linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
CF_GNU_SOURCE($cf_XOPEN_SOURCE)
;;
linux*musl)
@ -2242,7 +2278,7 @@ linux*musl)
# Some of these niche implementations use copy/paste, double-check...
if test "$cf_cv_xopen_source" = no ; then
CF_VERBOSE(checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE)
AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,,[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY)],,[
AC_MSG_WARN(_POSIX_C_SOURCE definition is not usable)
CPPFLAGS="$cf_save_xopen_cppflags"])
fi
@ -2258,19 +2294,19 @@ dnl which is still not guaranteed to provide all of the entrypoints that
dnl _XOPEN_SOURCE would yield.
if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
AC_MSG_CHECKING(if _XOPEN_SOURCE really is set)
AC_TRY_COMPILE([#include <stdlib.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>],[
#ifndef _XOPEN_SOURCE
#error _XOPEN_SOURCE is not defined
#endif],
#endif])],
[cf_XOPEN_SOURCE_set=yes],
[cf_XOPEN_SOURCE_set=no])
AC_MSG_RESULT($cf_XOPEN_SOURCE_set)
if test "$cf_XOPEN_SOURCE_set" = yes
then
AC_TRY_COMPILE([#include <stdlib.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>],[
#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
#endif],
#endif])],
[cf_XOPEN_SOURCE_set_ok=yes],
[cf_XOPEN_SOURCE_set_ok=no])
if test "$cf_XOPEN_SOURCE_set_ok" = no

View File

@ -1,4 +1,4 @@
/* $Id: closure.c,v 1.14 2022/01/09 16:22:58 tom Exp $ */
/* $Id: closure.c,v 1.15 2025/10/08 00:22:08 tom Exp $ */
#include "defs.h"
@ -30,7 +30,7 @@ set_EFF(void)
row = EFF;
for (i = start_symbol; i < nsyms; i++)
{
Value_t *sp = derives[i];
const Value_t *sp = derives[i];
for (rule = *sp; rule > 0; rule = *++sp)
{
symbol = ritem[rrhs[rule]];
@ -56,7 +56,7 @@ set_first_derives(void)
unsigned *rrow;
int j;
unsigned cword = 0;
Value_t *rp;
const Value_t *rp;
int rule;
int i;
@ -72,7 +72,7 @@ set_first_derives(void)
rrow = first_derives;
for (i = start_symbol; i < nsyms; i++)
{
unsigned *vrow = EFF + ((i - ntokens) * varsetsize);
const unsigned *vrow = EFF + ((i - ntokens) * varsetsize);
unsigned k = BITS_PER_WORD;
for (j = start_symbol; j < nsyms; k++, j++)
@ -109,12 +109,12 @@ closure(Value_t *nucleus, int n)
unsigned ruleno;
unsigned i;
Value_t *csp;
unsigned *dsp;
const unsigned *dsp;
unsigned *rsp;
int rulesetsize;
Value_t *csend;
unsigned *rsend;
const Value_t *csend;
const unsigned *rsend;
Value_t itemno;
rulesetsize = WORDSIZE(nrules);

17
config.guess vendored
View File

@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2024 Free Software Foundation, Inc.
# Copyright 1992-2025 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268 # see below for rationale
timestamp='2024-07-27'
timestamp='2025-07-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -60,7 +60,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2024 Free Software Foundation, Inc.
Copyright 1992-2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -1597,8 +1597,11 @@ EOF
*:Unleashed:*:*)
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
;;
*:Ironclad:*:*)
GUESS=$UNAME_MACHINE-unknown-ironclad
x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*)
GUESS=$UNAME_MACHINE-pc-ironclad-mlibc
;;
*:[Ii]ronclad:*:*)
GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc
;;
esac
@ -1808,8 +1811,8 @@ fi
exit 1
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-format: "%Y-%02m-%02d"
# time-stamp-end: "'"
# End:

28
config.sub vendored
View File

@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2024 Free Software Foundation, Inc.
# Copyright 1992-2025 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
timestamp='2024-05-27'
timestamp='2025-07-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2024 Free Software Foundation, Inc.
Copyright 1992-2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -145,6 +145,7 @@ case $1 in
| kfreebsd*-gnu* \
| knetbsd*-gnu* \
| kopensolaris*-gnu* \
| ironclad-* \
| linux-* \
| managarm-* \
| netbsd*-eabi* \
@ -242,7 +243,6 @@ case $1 in
| rombug \
| semi \
| sequent* \
| siemens \
| sgi* \
| siemens \
| sim \
@ -261,7 +261,7 @@ case $1 in
basic_machine=$field1-$field2
basic_os=
;;
zephyr*)
tock* | zephyr*)
basic_machine=$field1-unknown
basic_os=$field2
;;
@ -1194,7 +1194,7 @@ case $cpu-$vendor in
xscale-* | xscalee[bl]-*)
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
arm64-* | aarch64le-*)
arm64-* | aarch64le-* | arm64_32-*)
cpu=aarch64
;;
@ -1321,6 +1321,7 @@ case $cpu-$vendor in
| i960 \
| ia16 \
| ia64 \
| intelgt \
| ip2k \
| iq2000 \
| javascript \
@ -1522,6 +1523,10 @@ EOF
kernel=nto
os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
;;
ironclad*)
kernel=ironclad
os=`echo "$basic_os" | sed -e 's|ironclad|mlibc|'`
;;
linux*)
kernel=linux
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
@ -1976,6 +1981,7 @@ case $os in
| atheos* \
| auroraux* \
| aux* \
| banan_os* \
| beos* \
| bitrig* \
| bme* \
@ -2022,7 +2028,6 @@ case $os in
| ios* \
| iris* \
| irix* \
| ironclad* \
| isc* \
| its* \
| l4re* \
@ -2118,6 +2123,7 @@ case $os in
| sysv* \
| tenex* \
| tirtos* \
| tock* \
| toppers* \
| tops10* \
| tops20* \
@ -2214,6 +2220,8 @@ case $kernel-$os-$obj in
;;
uclinux-uclibc*- | uclinux-gnu*- )
;;
ironclad-mlibc*-)
;;
managarm-mlibc*- | managarm-kernel*- )
;;
windows*-msvc*-)
@ -2249,6 +2257,8 @@ case $kernel-$os-$obj in
;;
*-eabi*- | *-gnueabi*-)
;;
ios*-simulator- | tvos*-simulator- | watchos*-simulator- )
;;
none--*)
# None (no kernel, i.e. freestanding / bare metal),
# can be paired with an machine code file format
@ -2347,8 +2357,8 @@ echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
exit
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-format: "%Y-%02m-%02d"
# time-stamp-end: "'"
# End:

985
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,17 @@
dnl Process this file with 'autoconf' to produce a 'configure' script
dnl $Id: configure.in,v 1.29 2023/05/19 07:58:43 tom Exp $
dnl $Id: configure.in,v 1.31 2025/12/14 21:55:02 tom Exp $
AC_PREREQ(2.52.20200802)
AC_REVISION($Revision: 1.29 $)
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config_h.in)
AC_REVISION($Revision: 1.31 $)
AC_INIT
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_HEADERS(config.h:config_h.in)
CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
CF_CHECK_CACHE([AC_CANONICAL_TARGET])
AC_ARG_PROGRAM
CF_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
CF_PROG_INSTALL
CF_MAKE_TAGS
CF_PROG_AWK
CF_PROG_LINT
@ -23,12 +24,12 @@ AC_CHECK_DECL(exit)
AC_CHECK_HEADERS(fcntl.h)
CF_MKSTEMP
CF_GETOPT_HEADER
AC_HAVE_FUNCS(getopt vsnprintf)
AC_CHECK_FUNCS([getopt vsnprintf])
AC_MSG_CHECKING(for maximum table size)
AC_ARG_WITH([max-table-size],
[AC_HELP_STRING([--with-max-table-size=N],
[set the maximum table size = N (no default)])])
[AS_HELP_STRING([--with-max-table-size=N],
[set the maximum table size = N (no default)])])
if test -n "$with_max_table_size"
then
AC_MSG_RESULT($with_max_table_size)
@ -44,7 +45,7 @@ fi
AC_MSG_CHECKING(if backtracking extension is wanted)
CF_ARG_DISABLE([btyacc],
[AC_HELP_STRING([--disable-btyacc],
[AS_HELP_STRING([--disable-btyacc],
[disable support for the btyacc backtracking extension (default: enabled)])],
[enable_btyacc=no],
[enable_btyacc=yes])
@ -67,5 +68,6 @@ CF_WITH_MAN2HTML
AC_TYPE_MODE_T
### output makefile
AC_OUTPUT(makefile)
AC_CONFIG_FILES([makefile])dnl
AC_OUTPUT
CF_MAKE_DOCS(yacc,1)

3
defs.h
View File

@ -1,4 +1,4 @@
/* $Id: defs.h,v 1.75 2024/12/14 14:34:38 tom Exp $ */
/* $Id: defs.h,v 1.76 2026/01/24 13:46:31 tom Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@ -563,6 +563,7 @@ extern unsigned int strnshash(const char *);
: (*(m)->ptr++ = (char) (ch)))
/* output.c */
extern void puts_trim(const char *, FILE *);
extern void output(void);
/* reader.c */

View File

@ -1,4 +1,4 @@
/* $Id: graph.c,v 1.9 2020/09/10 17:22:51 tom Exp $ */
/* $Id: graph.c,v 1.10 2025/10/08 00:22:08 tom Exp $ */
#include "defs.h"
@ -59,7 +59,7 @@ graph_state(int stateno)
for (isp = itemset; isp < itemsetend; isp++)
{
Value_t *sp1;
const Value_t *sp1;
int rule;
sp1 = sp = ritem + *isp;
@ -98,7 +98,7 @@ graph_LA(int ruleno)
if (ruleno == LAruleno[larno])
{
int i;
unsigned *rowp = LA + larno * tokensetsize;
const unsigned *rowp = LA + larno * tokensetsize;
fprintf(graph_file, " { ");
for (i = ntokens - 1; i >= 0; i--)

View File

@ -3,10 +3,18 @@
scriptversion=2020-11-14.01; # UTC
# https://lists.gnu.org/archive/html/automake/2018-09/msg00002.html
#
# Originally X11R4 util/scripts/install.sh, the following comments, copyright
# and license were added by an autoconf developer in 1998 (about nine years
# later). I have made a minor change to the wording, i.e., "copyright holders"
# vs "X Consortium", for reusability -TD
#
# -----------------------------------------------------------------------------
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# -----------------------------------------------------------------------------
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@ -22,16 +30,15 @@ scriptversion=2020-11-14.01; # UTC
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
# ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# Except as contained in this notice, the name(s) of the above copyright
# holders shall not be used in advertising or otherwise to promote the sale,
# use or other dealings in this Software without prior written authorization.
# -----------------------------------------------------------------------------
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent

12
lalr.c
View File

@ -1,4 +1,4 @@
/* $Id: lalr.c,v 1.15 2024/12/14 16:48:04 tom Exp $ */
/* $Id: lalr.c,v 1.16 2025/10/08 00:22:08 tom Exp $ */
#include "defs.h"
@ -112,7 +112,7 @@ static void
set_maxrhs(void)
{
Value_t *itemp;
Value_t *item_end;
const Value_t *item_end;
int length;
int max;
@ -526,7 +526,9 @@ static void
compute_lookaheads(void)
{
int i, n;
unsigned *fp1, *fp2, *fp3;
unsigned *fp1;
const unsigned *fp2;
unsigned *fp3;
shorts *sp, *next;
unsigned *rowp;
@ -586,9 +588,9 @@ traverse(int i)
{
unsigned *fp1;
unsigned *fp2;
unsigned *fp3;
const unsigned *fp3;
int j;
Value_t *rp;
const Value_t *rp;
Value_t height;
unsigned *base;

28
lr0.c
View File

@ -1,4 +1,4 @@
/* $Id: lr0.c,v 1.22 2024/12/14 14:35:14 tom Exp $ */
/* $Id: lr0.c,v 1.23 2025/10/08 00:22:08 tom Exp $ */
#include "defs.h"
@ -43,7 +43,7 @@ static void
allocate_itemsets(void)
{
Value_t *itemp;
Value_t *item_end;
const Value_t *item_end;
int i;
int count;
int max;
@ -160,8 +160,8 @@ static Value_t
get_state(int symbol)
{
int key;
Value_t *isp1;
Value_t *iend;
const Value_t *isp1;
const Value_t *iend;
core *sp;
int n;
@ -184,7 +184,7 @@ get_state(int symbol)
{
if (sp->nitems == n)
{
Value_t *isp2;
const Value_t *isp2;
found = 1;
isp1 = kernel_base[symbol];
@ -223,12 +223,14 @@ static void
initialize_states(void)
{
unsigned i;
Value_t *start_derives;
const Value_t *start_derives;
core *p;
start_derives = derives[start_symbol];
for (i = 0; start_derives[i] >= 0; ++i)
continue;
{
;
}
p = (core *)MALLOC(sizeof(core) + i * sizeof(Value_t));
NO_SPACE(p);
@ -251,7 +253,7 @@ new_itemsets(void)
{
Value_t i;
int shiftcount;
Value_t *isp;
const Value_t *isp;
Value_t *ksp;
for (i = 0; i < nsyms; i++)
@ -286,9 +288,9 @@ new_state(int symbol)
{
unsigned n;
core *p;
Value_t *isp1;
const Value_t *isp1;
Value_t *isp2;
Value_t *iend;
const Value_t *iend;
#ifdef TRACE
fprintf(stderr, "Entering new_state(%d)\n", symbol);
@ -402,9 +404,9 @@ static void
save_shifts(void)
{
shifts *p;
Value_t *sp1;
const Value_t *sp1;
Value_t *sp2;
Value_t *send;
const Value_t *send;
p = (shifts *)allocate((sizeof(shifts) +
(unsigned)(nshifts - 1) * sizeof(Value_t)));
@ -453,7 +455,7 @@ save_reductions(void)
if (count)
{
Value_t *rp2;
Value_t *rend;
const Value_t *rend;
p = (reductions *)allocate((sizeof(reductions) +
(unsigned)(count - 1) *

10
main.c
View File

@ -1,4 +1,4 @@
/* $Id: main.c,v 1.80 2024/12/31 20:50:11 tom Exp $ */
/* $Id: main.c,v 1.81 2025/10/08 00:23:02 tom Exp $ */
#include <signal.h>
#if !defined(_WIN32) || defined(__MINGW32__)
@ -380,7 +380,7 @@ getargs(int argc, char *argv[])
if (!strncmp(a, "--", 2))
{
char *eqls;
const char *eqls;
size_t lc;
size_t len;
@ -597,7 +597,7 @@ create_file_names(void)
size_t len;
const char *defines_suffix;
const char *externs_suffix;
char *suffix;
const char *suffix;
suffix = NULL;
defines_suffix = DEFINES_SUFFIX;
@ -642,7 +642,7 @@ create_file_names(void)
{
if (explicit_file_name)
{
char *xsuffix;
const char *xsuffix;
defines_file_name = strdup(output_file_name);
if (defines_file_name == NULL)
on_error();
@ -656,7 +656,7 @@ create_file_names(void)
!strcmp(xsuffix, ".cpp"))) /* C++ (Windows) */
{
strncpy(defines_file_name, output_file_name,
(size_t) (xsuffix - output_file_name + 1));
(size_t)(xsuffix - output_file_name + 1));
defines_file_name[xsuffix - output_file_name + 1] = 'h';
defines_file_name[xsuffix - output_file_name + 2] = 0;
}

12
mkpar.c
View File

@ -1,4 +1,4 @@
/* $Id: mkpar.c,v 1.19 2024/12/14 14:36:50 tom Exp $ */
/* $Id: mkpar.c,v 1.20 2025/10/08 00:22:08 tom Exp $ */
#include "defs.h"
@ -74,8 +74,8 @@ static action *
get_shifts(int stateno)
{
action *actions, *temp;
shifts *sp;
Value_t *to_state2;
const shifts *sp;
const Value_t *to_state2;
actions = NULL;
sp = shift_table[stateno];
@ -117,7 +117,7 @@ add_reductions(int stateno, action *actions)
for (i = m; i < n; i++)
{
int ruleno = LAruleno[i];
unsigned *rowp = LA + i * tokensetsize;
const unsigned *rowp = LA + i * tokensetsize;
for (j = ntokens - 1; j >= 0; j--)
{
@ -171,8 +171,8 @@ add_reduce(action *actions,
static void
find_final_state(void)
{
Value_t *to_state2;
shifts *p;
const Value_t *to_state2;
const shifts *p;
if ((p = shift_table[0]) != NULL)
{

View File

@ -1,4 +1,4 @@
/* $Id: output.c,v 1.102 2024/12/14 16:52:47 tom Exp $ */
/* $Id: output.c,v 1.104 2026/01/24 13:47:41 tom Exp $ */
#include "defs.h"
@ -31,6 +31,44 @@ static Value_t *check;
static int lowzero;
static long high;
void
puts_trim(const char *s, FILE * fp)
{
int ch;
int trim = 0;
const char *t = NULL;
while ((ch = *s++) != '\0')
{
if (ch == ' ' || ch == '\t')
{
if (trim++ == 0)
t = s - 1;
}
else if (ch == '\r' || ch == '\n')
{
trim = 0;
fputc(ch, fp);
}
else
{
if (trim)
{
while (t != (s - 1))
{
fputc(*t++, fp);
}
trim = 0;
}
fputc(ch, fp);
}
}
if (trim)
{
fputc(*t, fp);
}
}
static void
putc_code(FILE * fp, int c)
{
@ -197,7 +235,7 @@ output_code_lines(FILE * fp, int cl)
fprintf(fp, "\n");
}
fprintf(fp, "/* %%code \"%s\" block start */\n", code_lines[cl].name);
fputs(code_lines[cl].lines, fp);
puts_trim(code_lines[cl].lines, fp);
fprintf(fp, "/* %%code \"%s\" block end */\n", code_lines[cl].name);
if (fp == code_file)
{
@ -836,8 +874,8 @@ pack_vector(int vector)
int t;
Value_t loc;
int ok;
Value_t *from;
Value_t *to;
const Value_t *from;
const Value_t *to;
int newmax;
i = order[vector];
@ -1178,7 +1216,7 @@ output_actions(void)
static int
is_C_identifier(char *name)
{
char *s;
const char *s;
int c;
s = name;

View File

@ -1,12 +1,12 @@
Summary: public domain Berkeley LALR Yacc parser generator
%global AppVersion 2.0
%global AppPatched 20241231
%global AppPatched 20260126
%global AltProgram byacc2
%global UseProgram yacc
# $Id: byacc.spec,v 1.77 2024/12/31 15:42:50 tom Exp $
# $Id: byacc.spec,v 1.80 2026/01/24 12:09:51 tom Exp $
Name: byacc
Version: %{AppVersion}.%{AppPatched}
Release: 1
@ -103,6 +103,9 @@ popd
%changelog
# each patch should add its ChangeLog entries here
* Sat Jan 24 2026 Thomas E. Dickey
- testing byacc 2.0-20260126
* Sun Jan 09 2022 Thomas Dickey
- rpmlint

View File

@ -1,3 +1,27 @@
byacc (1:2.0.20260126) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 24 Jan 2026 07:09:51 -0500
byacc (1:2.0.20251214) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 14 Dec 2025 18:40:32 -0500
byacc (1:2.0.20251111) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 14 Dec 2025 18:38:48 -0500
byacc (1:2.0.20251007) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 07 Oct 2025 19:59:03 -0400
byacc (1:2.0.20241231) unstable; urgency=low
* maintenance updates

View File

@ -4,7 +4,7 @@ Upstream-Contact: <dickey@invisible-island.net> (Thomas E. Dickey)
Source: https://invisible-island.net/byacc/
Files: *
Copyright: 2001-2023,2024 by Thomas E. Dickey
Copyright: 2001-2025,2026 by Thomas E. Dickey
License: public-domain
Berkeley Yacc is in the public domain; changes made to it by the current
maintainer are likewise unrestricted. That applies to most of the files.
@ -41,7 +41,7 @@ License: public-domain
-------------------------------------------------------------------------------
Files: aclocal.m4
Copyright: 2004-2023,2024 by Thomas E. Dickey
Copyright: 2004-2024,2025 by Thomas E. Dickey
License: other-BSD
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the

View File

@ -1,11 +1,11 @@
Summary: public domain Berkeley LALR Yacc parser generator
Summary: Public domain Berkeley LALR Yacc parser generator
%global AppVersion 2.0
%global AppPatched 20241231
%global AppPatched 20260126
%global UseProgram yacc
# $Id: mingw-byacc.spec,v 1.54 2024/12/31 15:42:50 tom Exp $
# $Id: mingw-byacc.spec,v 1.57 2026/01/24 12:09:51 tom Exp $
Name: byacc
Version: %{AppVersion}.%{AppPatched}
Release: 1
@ -58,6 +58,9 @@ strip $RPM_BUILD_ROOT%{_bindir}/%{name}
%changelog
# each patch should add its ChangeLog entries here
* Sat Jan 24 2026 Thomas E. Dickey
- testing byacc 2.0-20260126
* Sun Jan 09 2022 Thomas Dickey
- rpmlint

View File

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.35 2024/07/05 20:55:55 cheusov Exp $
#
DISTNAME= byacc-20241231
DISTNAME= byacc-20260126
CATEGORIES= devel
MASTER_SITES= https://invisible-mirror.net/archives/byacc/
EXTRACT_SUFX= .tgz

View File

@ -1,4 +1,4 @@
/* $Id: reader.c,v 1.106 2024/12/31 19:39:49 tom Exp $ */
/* $Id: reader.c,v 1.108 2026/01/24 13:45:39 tom Exp $ */
#include "defs.h"
@ -400,7 +400,8 @@ get_line(void)
static char *
dup_line(void)
{
char *p, *s, *t;
const char *s;
char *p, *t;
if (line == NULL)
return (NULL);
@ -413,7 +414,9 @@ dup_line(void)
s = line;
t = p;
while ((*t++ = *s++) != '\n')
continue;
{
;
}
return (p);
}
@ -576,7 +579,7 @@ static int
keyword(void)
{
int c;
char *t_cptr = cptr;
const char *t_cptr = cptr;
c = *++cptr;
if (isalpha(UCH(c)))
@ -928,7 +931,7 @@ copy_text(void)
putc(c, f);
{
char *s = copy_comment();
fputs(s, f);
puts_trim(s, f);
free(s);
}
need_newline = 1;
@ -958,9 +961,9 @@ puts_both(const char *s)
{
if (s && *s)
{
fputs(s, text_file);
puts_trim(s, text_file);
if (dflag)
fputs(s, union_file);
puts_trim(s, union_file);
}
}
@ -1450,7 +1453,7 @@ get_literal(void)
unterminated_string(&a);
if (c == '\\')
{
char *c_cptr = cptr - 1;
const char *c_cptr = cptr - 1;
c = *cptr++;
switch (c)
@ -1615,7 +1618,7 @@ is_reserved(char *name)
if (name[0] == '$' && name[1] == '$' && isdigit(UCH(name[2])))
{
char *s = name + 3;
const char *s = name + 3;
while (isdigit(UCH(*s)))
++s;
@ -1647,7 +1650,7 @@ get_number(void)
{
int c;
long n;
char *base = cptr;
const char *base = cptr;
n = 0;
for (c = *cptr; isdigit(UCH(c)); c = *++cptr)
@ -1664,7 +1667,7 @@ get_number(void)
}
static char *
cache_tag(char *tag, size_t len)
cache_tag(const char *tag, size_t len)
{
int i;
char *s;
@ -1701,7 +1704,7 @@ get_tag(void)
int c;
int t_lineno = lineno;
char *t_line = dup_line();
char *t_cptr = t_line + (cptr - line);
const char *t_cptr = t_line + (cptr - line);
++cptr;
c = nextc();
@ -1735,7 +1738,7 @@ get_tag(void)
static char *
scan_id(void)
{
char *b = cptr;
const char *b = cptr;
while (IS_NAME2(*cptr))
cptr++;
@ -2269,7 +2272,7 @@ copy_args(int *alen)
static char *
parse_id(char *p, char **save)
{
char *b;
const char *b;
while (isspace(UCH(*p)))
if (*p++ == '\n')
@ -2480,7 +2483,7 @@ compile_arg(char **theptr, char *yyvaltag)
}
static int
can_elide_arg(char **theptr, char *yyvaltag)
can_elide_arg(char **theptr, const char *yyvaltag)
{
char *p = *theptr;
int rv = 0;
@ -2578,7 +2581,7 @@ static struct arg_cache
*arg_cache[ARG_CACHE_SIZE];
static int
lookup_arg_cache(char *code)
lookup_arg_cache(const char *code)
{
struct arg_cache *entry;
@ -2634,7 +2637,7 @@ advance_to_start(void)
for (;;)
{
char *s_cptr;
const char *s_cptr;
c = nextc();
if (c != '%')
@ -2721,7 +2724,9 @@ end_rule(void)
int i;
for (i = nitems - 1; (i > 0) && pitem[i]; --i)
continue;
{
;
}
if (pitem[i + 1] == NULL || pitem[i + 1]->tag != plhs[nrules]->tag)
default_action_warning(plhs[nrules]->name);
}
@ -2908,7 +2913,7 @@ copy_action(void)
#if defined(YYBTYACC)
int haveyyval = 0;
#endif
char *tag;
const char *tag;
FILE *f = action_file;
struct ainfo a;
Value_t *offsets = NULL, maxoffset;
@ -2974,7 +2979,7 @@ copy_action(void)
{
int d_lineno = lineno;
char *d_line = dup_line();
char *d_cptr = d_line + (cptr - line);
const char *d_cptr = d_line + (cptr - line);
++cptr;
tag = get_tag();
@ -3014,7 +3019,7 @@ copy_action(void)
#if defined(YYBTYACC)
else if (isalpha(UCH(c)) || c == '_')
{
char *arg = scan_id();
const char *arg = scan_id();
for (i = plhs[nrules]->args - 1; i >= 0; i--)
if (arg == plhs[nrules]->argnames[i])
break;
@ -3085,7 +3090,7 @@ copy_action(void)
#if defined(YYBTYACC)
else if (isalpha(UCH(cptr[1])) || cptr[1] == '_')
{
char *arg;
const char *arg;
++cptr;
arg = scan_id();
for (i = plhs[nrules]->args - 1; i >= 0; i--)
@ -3257,7 +3262,7 @@ copy_action(void)
case '/':
{
char *s = copy_comment();
fputs(s, f);
puts_trim(s, f);
free(s);
}
goto loop;
@ -3297,7 +3302,7 @@ get_code(struct ainfo *a, const char *loc)
{
int d_lineno = lineno;
char *d_line = dup_line();
char *d_cptr = d_line + (cptr - line);
const char *d_cptr = d_line + (cptr - line);
++cptr;
tag = get_tag();
@ -3566,7 +3571,7 @@ static int
mark_symbol(void)
{
int c;
bucket *bp = NULL;
const bucket *bp = NULL;
c = cptr[1];
if (c == '%' || c == '\\')
@ -3700,11 +3705,13 @@ pack_names(void)
t = name_pool + 13;
for (bp = first_symbol; bp; bp = bp->next)
{
char *s = bp->name;
const char *s = bp->name;
p = t;
while ((*t++ = *s++) != 0)
continue;
{
;
}
FREE(bp->name);
bp->name = p;
}
@ -3734,7 +3741,7 @@ protect_string(char *src, char **des)
*des = src;
if (src)
{
char *s;
const char *s;
char *d;
unsigned len = 1;
@ -3875,7 +3882,9 @@ pack_symbols(void)
while (j < k && n == symbol_value[j])
{
while (++j < k && n == symbol_value[j])
continue;
{
;
}
++n;
}
v[i]->value = n;

View File

@ -16,7 +16,7 @@
/* %code "top" block start */
#line 5 "calc_code_all.y"
/* CODE-TOP */
/* CODE-TOP */
/* %code "top" block end */
#line 22 "calc_code_all.tab.c"
#undef YYBTYACC
@ -373,7 +373,7 @@ YYLTYPE yylloc; /* position from the lexer */
/* %code "requires" block start */
#line 3 "calc_code_all.y"
/* CODE-REQUIRES */
/* CODE-REQUIRES */
/* %code "requires" block end */
#line 379 "calc_code_all.tab.c"
@ -492,17 +492,17 @@ static YYINT *yylexemes = NULL;
/* %code "provides" block start */
#line 4 "calc_code_all.y"
/* CODE-PROVIDES */
/* CODE-PROVIDES */
#line 6 "calc_code_all.y"
/* CODE-PROVIDES2 */
/* CODE-PROVIDES2 */
/* %code "provides" block end */
#line 500 "calc_code_all.tab.c"
/* %code "" block start */
#line 1 "calc_code_all.y"
/* CODE-DEFAULT2 */
/* CODE-DEFAULT2 */
#line 2 "calc_code_all.y"
/* CODE-DEFAULT */
/* CODE-DEFAULT */
/* %code "" block end */
#line 508 "calc_code_all.tab.c"
#line 73 "calc_code_all.y"

View File

@ -3,16 +3,16 @@
/* %code "requires" block start */
#line 3 "calc_code_all.y"
/* CODE-REQUIRES */
/* CODE-REQUIRES */
/* %code "requires" block end */
#define DIGIT 257
#define LETTER 258
#define UMINUS 259
/* %code "provides" block start */
#line 4 "calc_code_all.y"
/* CODE-PROVIDES */
/* CODE-PROVIDES */
#line 6 "calc_code_all.y"
/* CODE-PROVIDES2 */
/* CODE-PROVIDES2 */
/* %code "provides" block end */
#endif /* _calc_code_all__defines_h_ */

View File

@ -480,9 +480,9 @@ static YYINT *yylexemes = NULL;
/* %code "" block start */
#line 1 "calc_code_default.y"
/* CODE-DEFAULT */
/* CODE-DEFAULT */
#line 2 "calc_code_default.y"
/* CODE-DEFAULT2 */
/* CODE-DEFAULT2 */
/* %code "" block end */
#line 488 "calc_code_default.tab.c"
#line 69 "calc_code_default.y"

View File

@ -480,9 +480,9 @@ static YYINT *yylexemes = NULL;
/* %code "provides" block start */
#line 1 "calc_code_provides.y"
/* CODE-PROVIDES */
/* CODE-PROVIDES */
#line 2 "calc_code_provides.y"
/* CODE-PROVIDES2 */
/* CODE-PROVIDES2 */
/* %code "provides" block end */
#line 488 "calc_code_provides.tab.c"
#line 69 "calc_code_provides.y"

View File

@ -6,9 +6,9 @@
#define UMINUS 259
/* %code "provides" block start */
#line 1 "calc_code_provides.y"
/* CODE-PROVIDES */
/* CODE-PROVIDES */
#line 2 "calc_code_provides.y"
/* CODE-PROVIDES2 */
/* CODE-PROVIDES2 */
/* %code "provides" block end */
#endif /* _calc_code_provides__defines_h_ */

View File

@ -367,9 +367,9 @@ YYLTYPE yylloc; /* position from the lexer */
/* %code "requires" block start */
#line 1 "calc_code_requires.y"
/* CODE-REQUIRES */
/* CODE-REQUIRES */
#line 2 "calc_code_requires.y"
/* CODE-REQUIRES2 */
/* CODE-REQUIRES2 */
/* %code "requires" block end */
#line 375 "calc_code_requires.tab.c"

View File

@ -3,9 +3,9 @@
/* %code "requires" block start */
#line 1 "calc_code_requires.y"
/* CODE-REQUIRES */
/* CODE-REQUIRES */
#line 2 "calc_code_requires.y"
/* CODE-REQUIRES2 */
/* CODE-REQUIRES2 */
/* %code "requires" block end */
#define DIGIT 257
#define LETTER 258

View File

@ -16,9 +16,9 @@
/* %code "top" block start */
#line 1 "calc_code_top.y"
/* CODE-TOP */
/* CODE-TOP */
#line 2 "calc_code_top.y"
/* CODE-TOP2 */
/* CODE-TOP2 */
/* %code "top" block end */
#line 24 "calc_code_top.tab.c"
#undef YYBTYACC

View File

@ -137,7 +137,7 @@ static void YYERROR_DECL();
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
#line 43 "ok_syntax1.y"
union CalcData
union CalcData
{
char * cval;
int ival;

View File

@ -23,7 +23,7 @@
#endif
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
union CalcData
union CalcData
{
char * cval;
int ival;

View File

@ -42,7 +42,7 @@ typedef struct yyyStackItem {
yyyRSitem *yyyRSTop;
yyyRSitem *yyyAfterRS;
yyyRSitem *yyyRS;
yyyRSitem *yyyRS;
#undef yyparse
#undef yylex

View File

@ -16,7 +16,7 @@
/* %code "top" block start */
#line 5 "calc_code_all.y"
/* CODE-TOP */
/* CODE-TOP */
/* %code "top" block end */
#line 22 "calc_code_all.tab.c"
@ -306,7 +306,7 @@ int yynerrs;
/* %code "requires" block start */
#line 3 "calc_code_all.y"
/* CODE-REQUIRES */
/* CODE-REQUIRES */
/* %code "requires" block end */
#line 312 "calc_code_all.tab.c"
@ -338,17 +338,17 @@ static YYSTACKDATA yystack;
/* %code "provides" block start */
#line 4 "calc_code_all.y"
/* CODE-PROVIDES */
/* CODE-PROVIDES */
#line 6 "calc_code_all.y"
/* CODE-PROVIDES2 */
/* CODE-PROVIDES2 */
/* %code "provides" block end */
#line 346 "calc_code_all.tab.c"
/* %code "" block start */
#line 1 "calc_code_all.y"
/* CODE-DEFAULT2 */
/* CODE-DEFAULT2 */
#line 2 "calc_code_all.y"
/* CODE-DEFAULT */
/* CODE-DEFAULT */
/* %code "" block end */
#line 354 "calc_code_all.tab.c"
#line 73 "calc_code_all.y"

View File

@ -1,13 +1,13 @@
/* %code "requires" block start */
#line 3 "calc_code_all.y"
/* CODE-REQUIRES */
/* CODE-REQUIRES */
/* %code "requires" block end */
#define DIGIT 257
#define LETTER 258
#define UMINUS 259
/* %code "provides" block start */
#line 4 "calc_code_all.y"
/* CODE-PROVIDES */
/* CODE-PROVIDES */
#line 6 "calc_code_all.y"
/* CODE-PROVIDES2 */
/* CODE-PROVIDES2 */
/* %code "provides" block end */

View File

@ -326,9 +326,9 @@ static YYSTACKDATA yystack;
/* %code "" block start */
#line 1 "calc_code_default.y"
/* CODE-DEFAULT */
/* CODE-DEFAULT */
#line 2 "calc_code_default.y"
/* CODE-DEFAULT2 */
/* CODE-DEFAULT2 */
/* %code "" block end */
#line 334 "calc_code_default.tab.c"
#line 69 "calc_code_default.y"

View File

@ -326,9 +326,9 @@ static YYSTACKDATA yystack;
/* %code "provides" block start */
#line 1 "calc_code_provides.y"
/* CODE-PROVIDES */
/* CODE-PROVIDES */
#line 2 "calc_code_provides.y"
/* CODE-PROVIDES2 */
/* CODE-PROVIDES2 */
/* %code "provides" block end */
#line 334 "calc_code_provides.tab.c"
#line 69 "calc_code_provides.y"

View File

@ -3,7 +3,7 @@
#define UMINUS 259
/* %code "provides" block start */
#line 1 "calc_code_provides.y"
/* CODE-PROVIDES */
/* CODE-PROVIDES */
#line 2 "calc_code_provides.y"
/* CODE-PROVIDES2 */
/* CODE-PROVIDES2 */
/* %code "provides" block end */

View File

@ -300,9 +300,9 @@ int yynerrs;
/* %code "requires" block start */
#line 1 "calc_code_requires.y"
/* CODE-REQUIRES */
/* CODE-REQUIRES */
#line 2 "calc_code_requires.y"
/* CODE-REQUIRES2 */
/* CODE-REQUIRES2 */
/* %code "requires" block end */
#line 308 "calc_code_requires.tab.c"

View File

@ -1,8 +1,8 @@
/* %code "requires" block start */
#line 1 "calc_code_requires.y"
/* CODE-REQUIRES */
/* CODE-REQUIRES */
#line 2 "calc_code_requires.y"
/* CODE-REQUIRES2 */
/* CODE-REQUIRES2 */
/* %code "requires" block end */
#define DIGIT 257
#define LETTER 258

View File

@ -16,9 +16,9 @@
/* %code "top" block start */
#line 1 "calc_code_top.y"
/* CODE-TOP */
/* CODE-TOP */
#line 2 "calc_code_top.y"
/* CODE-TOP2 */
/* CODE-TOP2 */
/* %code "top" block end */
#line 24 "calc_code_top.tab.c"

View File

@ -117,7 +117,7 @@ static void YYERROR_DECL();
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
#line 43 "ok_syntax1.y"
union CalcData
union CalcData
{
char * cval;
int ival;

View File

@ -20,7 +20,7 @@
#endif
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
union CalcData
union CalcData
{
char * cval;
int ival;

View File

@ -1,4 +1,4 @@
/* $Id: verbose.c,v 1.14 2021/05/20 23:57:23 tom Exp $ */
/* $Id: verbose.c,v 1.15 2025/10/08 00:22:08 tom Exp $ */
#include "defs.h"
@ -180,7 +180,7 @@ print_core(int state)
{
int rule;
Value_t *sp = ritem + statep->items[i];
Value_t *sp1 = sp;
const Value_t *sp1 = sp;
while (*sp >= 0)
++sp;
@ -217,7 +217,9 @@ print_nulls(int state)
if (rrhs[i] + 1 == rrhs[i + 1])
{
for (j = 0; j < nnulls && i > null_rules[j]; ++j)
continue;
{
;
}
if (j == nnulls)
{
@ -345,8 +347,8 @@ static void
print_gotos(int stateno)
{
int i;
Value_t *to_state2;
shifts *sp;
const Value_t *to_state2;
const shifts *sp;
putc('\n', verbose_file);
sp = shift_table[stateno];

View File

@ -1,4 +1,4 @@
/* $Id: warshall.c,v 1.9 2020/09/22 20:17:00 tom Exp $ */
/* $Id: warshall.c,v 1.10 2025/10/08 00:22:08 tom Exp $ */
#include "defs.h"
@ -8,9 +8,9 @@ transitive_closure(unsigned *R, int n)
int rowsize;
unsigned i;
unsigned *rowj;
unsigned *rp;
unsigned *rend;
unsigned *relend;
const unsigned *rp;
const unsigned *rend;
const unsigned *relend;
unsigned *cword;
unsigned *rowi;
@ -59,7 +59,7 @@ reflexive_transitive_closure(unsigned *R, int n)
int rowsize;
unsigned i;
unsigned *rp;
unsigned *relend;
const unsigned *relend;
transitive_closure(R, n);