snapshot of project "byacc", label t20251007

This commit is contained in:
Thomas E. Dickey 2025-10-08 00:23:02 +00:00
parent e9ce822d7a
commit 2cb9a03c0e
No known key found for this signature in database
GPG Key ID: CC2AF4472167BE03
24 changed files with 717 additions and 592 deletions

26
CHANGES
View File

@ -1,3 +1,29 @@
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 t20251007
--------------------------------------------------------------------------------
MANIFEST this file
ACKNOWLEDGEMENTS original version of byacc - 1993

View File

@ -1 +1 @@
20241231
20251007

45
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.68 2025/10/07 23:55:39 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)
@ -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
@ -1785,6 +1790,34 @@ AC_SUBST(GROFF_NOTE)
AC_SUBST(NROFF_NOTE)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PROG_INSTALL version: 12 updated: 2025/09/28 16:56:33
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|linux*gnuabi64|linux*gnuabin32|linux*gnuabielfv*|linux*gnueabi|linux*gnueabihf|linux*gnux32|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],
@ -2125,7 +2158,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: 69 updated: 2025/07/26 14:09:49
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 +2218,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|linux*gnuabi64|linux*gnuabin32|linux*gnuabielfv*|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
CF_GNU_SOURCE($cf_XOPEN_SOURCE)
;;
linux*musl)

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:

957
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
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.30 2025/10/07 23:54:02 tom Exp $
AC_PREREQ(2.52.20200802)
AC_REVISION($Revision: 1.29 $)
AC_REVISION($Revision: 1.30 $)
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config_h.in)
@ -10,7 +10,7 @@ CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
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

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.103 2025/10/08 00:22:08 tom Exp $ */
#include "defs.h"
@ -836,8 +836,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 +1178,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 20251007
%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.78 2025/10/07 23:59:03 tom Exp $
Name: byacc
Version: %{AppVersion}.%{AppPatched}
Release: 1
@ -103,6 +103,9 @@ popd
%changelog
# each patch should add its ChangeLog entries here
* Tue Oct 07 2025 Thomas E. Dickey
- testing byacc 2.0-20251007
* Sun Jan 09 2022 Thomas Dickey
- rpmlint

View File

@ -1,3 +1,9 @@
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-2024,2025 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 20251007
%global UseProgram yacc
# $Id: mingw-byacc.spec,v 1.54 2024/12/31 15:42:50 tom Exp $
# $Id: mingw-byacc.spec,v 1.55 2025/10/07 23:59:03 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
* Tue Oct 07 2025 Thomas E. Dickey
- testing byacc 2.0-20251007
* 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-20251007
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.107 2025/10/08 00:22:08 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)))
@ -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--)
@ -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

@ -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);