mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-24 07:40:52 +00:00
byacc: really import 20240109
This commit is contained in:
commit
822ca32763
@ -1,3 +1,153 @@
|
||||
2024-01-09 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* yacc.1: minor cleanup
|
||||
|
||||
* package/debian/copyright: bump
|
||||
|
||||
* configure: regen
|
||||
|
||||
* VERSION, package/byacc.spec, package/debian/changelog,
|
||||
package/mingw-byacc.spec, package/pkgsrc/Makefile:
|
||||
bump
|
||||
|
||||
2023-12-01 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* aclocal.m4:
|
||||
resync with my-autoconf: CF_CONST_X_STRING CF_MKSTEMP CF_WITH_MAN2HTML CF_XOPEN_SOURCE
|
||||
|
||||
2023-09-15 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* config.sub: 2023-09-15
|
||||
|
||||
2023-08-22 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* config.guess: 2023-08-22
|
||||
|
||||
2023-05-21 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:
|
||||
updates for CF_INSTALL_MAN from reflex, which needs the symbolic link feature
|
||||
|
||||
* aclocal.m4:
|
||||
improve install-man by adding sed commands for --program-transform-name
|
||||
|
||||
2023-05-19 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* makefile.in: use CF_INSTALL_MAN
|
||||
|
||||
* aclocal.m4:
|
||||
add CF_INSTALL_MAN, to begin refactoring install rule for manpage
|
||||
|
||||
* configure: regen
|
||||
|
||||
* configure.in: use CF_INSTALL_MAN
|
||||
|
||||
2023-05-18 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* error.c, defs.h, reader.c:
|
||||
allow @1 or $@ with a warning if no %locations was given
|
||||
|
||||
2023-05-17 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* reader.c: clear pointer in end_ainfo() after freeing it.
|
||||
|
||||
2023-05-16 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* reader.c: report errors in %define as "unexpected value"
|
||||
|
||||
* reader.c:
|
||||
add/use macros begin_ainfo() and end_ainfo() to reduce clutter
|
||||
|
||||
* defs.h, error.c: add function unexpected_value()
|
||||
|
||||
* reader.c:
|
||||
recognize bison's "%define api.pure" as an alternative to "%pure-parser"
|
||||
|
||||
* reader.c:
|
||||
add %nterm as an alias for %type, since bison made that confusion.
|
||||
|
||||
* reader.c:
|
||||
ensure that filler_buf and prefix_buf are initialized for the special case
|
||||
where they are empty (report by Martin Jansa, cf: 20230219)
|
||||
|
||||
* output.c:
|
||||
make test-differences smaller when compiling with YY_NO_LEAKS by replacing
|
||||
a blank line with the generated #define rather than adding 3 lines.
|
||||
|
||||
* reader.c: gcc-warnings
|
||||
|
||||
2023-05-15 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* VERSION, package/byacc.spec, package/debian/changelog,
|
||||
package/mingw-byacc.spec, package/pkgsrc/Makefile:
|
||||
bump
|
||||
|
||||
* reader.c:
|
||||
when copying parameters, check for a case where the last token is not a
|
||||
name, e.g., "foo [1]" would have "[1]". In this case, scan back to find
|
||||
the actual parameter name.
|
||||
|
||||
* reader.c:
|
||||
correct a use-after-free in more_curly, which could occur if a %lex-param
|
||||
or %parse-param was multi-line (Redhat #2183006).
|
||||
|
||||
2023-05-11 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* main.c: rename no_space() to on_error()
|
||||
|
||||
* error.c: rename no_space() to no_error(), handling any errno
|
||||
|
||||
* defs.h: rename no_space() to on_error()
|
||||
|
||||
2023-04-03 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* aclocal.m4: resync with my-autoconf: CF_GCC_VERSION CF_XOPEN_SOURCE
|
||||
|
||||
2023-02-26 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* mstring.c, reader.c: yak-indent
|
||||
|
||||
2023-02-26 mingodad
|
||||
|
||||
* reader.c:
|
||||
patch for byacc #6: Segmentation fault when trying to parse bison-3.8.2 grammar
|
||||
|
||||
2023-02-26 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* VERSION, package/byacc.spec, package/debian/changelog,
|
||||
package/mingw-byacc.spec, package/pkgsrc/Makefile:
|
||||
bump
|
||||
|
||||
2023-02-20 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* configure: regen
|
||||
|
||||
* aclocal.m4: resync with my-autoconf
|
||||
|
||||
2023-02-19 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* test/yacc/ok_syntax1.tab.h, test/yacc/ok_syntax1.tab.c,
|
||||
test/btyacc/ok_syntax1.tab.h, test/btyacc/ok_syntax1.tab.c:
|
||||
regen
|
||||
|
||||
* test/ok_syntax1.y:
|
||||
modify test for %union to add tag for testing reader.c
|
||||
|
||||
* reader.c:
|
||||
provide for a named union, e.g., "%union foo" by detecting the name and
|
||||
deferring the typedef in that case until the end of copying the union
|
||||
definition (report by Dag-Erling Smørgrav).
|
||||
|
||||
* VERSION, package/byacc.spec, package/debian/changelog,
|
||||
package/mingw-byacc.spec, package/pkgsrc/Makefile:
|
||||
bump
|
||||
|
||||
2023-02-01 Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
* configure: regen
|
||||
|
10
contrib/byacc/LICENSE
Normal file
10
contrib/byacc/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
Berkeley Yacc is distributed with no warranty whatever. The author
|
||||
and any other contributors take no responsibility for the consequences of
|
||||
its use.
|
||||
|
||||
Berkeley Yacc is in the public domain. The data structures and algorithms
|
||||
used in Berkeley Yacc are all either taken from documents available to the
|
||||
general public or are inventions of the author. Anyone may freely distribute
|
||||
source or binary forms of Berkeley Yacc whether unchanged or modified.
|
||||
Distributers may charge whatever fees they can obtain for Berkeley Yacc.
|
||||
Programs generated by Berkeley Yacc may be distributed freely.
|
@ -1,8 +1,9 @@
|
||||
MANIFEST for byacc, version t20230201
|
||||
MANIFEST for byacc, version t20240109
|
||||
--------------------------------------------------------------------------------
|
||||
MANIFEST this file
|
||||
ACKNOWLEDGEMENTS original version of byacc - 1993
|
||||
AUTHORS nicknames for some contributors (see CHANGES for details)
|
||||
CHANGES generated changelog
|
||||
LICENSE summary of byacc's license
|
||||
Makefile.old renamed from Makefile
|
||||
NEW_FEATURES original version of byacc - 1993
|
||||
@ -63,7 +64,7 @@ package/pkgsrc/Makefile scripts from NetBSD pkgsrc, for test-builds
|
||||
package/pkgsrc/PLIST scripts from NetBSD pkgsrc, for test-builds
|
||||
package/pkgsrc/distinfo scripts from NetBSD pkgsrc, for test-builds
|
||||
test subdirectory
|
||||
test/README describe contents of "test" subdirectory
|
||||
test/README summary of "test" directory
|
||||
test/btyacc subdirectory
|
||||
test/btyacc/big_b.error exercise -L/-B options
|
||||
test/btyacc/big_b.output exercise -L/-B options
|
||||
|
@ -1 +1 @@
|
||||
20230201
|
||||
20240109
|
||||
|
396
contrib/byacc/aclocal.m4
vendored
396
contrib/byacc/aclocal.m4
vendored
@ -1,4 +1,4 @@
|
||||
dnl $Id: aclocal.m4,v 1.59 2023/01/05 22:53:11 tom Exp $
|
||||
dnl $Id: aclocal.m4,v 1.65 2023/12/01 22:22:50 tom Exp $
|
||||
dnl Macros for byacc configure script (Thomas E. Dickey)
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Copyright 2004-2022,2023 Thomas E. Dickey
|
||||
@ -207,7 +207,7 @@ ifelse([$3],,[ :]dnl
|
||||
])dnl
|
||||
])])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_C11_NORETURN version: 3 updated: 2021/03/28 11:36:23
|
||||
dnl CF_C11_NORETURN version: 4 updated: 2023/02/18 17:41:25
|
||||
dnl ---------------
|
||||
AC_DEFUN([CF_C11_NORETURN],
|
||||
[
|
||||
@ -221,8 +221,7 @@ 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([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
$ac_includes_default
|
||||
#include <stdnoreturn.h>
|
||||
static _Noreturn void giveup(void) { exit(0); }
|
||||
],
|
||||
@ -246,7 +245,7 @@ AC_SUBST(HAVE_STDNORETURN_H)
|
||||
AC_SUBST(STDC_NORETURN)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_CC_ENV_FLAGS version: 10 updated: 2020/12/31 18:40:20
|
||||
dnl CF_CC_ENV_FLAGS version: 11 updated: 2023/02/20 11:15:46
|
||||
dnl ---------------
|
||||
dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
|
||||
dnl into CC. This will not help with broken scripts that wrap the compiler
|
||||
@ -287,7 +286,7 @@ case "$CC" in
|
||||
AC_MSG_WARN(your environment uses the CC variable to hold CFLAGS/CPPFLAGS options)
|
||||
# humor him...
|
||||
cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
|
||||
cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'`
|
||||
cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
|
||||
CC="$cf_prog"
|
||||
for cf_arg in $cf_flags
|
||||
do
|
||||
@ -345,7 +344,7 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then
|
||||
fi
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_CLANG_COMPILER version: 8 updated: 2021/01/01 13:31:04
|
||||
dnl CF_CLANG_COMPILER version: 9 updated: 2023/02/18 17:41:25
|
||||
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
|
||||
@ -367,7 +366,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then
|
||||
AC_TRY_COMPILE([],[
|
||||
#ifdef __clang__
|
||||
#else
|
||||
make an error
|
||||
#error __clang__ is not defined
|
||||
#endif
|
||||
],[ifelse([$2],,CLANG_COMPILER,[$2])=yes
|
||||
],[])
|
||||
@ -413,7 +412,7 @@ if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then
|
||||
fi
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_CONST_X_STRING version: 7 updated: 2021/06/07 17:39:17
|
||||
dnl CF_CONST_X_STRING version: 8 updated: 2023/12/01 17:22:50
|
||||
dnl -----------------
|
||||
dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most
|
||||
dnl character-strings.
|
||||
@ -448,6 +447,7 @@ AC_TRY_COMPILE(
|
||||
AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#undef _CONST_X_STRING
|
||||
#define _CONST_X_STRING /* X11R7.8 (perhaps) */
|
||||
#undef XTSTRINGDEFINES /* X11R5 and later */
|
||||
#include <stdlib.h>
|
||||
@ -718,7 +718,7 @@ rm -rf ./conftest*
|
||||
fi
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GCC_VERSION version: 8 updated: 2019/09/07 13:38:36
|
||||
dnl CF_GCC_VERSION version: 9 updated: 2023/03/05 14:30:13
|
||||
dnl --------------
|
||||
dnl Find version of gcc, and (because icc/clang pretend to be gcc without being
|
||||
dnl compatible), attempt to determine if icc/clang is actually used.
|
||||
@ -727,7 +727,7 @@ AC_REQUIRE([AC_PROG_CC])
|
||||
GCC_VERSION=none
|
||||
if test "$GCC" = yes ; then
|
||||
AC_MSG_CHECKING(version of $CC)
|
||||
GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
|
||||
GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
|
||||
test -z "$GCC_VERSION" && GCC_VERSION=unknown
|
||||
AC_MSG_RESULT($GCC_VERSION)
|
||||
fi
|
||||
@ -986,7 +986,152 @@ if test x$cf_cv_gnu_library = xyes; then
|
||||
fi
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_INTEL_COMPILER version: 8 updated: 2021/01/01 16:53:59
|
||||
dnl CF_INSTALL_MAN version: 5 updated: 2023/05/21 15:53:07
|
||||
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
|
||||
dnl macro simplifies including the script in different programs.
|
||||
dnl
|
||||
dnl The generated script assumes that the program can be renamed, using two
|
||||
dnl symbols in the manpage, e.g.,
|
||||
dnl .ds N Yacc
|
||||
dnl .ds n yacc
|
||||
dnl which are later used as \*N and \*n, as well as a special case in the
|
||||
dnl synopsis to work around limitations of makewhatis.
|
||||
dnl
|
||||
dnl Script parameters:
|
||||
dnl $1 = input file
|
||||
dnl $2 = output filename
|
||||
dnl
|
||||
dnl or (uninstall):
|
||||
dnl $1 = output filename
|
||||
AC_DEFUN([CF_INSTALL_MAN],
|
||||
[
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
AC_REQUIRE([AC_PROG_INSTALL])
|
||||
AC_REQUIRE([AC_LN_S])
|
||||
AC_REQUIRE([CF_MANPAGE_FORMAT])
|
||||
cf_install_man=install-man
|
||||
ac_config_files="$ac_config_files $cf_install_man"
|
||||
cf_install_man=$cf_install_man.in
|
||||
echo [$]as_me: creating $cf_install_man
|
||||
cat >[$]cf_install_man <<"CF_EOF"
|
||||
#!/bin/sh
|
||||
# generated by CF_INSTALL_MAN
|
||||
|
||||
LANG=C; export LANG
|
||||
LC_ALL=C; export LC_ALL
|
||||
LC_CTYPE=C; export LC_CTYPE
|
||||
LANGUAGE=C; export LANGUAGE
|
||||
|
||||
INSTALL="@INSTALL@"
|
||||
INSTALL_DATA="@INSTALL_DATA@"
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: install-man [[-l]] [[source]] target
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
failed() {
|
||||
echo "?? [$]*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
test [$]# != 0 || usage
|
||||
OPTS=
|
||||
case "x[$]1" in
|
||||
(x-l)
|
||||
OPTS="link"
|
||||
shift
|
||||
;;
|
||||
(x-*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
|
||||
source=
|
||||
if test [$]# = 2 ; then
|
||||
source=[$]1; shift
|
||||
target=[$]1
|
||||
elif test [$]# = 1 ; then
|
||||
test -n "$OPTS" && usage
|
||||
target=[$]1
|
||||
else
|
||||
usage
|
||||
fi
|
||||
|
||||
origin_name=`echo "$source" |sed -e 's%^.*/%%' -e 's%\..*%%'`
|
||||
actual_name=`echo "$origin_name" |sed '@program_transform_name@'`
|
||||
leading_cap=`echo "$actual_name" | sed -e 's%^\(.\).*$%\1%' | tr a-z A-Z``echo "$actual_name" | sed -e 's%^.%%'`
|
||||
capitalized=`echo "$actual_name" | tr a-z A-Z`
|
||||
|
||||
cf_tmpdir=`mktemp -d`
|
||||
trap 'rm -rf "$cf_tmpdir"; exit 1' 1 2 3 15
|
||||
trap 'rm -rf "$cf_tmpdir"; exit 0' 0
|
||||
|
||||
if test -n "$source" ; then
|
||||
suffix=
|
||||
test -n "@cf_manpage_so_strip" && suffix=".@cf_manpage_so_strip@"
|
||||
if test "x$OPTS" = xlink ; then
|
||||
source_dir=`echo "$source" | sed -e "s%/[[^/]]*$%%"`
|
||||
target_dir=`echo "$target" | sed -e "s%/[[^/]]*$%%"`
|
||||
sourcelink="${source}${suffix}"
|
||||
targetfile="${target}${suffix}"
|
||||
targetlink="${target_dir}/${sourcelink}"
|
||||
if test ! -d "$target_dir" ; then
|
||||
failed "target directory does not exist: $target_dir"
|
||||
elif test ! -f "$targetfile" ; then
|
||||
failed "target file does not exist: $targetfile"
|
||||
elif test "$source" != "$source_dir" ; then
|
||||
failed "unexpected directory for source-link: $source_dir"
|
||||
fi
|
||||
test -f "$targetlink" && failed "already exists $targetlink"
|
||||
( cd "$target_dir" && @LN_S@ "`echo "$targetfile" | sed -e 's%^.*/%%'`" "$sourcelink" )
|
||||
test -f "$targetlink" || failed "cannot create $targetlink"
|
||||
target="$targetlink"
|
||||
else
|
||||
echo "** installing $source to $target"
|
||||
interim="$cf_tmpdir"/"`basename $source`"
|
||||
if test "x$origin_name" != "x$actual_name" ; then
|
||||
sed \
|
||||
-e "/^.ds N/s%N.*%N $leading_cap%" \
|
||||
-e "/^.ds n/s%n.*%n $actual_name%" \
|
||||
-e "/^\.TH/s%[[ ]][[ ]]*[[^ ]][[^ ]]*% $capitalized%" \
|
||||
-e "/^\.SH[[ ]][[ ]]*NAME/,/[[ ]]\\\\-[[ ]]/s%^\\\\\\*[[Nn]]%$actual_name%" \
|
||||
"$source" >"$interim" || exit 1
|
||||
diff -c "$source" "$interim"
|
||||
else
|
||||
cp "$source" "$interim" || exit 1
|
||||
fi
|
||||
if test -n "@cf_manpage_compress@" ; then
|
||||
@cf_manpage_compress@ "$interim"
|
||||
source="${interim}${suffix}"
|
||||
fi
|
||||
if test -d "$target" ; then
|
||||
target="$target"/"$source"
|
||||
else
|
||||
test -n "@cf_manpage_compress@" && target="${target}.@cf_manpage_so_strip@"
|
||||
fi
|
||||
$INSTALL_DATA "$source" "$target" || exit 1
|
||||
fi
|
||||
echo "...installed $target"
|
||||
else
|
||||
echo "** removing $target"
|
||||
test -n "@cf_manpage_compress@" && target="${target}.@cf_manpage_so_strip@"
|
||||
if test -f "$target" ; then
|
||||
rm -f "$target"
|
||||
echo "...removed $target"
|
||||
else
|
||||
echo "...not found"
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
CF_EOF
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_INTEL_COMPILER version: 9 updated: 2023/02/18 17:41:25
|
||||
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
|
||||
@ -1012,7 +1157,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then
|
||||
AC_TRY_COMPILE([],[
|
||||
#ifdef __INTEL_COMPILER
|
||||
#else
|
||||
make an error
|
||||
#error __INTEL_COMPILER is not defined
|
||||
#endif
|
||||
],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
|
||||
cf_save_CFLAGS="$cf_save_CFLAGS -we147"
|
||||
@ -1124,6 +1269,162 @@ AC_SUBST(ETAGS)
|
||||
|
||||
AC_SUBST(MAKE_UPPER_TAGS)
|
||||
AC_SUBST(MAKE_LOWER_TAGS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_MANPAGE_FORMAT version: 18 updated: 2023/05/19 18:35:02
|
||||
dnl -----------------
|
||||
dnl Option to allow user to override automatic configuration of manpage format.
|
||||
dnl There are several special cases:
|
||||
dnl
|
||||
dnl compress - man checks for, can display compressed files
|
||||
dnl bzip2 - man checks for, can display bzip2'd files
|
||||
dnl gzip - man checks for, can display gzip'd files
|
||||
dnl xz - man checks for, can display xz'd files
|
||||
dnl
|
||||
dnl BSDI - files in the cat-directories are suffixed ".0"
|
||||
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 convention would not match our use).
|
||||
AC_DEFUN([CF_MANPAGE_FORMAT],
|
||||
[
|
||||
AC_REQUIRE([CF_PATHSEP])
|
||||
AC_MSG_CHECKING(format of man-pages)
|
||||
|
||||
AC_ARG_WITH(manpage-format,
|
||||
[ --with-manpage-format specify manpage-format: gzip/compress/bzip2/xz,
|
||||
BSDI/normal and optionally formatted/catonly,
|
||||
e.g., gzip,formatted],
|
||||
[MANPAGE_FORMAT=$withval],
|
||||
[MANPAGE_FORMAT=unknown])
|
||||
|
||||
test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
|
||||
MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
|
||||
|
||||
cf_unknown=
|
||||
|
||||
case "$MANPAGE_FORMAT" in
|
||||
(unknown)
|
||||
if test -z "$MANPATH" ; then
|
||||
MANPATH="/usr/man:/usr/share/man"
|
||||
fi
|
||||
|
||||
# look for the 'date' man-page (it is most likely to be installed!)
|
||||
MANPAGE_FORMAT=
|
||||
cf_preform="no"
|
||||
cf_catonly="yes"
|
||||
cf_example="date"
|
||||
|
||||
IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
|
||||
for cf_dir in $MANPATH; do
|
||||
test -z "$cf_dir" && cf_dir=/usr/man
|
||||
for cf_name in $cf_dir/man*/$cf_example.[[01]]* $cf_dir/cat*/$cf_example.[[01]]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
|
||||
do
|
||||
cf_test=`echo "$cf_name" | sed -e 's/*//'`
|
||||
if test "x$cf_test" = "x$cf_name" ; then
|
||||
|
||||
case "$cf_name" in
|
||||
(*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
|
||||
(*.xz) MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
|
||||
(*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
|
||||
(*.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
|
||||
(*.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
|
||||
(*) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
|
||||
esac
|
||||
|
||||
case "$cf_name" in
|
||||
($cf_dir/man*)
|
||||
cf_catonly=no
|
||||
;;
|
||||
($cf_dir/cat*)
|
||||
cf_preform=yes
|
||||
;;
|
||||
esac
|
||||
break
|
||||
fi
|
||||
|
||||
# if we found a match in either man* or cat*, stop looking
|
||||
if test -n "$MANPAGE_FORMAT" ; then
|
||||
cf_found=no
|
||||
test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
|
||||
test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
|
||||
case "$cf_name" in
|
||||
($cf_dir/cat*)
|
||||
cf_found=yes
|
||||
;;
|
||||
esac
|
||||
test "$cf_found" = yes && break
|
||||
fi
|
||||
done
|
||||
# only check the first directory in $MANPATH where we find manpages
|
||||
if test -n "$MANPAGE_FORMAT" ; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
# if we did not find the example, just assume it is normal
|
||||
test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
(*)
|
||||
for cf_option in $MANPAGE_FORMAT; do
|
||||
case "$cf_option" in
|
||||
(xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
|
||||
;;
|
||||
(*)
|
||||
cf_unknown="$cf_unknown $cf_option"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_RESULT($MANPAGE_FORMAT)
|
||||
if test -n "$cf_unknown" ; then
|
||||
AC_MSG_WARN(Unexpected manpage-format $cf_unknown)
|
||||
fi
|
||||
|
||||
cf_manpage_format=no
|
||||
cf_manpage_inboth=no
|
||||
cf_manpage_so_strip=
|
||||
cf_manpage_compress=
|
||||
|
||||
for cf_item in $MANPAGE_FORMAT
|
||||
do
|
||||
case "$cf_item" in
|
||||
(catonly)
|
||||
cf_manpage_format=yes
|
||||
cf_manpage_inboth=no
|
||||
;;
|
||||
(formatted)
|
||||
cf_manpage_format=yes
|
||||
cf_manpage_inboth=yes
|
||||
;;
|
||||
(compress)
|
||||
cf_manpage_so_strip="Z"
|
||||
cf_manpage_compress=compress
|
||||
;;
|
||||
(gzip)
|
||||
cf_manpage_so_strip="gz"
|
||||
cf_manpage_compress=gzip
|
||||
;;
|
||||
(bzip2)
|
||||
cf_manpage_so_strip="bz2"
|
||||
cf_manpage_compress=bzip2
|
||||
;;
|
||||
(xz)
|
||||
cf_manpage_so_strip="xz"
|
||||
cf_manpage_compress=xz
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
AC_SUBST(cf_manpage_format)
|
||||
AC_SUBST(cf_manpage_inboth)
|
||||
AC_SUBST(cf_manpage_so_strip)
|
||||
AC_SUBST(cf_manpage_compress)
|
||||
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_MIXEDCASE_FILENAMES version: 9 updated: 2021/01/01 16:53:59
|
||||
@ -1156,7 +1457,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: 12 updated: 2023/01/05 17:53:11
|
||||
dnl CF_MKSTEMP version: 13 updated: 2023/12/01 17:22:50
|
||||
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).
|
||||
@ -1171,7 +1472,7 @@ $ac_includes_default
|
||||
|
||||
int main(void)
|
||||
{
|
||||
char *tmpl = "conftestXXXXXX";
|
||||
static char tmpl[] = "conftestXXXXXX";
|
||||
char name[2][80];
|
||||
int n;
|
||||
int result = 0;
|
||||
@ -1255,6 +1556,22 @@ case ".$with_cflags" in
|
||||
esac
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_PATHSEP version: 8 updated: 2021/01/01 13:31:04
|
||||
dnl ----------
|
||||
dnl Provide a value for the $PATH and similar separator (or amend the value
|
||||
dnl as provided in autoconf 2.5x).
|
||||
AC_DEFUN([CF_PATHSEP],
|
||||
[
|
||||
AC_MSG_CHECKING(for PATH separator)
|
||||
case "$cf_cv_system_name" in
|
||||
(os2*) PATH_SEPARATOR=';' ;;
|
||||
(*) ${PATH_SEPARATOR:=':'} ;;
|
||||
esac
|
||||
ifelse([$1],,,[$1=$PATH_SEPARATOR])
|
||||
AC_SUBST(PATH_SEPARATOR)
|
||||
AC_MSG_RESULT($PATH_SEPARATOR)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_PATH_SYNTAX version: 18 updated: 2020/12/31 18:40:20
|
||||
dnl --------------
|
||||
dnl Check the argument to see that it looks like a pathname. Rewrite it if it
|
||||
@ -1292,7 +1609,7 @@ case ".[$]$1" in
|
||||
esac
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_POSIX_C_SOURCE version: 11 updated: 2018/12/31 20:46:17
|
||||
dnl CF_POSIX_C_SOURCE version: 12 updated: 2023/02/18 17:41:25
|
||||
dnl -----------------
|
||||
dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
|
||||
dnl
|
||||
@ -1323,7 +1640,7 @@ 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>],[
|
||||
#ifndef _POSIX_C_SOURCE
|
||||
make an error
|
||||
#error _POSIX_C_SOURCE is not defined
|
||||
#endif],
|
||||
[cf_cv_posix_c_source=no],
|
||||
[cf_want_posix_source=no
|
||||
@ -1342,7 +1659,7 @@ make an error
|
||||
if test "$cf_want_posix_source" = yes ; then
|
||||
AC_TRY_COMPILE([#include <sys/types.h>],[
|
||||
#ifdef _POSIX_SOURCE
|
||||
make an error
|
||||
#error _POSIX_SOURCE is defined
|
||||
#endif],[],
|
||||
cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE")
|
||||
fi
|
||||
@ -1353,7 +1670,7 @@ make an error
|
||||
CF_MSG_LOG(if the second compile does not leave our definition intact error)
|
||||
AC_TRY_COMPILE([#include <sys/types.h>],[
|
||||
#ifndef _POSIX_C_SOURCE
|
||||
make an error
|
||||
#error _POSIX_C_SOURCE is not defined
|
||||
#endif],,
|
||||
[cf_cv_posix_c_source=no])
|
||||
CFLAGS="$cf_save_CFLAGS"
|
||||
@ -1578,7 +1895,7 @@ if test "$with_dmalloc" = yes ; then
|
||||
fi
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_WITH_MAN2HTML version: 12 updated: 2021/01/03 18:30:50
|
||||
dnl CF_WITH_MAN2HTML version: 13 updated: 2023/11/23 06:40:35
|
||||
dnl ----------------
|
||||
dnl Check for man2html and groff. Prefer man2html over groff, but use groff
|
||||
dnl as a fallback. See
|
||||
@ -1620,7 +1937,7 @@ esac
|
||||
|
||||
AC_MSG_CHECKING(for program to convert manpage to html)
|
||||
AC_ARG_WITH(man2html,
|
||||
[ --with-man2html=XXX use XXX rather than groff],
|
||||
[[ --with-man2html[=XXX] use XXX rather than groff]],
|
||||
[cf_man2html=$withval],
|
||||
[cf_man2html=$cf_man2html])
|
||||
|
||||
@ -1761,7 +2078,7 @@ CF_NO_LEAKS_OPTION(valgrind,
|
||||
[USE_VALGRIND])
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_XOPEN_SOURCE version: 63 updated: 2022/12/29 10:10:26
|
||||
dnl CF_XOPEN_SOURCE version: 67 updated: 2023/09/06 18:55:27
|
||||
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,
|
||||
@ -1770,6 +2087,18 @@ dnl
|
||||
dnl Parameters:
|
||||
dnl $1 is the nominal value for _XOPEN_SOURCE
|
||||
dnl $2 is the nominal value for _POSIX_C_SOURCE
|
||||
dnl
|
||||
dnl The default case prefers _XOPEN_SOURCE over _POSIX_C_SOURCE if the
|
||||
dnl implementation predefines it, because X/Open and most implementations agree
|
||||
dnl that the latter is a legacy or "aligned" value.
|
||||
dnl
|
||||
dnl Because _XOPEN_SOURCE is preferred, if defining _POSIX_C_SOURCE turns
|
||||
dnl that off, then refrain from setting _POSIX_C_SOURCE explicitly.
|
||||
dnl
|
||||
dnl References:
|
||||
dnl https://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html
|
||||
dnl https://docs.oracle.com/cd/E19253-01/816-5175/standards-5/index.html
|
||||
dnl https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
|
||||
AC_DEFUN([CF_XOPEN_SOURCE],[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([CF_POSIX_VISIBLE])
|
||||
@ -1784,9 +2113,6 @@ case "$host_os" in
|
||||
(aix[[4-7]]*)
|
||||
cf_xopen_source="-D_ALL_SOURCE"
|
||||
;;
|
||||
(msys)
|
||||
cf_XOPEN_SOURCE=600
|
||||
;;
|
||||
(darwin[[0-8]].*)
|
||||
cf_xopen_source="-D_APPLE_C_SOURCE"
|
||||
;;
|
||||
@ -1812,7 +2138,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)
|
||||
(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
|
||||
CF_GNU_SOURCE($cf_XOPEN_SOURCE)
|
||||
;;
|
||||
(minix*)
|
||||
@ -1864,8 +2190,8 @@ case "$host_os" in
|
||||
cf_save_xopen_cppflags="$CPPFLAGS"
|
||||
CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
|
||||
# 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 inteferes)
|
||||
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_MSG_WARN(_POSIX_C_SOURCE definition is not usable)
|
||||
CPPFLAGS="$cf_save_xopen_cppflags"])
|
||||
@ -1884,7 +2210,7 @@ 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>],[
|
||||
#ifndef _XOPEN_SOURCE
|
||||
make an error
|
||||
#error _XOPEN_SOURCE is not defined
|
||||
#endif],
|
||||
[cf_XOPEN_SOURCE_set=yes],
|
||||
[cf_XOPEN_SOURCE_set=no])
|
||||
@ -1893,7 +2219,7 @@ make an error
|
||||
then
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],[
|
||||
#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
|
||||
make an error
|
||||
#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
|
||||
#endif],
|
||||
[cf_XOPEN_SOURCE_set_ok=yes],
|
||||
[cf_XOPEN_SOURCE_set_ok=no])
|
||||
@ -1908,22 +2234,20 @@ fi
|
||||
fi # cf_cv_posix_visible
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF__XOPEN_SOURCE_BODY version: 1 updated: 2022/09/10 15:17:35
|
||||
dnl CF__XOPEN_SOURCE_BODY version: 2 updated: 2023/02/18 17:41:25
|
||||
dnl ---------------------
|
||||
dnl body of test when test-compiling for _XOPEN_SOURCE check
|
||||
define([CF__XOPEN_SOURCE_BODY],
|
||||
[
|
||||
#ifndef _XOPEN_SOURCE
|
||||
make an error
|
||||
#error _XOPEN_SOURCE is not defined
|
||||
#endif
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF__XOPEN_SOURCE_HEAD version: 1 updated: 2022/09/10 15:17:03
|
||||
dnl CF__XOPEN_SOURCE_HEAD version: 2 updated: 2023/02/18 17:41:25
|
||||
dnl ---------------------
|
||||
dnl headers to include when test-compiling for _XOPEN_SOURCE check
|
||||
define([CF__XOPEN_SOURCE_HEAD],
|
||||
[
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
$ac_includes_default
|
||||
])
|
||||
|
63
contrib/byacc/config.guess
vendored
63
contrib/byacc/config.guess
vendored
@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2023 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2022-08-01'
|
||||
timestamp='2023-08-22'
|
||||
|
||||
# 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
|
||||
@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
usage="\
|
||||
Usage: $0 [OPTION]
|
||||
|
||||
Output the configuration name of the system \`$me' is run on.
|
||||
Output the configuration name of the system '$me' is run on.
|
||||
|
||||
Options:
|
||||
-h, --help print this help, then exit
|
||||
@ -60,13 +60,13 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
Copyright 1992-2023 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."
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
Try '$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
@ -102,8 +102,8 @@ GUESS=
|
||||
# temporary files to be created and, as you can see below, it is a
|
||||
# headache to deal with in a portable fashion.
|
||||
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
|
||||
# use 'HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
|
||||
@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
|
||||
|
||||
set_cc_for_build
|
||||
cat <<-EOF > "$dummy.c"
|
||||
#if defined(__ANDROID__)
|
||||
LIBC=android
|
||||
#else
|
||||
#include <features.h>
|
||||
#if defined(__UCLIBC__)
|
||||
LIBC=uclibc
|
||||
@ -169,6 +172,7 @@ Linux|GNU|GNU/*)
|
||||
LIBC=musl
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
||||
eval "$cc_set_libc"
|
||||
@ -459,7 +463,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
|
||||
UNAME_RELEASE=`uname -v`
|
||||
;;
|
||||
esac
|
||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
||||
# Japanese Language versions have a version number like '4.1.3-JL'.
|
||||
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
|
||||
GUESS=sparc-sun-sunos$SUN_REL
|
||||
;;
|
||||
@ -904,7 +908,7 @@ EOF
|
||||
fi
|
||||
;;
|
||||
*:FreeBSD:*:*)
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
case $UNAME_PROCESSOR in
|
||||
amd64)
|
||||
UNAME_PROCESSOR=x86_64 ;;
|
||||
@ -966,11 +970,37 @@ EOF
|
||||
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
|
||||
GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
|
||||
;;
|
||||
x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
|
||||
GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
|
||||
;;
|
||||
*:[Mm]anagarm:*:*)
|
||||
GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
|
||||
;;
|
||||
*:Minix:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-minix
|
||||
;;
|
||||
aarch64:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
set_cc_for_build
|
||||
CPU=$UNAME_MACHINE
|
||||
LIBCABI=$LIBC
|
||||
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
||||
ABI=64
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#ifdef __ARM_EABI__
|
||||
#ifdef __ARM_PCS_VFP
|
||||
ABI=eabihf
|
||||
#else
|
||||
ABI=eabi
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
|
||||
eval "$cc_set_abi"
|
||||
case $ABI in
|
||||
eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
|
||||
esac
|
||||
fi
|
||||
GUESS=$CPU-unknown-linux-$LIBCABI
|
||||
;;
|
||||
aarch64_be:Linux:*:*)
|
||||
UNAME_MACHINE=aarch64_be
|
||||
@ -1036,6 +1066,15 @@ EOF
|
||||
k1om:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
;;
|
||||
kvx:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
;;
|
||||
kvx:cos:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-cos
|
||||
;;
|
||||
kvx:mbr:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-mbr
|
||||
;;
|
||||
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
;;
|
||||
@ -1191,7 +1230,7 @@ EOF
|
||||
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
|
||||
;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# If we were able to find 'uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
GUESS=$UNAME_MACHINE-pc-os2-emx
|
||||
;;
|
||||
@ -1332,7 +1371,7 @@ EOF
|
||||
GUESS=ns32k-sni-sysv
|
||||
fi
|
||||
;;
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
GUESS=i586-unisys-sysv4
|
||||
;;
|
||||
|
222
contrib/byacc/config.sub
vendored
222
contrib/byacc/config.sub
vendored
@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2023 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2022-08-01'
|
||||
timestamp='2023-09-15'
|
||||
|
||||
# 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,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
Copyright 1992-2023 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."
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
Try '$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
@ -130,7 +130,7 @@ IFS=$saved_IFS
|
||||
# Separate into logical components for further validation
|
||||
case $1 in
|
||||
*-*-*-*-*)
|
||||
echo Invalid configuration \`"$1"\': more than four components >&2
|
||||
echo "Invalid configuration '$1': more than four components" >&2
|
||||
exit 1
|
||||
;;
|
||||
*-*-*-*)
|
||||
@ -145,7 +145,8 @@ case $1 in
|
||||
nto-qnx* | linux-* | uclinux-uclibc* \
|
||||
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
|
||||
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
|
||||
| storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
| storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \
|
||||
| windows-* )
|
||||
basic_machine=$field1
|
||||
basic_os=$maybe_os
|
||||
;;
|
||||
@ -943,7 +944,7 @@ $basic_machine
|
||||
EOF
|
||||
IFS=$saved_IFS
|
||||
;;
|
||||
# We use `pc' rather than `unknown'
|
||||
# We use 'pc' rather than 'unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i*86 | x86_64)
|
||||
@ -1075,7 +1076,7 @@ case $cpu-$vendor in
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
cpu=i586
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
|
||||
cpu=i686
|
||||
;;
|
||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||
@ -1180,7 +1181,7 @@ case $cpu-$vendor in
|
||||
case $cpu in
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| aarch64 | aarch64_be \
|
||||
| aarch64 | aarch64_be | aarch64c | arm64ec \
|
||||
| abacus \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
|
||||
@ -1199,12 +1200,14 @@ case $cpu-$vendor in
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| e2k | elxsi | epiphany \
|
||||
| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
|
||||
| javascript \
|
||||
| h8300 | h8500 \
|
||||
| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i*86 | i860 | i960 | ia16 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| k1om \
|
||||
| kvx \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| loongarch32 | loongarch64 \
|
||||
@ -1213,31 +1216,7 @@ case $cpu-$vendor in
|
||||
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
||||
| m88110 | m88k | maxq | mb | mcore | mep | metag \
|
||||
| microblaze | microblazeel \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64eb | mips64el \
|
||||
| mips64octeon | mips64octeonel \
|
||||
| mips64orion | mips64orionel \
|
||||
| mips64r5900 | mips64r5900el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa32r3 | mipsisa32r3el \
|
||||
| mipsisa32r5 | mipsisa32r5el \
|
||||
| mipsisa32r6 | mipsisa32r6el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64r3 | mipsisa64r3el \
|
||||
| mipsisa64r5 | mipsisa64r5el \
|
||||
| mipsisa64r6 | mipsisa64r6el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipsr5900 | mipsr5900el \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mips* \
|
||||
| mmix \
|
||||
| mn10200 | mn10300 \
|
||||
| moxie \
|
||||
@ -1285,7 +1264,7 @@ case $cpu-$vendor in
|
||||
;;
|
||||
|
||||
*)
|
||||
echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
|
||||
echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@ -1306,11 +1285,12 @@ esac
|
||||
|
||||
# Decode manufacturer-specific aliases for certain operating systems.
|
||||
|
||||
if test x$basic_os != x
|
||||
if test x"$basic_os" != x
|
||||
then
|
||||
|
||||
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
|
||||
# set os.
|
||||
obj=
|
||||
case $basic_os in
|
||||
gnu/linux*)
|
||||
kernel=linux
|
||||
@ -1341,6 +1321,10 @@ EOF
|
||||
kernel=linux
|
||||
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
|
||||
;;
|
||||
managarm*)
|
||||
kernel=managarm
|
||||
os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
|
||||
;;
|
||||
*)
|
||||
kernel=
|
||||
os=$basic_os
|
||||
@ -1506,10 +1490,16 @@ case $os in
|
||||
os=eabi
|
||||
;;
|
||||
*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
aout* | coff* | elf* | pe*)
|
||||
# These are machine code file formats, not OSes
|
||||
obj=$os
|
||||
os=
|
||||
;;
|
||||
*)
|
||||
# No normalization, but not necessarily accepted, that comes below.
|
||||
;;
|
||||
@ -1528,12 +1518,15 @@ else
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
kernel=
|
||||
obj=
|
||||
case $cpu-$vendor in
|
||||
score-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
spu-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=riscix1.2
|
||||
@ -1543,28 +1536,35 @@ case $cpu-$vendor in
|
||||
os=gnu
|
||||
;;
|
||||
arm*-semi)
|
||||
os=aout
|
||||
os=
|
||||
obj=aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
c8051-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
clipper-intergraph)
|
||||
os=clix
|
||||
;;
|
||||
hexagon-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
tic54x-*)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
tic55x-*)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
tic6x-*)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
@ -1586,19 +1586,24 @@ case $cpu-$vendor in
|
||||
os=sunos3
|
||||
;;
|
||||
m68*-cisco)
|
||||
os=aout
|
||||
os=
|
||||
obj=aout
|
||||
;;
|
||||
mep-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
mips*-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
or32-*)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=sysv3
|
||||
@ -1607,7 +1612,8 @@ case $cpu-$vendor in
|
||||
os=sunos4.1.1
|
||||
;;
|
||||
pru-*)
|
||||
os=elf
|
||||
os=
|
||||
obj=elf
|
||||
;;
|
||||
*-be)
|
||||
os=beos
|
||||
@ -1688,10 +1694,12 @@ case $cpu-$vendor in
|
||||
os=uxpv
|
||||
;;
|
||||
*-rom68k)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
*-*bug)
|
||||
os=coff
|
||||
os=
|
||||
obj=coff
|
||||
;;
|
||||
*-apple)
|
||||
os=macos
|
||||
@ -1709,7 +1717,8 @@ esac
|
||||
|
||||
fi
|
||||
|
||||
# Now, validate our (potentially fixed-up) OS.
|
||||
# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
|
||||
|
||||
case $os in
|
||||
# Sometimes we do "kernel-libc", so those need to count as OSes.
|
||||
musl* | newlib* | relibc* | uclibc*)
|
||||
@ -1720,6 +1729,9 @@ case $os in
|
||||
# VxWorks passes extra cpu info in the 4th filed.
|
||||
simlinux | simwindows | spe)
|
||||
;;
|
||||
# See `case $cpu-$os` validation below
|
||||
ghcjs)
|
||||
;;
|
||||
# Now accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST end in a * to match a version number.
|
||||
@ -1728,7 +1740,7 @@ case $os in
|
||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
||||
| hiux* | abug | nacl* | netware* | windows* \
|
||||
| os9* | macos* | osx* | ios* \
|
||||
| os9* | macos* | osx* | ios* | tvos* | watchos* \
|
||||
| mpw* | magic* | mmixware* | mon960* | lnews* \
|
||||
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
||||
| aos* | aros* | cloudabi* | sortix* | twizzler* \
|
||||
@ -1737,11 +1749,11 @@ case $os in
|
||||
| mirbsd* | netbsd* | dicos* | openedition* | ose* \
|
||||
| bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
|
||||
| ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
|
||||
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
|
||||
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
|
||||
| bosx* | nextstep* | cxux* | oabi* \
|
||||
| ptx* | ecoff* | winnt* | domain* | vsta* \
|
||||
| udi* | lites* | ieee* | go32* | aux* | hcos* \
|
||||
| chorusrdb* | cegcc* | glidix* | serenity* \
|
||||
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \
|
||||
| cygwin* | msys* | moss* | proelf* | rtems* \
|
||||
| midipix* | mingw32* | mingw64* | mint* \
|
||||
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
|
||||
| interix* | uwin* | mks* | rhapsody* | darwin* \
|
||||
@ -1754,7 +1766,7 @@ case $os in
|
||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
||||
| fiwix* )
|
||||
| fiwix* | mlibc* | cos* | mbr* )
|
||||
;;
|
||||
# This one is extra strict with allowed versions
|
||||
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
||||
@ -1762,41 +1774,99 @@ case $os in
|
||||
;;
|
||||
none)
|
||||
;;
|
||||
kernel* | msvc* )
|
||||
# Restricted further below
|
||||
;;
|
||||
'')
|
||||
if test x"$obj" = x
|
||||
then
|
||||
echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
|
||||
echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
case $obj in
|
||||
aout* | coff* | elf* | pe*)
|
||||
;;
|
||||
'')
|
||||
# empty is fine
|
||||
;;
|
||||
*)
|
||||
echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Here we handle the constraint that a (synthetic) cpu and os are
|
||||
# valid only in combination with each other and nowhere else.
|
||||
case $cpu-$os in
|
||||
# The "javascript-unknown-ghcjs" triple is used by GHC; we
|
||||
# accept it here in order to tolerate that, but reject any
|
||||
# variations.
|
||||
javascript-ghcjs)
|
||||
;;
|
||||
javascript-* | *-ghcjs)
|
||||
echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# As a final step for OS-related things, validate the OS-kernel combination
|
||||
# (given a valid OS), if there is a kernel.
|
||||
case $kernel-$os in
|
||||
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
|
||||
| linux-musl* | linux-relibc* | linux-uclibc* )
|
||||
case $kernel-$os-$obj in
|
||||
linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \
|
||||
| linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- )
|
||||
;;
|
||||
uclinux-uclibc* )
|
||||
uclinux-uclibc*- )
|
||||
;;
|
||||
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
|
||||
managarm-mlibc*- | managarm-kernel*- )
|
||||
;;
|
||||
windows*-gnu*- | windows*-msvc*-)
|
||||
;;
|
||||
-dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- )
|
||||
# These are just libc implementations, not actual OSes, and thus
|
||||
# require a kernel.
|
||||
echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
|
||||
echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
kfreebsd*-gnu* | kopensolaris*-gnu*)
|
||||
-kernel*- )
|
||||
echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
vxworks-simlinux | vxworks-simwindows | vxworks-spe)
|
||||
*-kernel*- )
|
||||
echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
nto-qnx*)
|
||||
*-msvc*- )
|
||||
echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
os2-emx)
|
||||
kfreebsd*-gnu*- | kopensolaris*-gnu*-)
|
||||
;;
|
||||
*-eabi* | *-gnueabi*)
|
||||
vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
|
||||
;;
|
||||
-*)
|
||||
nto-qnx*-)
|
||||
;;
|
||||
os2-emx-)
|
||||
;;
|
||||
*-eabi*- | *-gnueabi*-)
|
||||
;;
|
||||
none--*)
|
||||
# None (no kernel, i.e. freestanding / bare metal),
|
||||
# can be paired with an machine code file format
|
||||
;;
|
||||
-*-)
|
||||
# Blank kernel with real OS is always fine.
|
||||
;;
|
||||
*-*)
|
||||
echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
|
||||
--*)
|
||||
# Blank kernel and OS with real machine code file format is always fine.
|
||||
;;
|
||||
*-*-*)
|
||||
echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@ -1879,7 +1949,7 @@ case $vendor in
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$cpu-$vendor-${kernel:+$kernel-}$os"
|
||||
echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
|
||||
exit
|
||||
|
||||
# Local variables:
|
||||
|
1380
contrib/byacc/configure
vendored
1380
contrib/byacc/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
dnl Process this file with 'autoconf' to produce a 'configure' script
|
||||
dnl $Id: configure.in,v 1.28 2023/02/02 00:14:51 tom Exp $
|
||||
dnl $Id: configure.in,v 1.29 2023/05/19 07:58:43 tom Exp $
|
||||
AC_PREREQ(2.52.20200802)
|
||||
AC_REVISION($Revision: 1.28 $)
|
||||
AC_REVISION($Revision: 1.29 $)
|
||||
AC_INIT(main.c)
|
||||
AC_CONFIG_HEADER(config.h:config_h.in)
|
||||
|
||||
@ -60,6 +60,8 @@ AC_SUBST(SKELETON)
|
||||
CF_ENABLE_WARNINGS(Wwrite-strings,yes)
|
||||
CF_DISABLE_ECHO
|
||||
CF_DISABLE_LEAKS
|
||||
CF_MANPAGE_FORMAT
|
||||
CF_INSTALL_MAN
|
||||
CF_WITH_MAN2HTML
|
||||
|
||||
AC_TYPE_MODE_T
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: defs.h,v 1.71 2022/11/06 21:44:54 tom Exp $ */
|
||||
/* $Id: defs.h,v 1.74 2023/05/18 21:28:05 tom Exp $ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
@ -122,6 +122,7 @@ typedef enum
|
||||
,NONPOSIX_DEBUG
|
||||
|
||||
/* other bison "extensions", some useful */
|
||||
,HACK_DEFINE
|
||||
,ERROR_VERBOSE
|
||||
,EXPECT
|
||||
,EXPECT_RR
|
||||
@ -187,7 +188,7 @@ SYM_CASES;
|
||||
|
||||
#define DO_FREE(x) if (x) { FREE(x); x = 0; }
|
||||
|
||||
#define NO_SPACE(p) if (p == 0) no_space(); assert(p != 0)
|
||||
#define NO_SPACE(p) do { if (p == 0) on_error(); assert(p != 0); } while (0)
|
||||
|
||||
/* messages */
|
||||
#define PLURAL(n) ((n) > 1 ? "s" : "")
|
||||
@ -470,41 +471,45 @@ struct ainfo
|
||||
char *a_cptr;
|
||||
};
|
||||
|
||||
extern void arg_number_disagree_warning(int a_lineno, char *a_name);
|
||||
extern void arg_type_disagree_warning(int a_lineno, int i, char *a_name);
|
||||
extern GCC_NORETURN void at_error(int a_lineno, char *a_line, char *a_cptr);
|
||||
extern void arg_number_disagree_warning(int a_lineno, const char *a_name);
|
||||
extern void arg_type_disagree_warning(int a_lineno, int i, const char *a_name);
|
||||
extern GCC_NORETURN void at_error(int a_lineno, const char *a_line, const char *a_cptr);
|
||||
extern void at_warning(int a_lineno, int i);
|
||||
extern GCC_NORETURN void bad_formals(void);
|
||||
extern void default_action_warning(char *s);
|
||||
extern void default_action_warning(const char *s);
|
||||
extern void destructor_redeclared_warning(const struct ainfo *);
|
||||
extern GCC_NORETURN void dollar_error(int a_lineno, char *a_line, char *a_cptr);
|
||||
extern void dislocations_warning(void);
|
||||
extern GCC_NORETURN void dollar_error(int a_lineno, const char *a_line, const char *a_cptr);
|
||||
extern void dollar_warning(int a_lineno, int i);
|
||||
extern GCC_NORETURN void fatal(const char *msg);
|
||||
extern GCC_NORETURN void illegal_character(char *c_cptr);
|
||||
extern GCC_NORETURN void illegal_tag(int t_lineno, char *t_line, char *t_cptr);
|
||||
extern GCC_NORETURN void illegal_character(const char *c_cptr);
|
||||
extern GCC_NORETURN void illegal_tag(int t_lineno, const char *t_line, const char *t_cptr);
|
||||
extern GCC_NORETURN void missing_brace(void);
|
||||
extern GCC_NORETURN void no_grammar(void);
|
||||
extern GCC_NORETURN void no_space(void);
|
||||
extern GCC_NORETURN void on_error(void);
|
||||
extern GCC_NORETURN void open_error(const char *filename);
|
||||
extern GCC_NORETURN void over_unionized(char *u_cptr);
|
||||
extern GCC_NORETURN void over_unionized(const char *u_cptr);
|
||||
extern void prec_redeclared(void);
|
||||
extern void reprec_warning(char *s);
|
||||
extern void reprec_warning(const char *s);
|
||||
extern void restarted_warning(void);
|
||||
extern void retyped_warning(char *s);
|
||||
extern void revalued_warning(char *s);
|
||||
extern void start_requires_args(char *a_name);
|
||||
extern GCC_NORETURN void syntax_error(int st_lineno, char *st_line, char *st_cptr);
|
||||
extern void retyped_warning(const char *s);
|
||||
extern void revalued_warning(const char *s);
|
||||
extern void start_requires_args(const char *a_name);
|
||||
extern GCC_NORETURN void syntax_error(int st_lineno, const char *st_line, const char *st_cptr);
|
||||
extern GCC_NORETURN void terminal_lhs(int s_lineno);
|
||||
extern GCC_NORETURN void terminal_start(char *s);
|
||||
extern GCC_NORETURN void tokenized_start(char *s);
|
||||
extern GCC_NORETURN void undefined_goal(char *s);
|
||||
extern void undefined_symbol_warning(char *s);
|
||||
extern GCC_NORETURN void terminal_start(const char *s);
|
||||
extern GCC_NORETURN void tokenized_start(const char *s);
|
||||
extern GCC_NORETURN void undefined_goal(const char *s);
|
||||
extern void undefined_symbol_warning(const char *s);
|
||||
extern GCC_NORETURN void unexpected_EOF(void);
|
||||
extern void unknown_arg_warning(int d_lineno, const char *dlr_opt,
|
||||
const char *d_arg, const char *d_line,
|
||||
extern void unknown_arg_warning(int d_lineno,
|
||||
const char *dlr_opt,
|
||||
const char *d_arg,
|
||||
const char *d_line,
|
||||
const char *d_cptr);
|
||||
extern GCC_NORETURN void unknown_rhs(int i);
|
||||
extern void unsupported_flag_warning(const char *flag, const char *details);
|
||||
extern GCC_NORETURN void unexpected_value(const struct ainfo *);
|
||||
extern GCC_NORETURN void unterminated_action(const struct ainfo *);
|
||||
extern GCC_NORETURN void unterminated_comment(const struct ainfo *);
|
||||
extern GCC_NORETURN void unterminated_string(const struct ainfo *);
|
||||
@ -512,11 +517,11 @@ extern GCC_NORETURN void unterminated_text(const struct ainfo *);
|
||||
extern GCC_NORETURN void unterminated_union(const struct ainfo *);
|
||||
extern void untyped_arg_warning(int a_lineno, const char *dlr_opt, const char *a_name);
|
||||
extern GCC_NORETURN void untyped_lhs(void);
|
||||
extern GCC_NORETURN void untyped_rhs(int i, char *s);
|
||||
extern GCC_NORETURN void used_reserved(char *s);
|
||||
extern GCC_NORETURN void untyped_rhs(int i, const char *s);
|
||||
extern GCC_NORETURN void used_reserved(const char *s);
|
||||
extern GCC_NORETURN void unterminated_arglist(const struct ainfo *);
|
||||
extern void wrong_number_args_warning(const char *which, const char *a_name);
|
||||
extern void wrong_type_for_arg_warning(int i, char *a_name);
|
||||
extern void wrong_type_for_arg_warning(int i, const char *a_name);
|
||||
|
||||
/* graph.c */
|
||||
extern void graph(void);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: error.c,v 1.14 2016/12/02 18:35:55 tom Exp $ */
|
||||
/* $Id: error.c,v 1.17 2023/05/18 21:38:35 tom Exp $ */
|
||||
|
||||
/* routines for printing error messages */
|
||||
|
||||
@ -12,10 +12,13 @@ fatal(const char *msg)
|
||||
}
|
||||
|
||||
void
|
||||
no_space(void)
|
||||
on_error(void)
|
||||
{
|
||||
fprintf(stderr, "%s: f - out of space\n", myname);
|
||||
done(2);
|
||||
const char *msg;
|
||||
if (errno && (msg = strerror(errno)) != NULL)
|
||||
fatal(msg);
|
||||
else
|
||||
fatal("unknown error");
|
||||
}
|
||||
|
||||
void
|
||||
@ -68,7 +71,7 @@ print_pos(const char *st_line, const char *st_cptr)
|
||||
}
|
||||
|
||||
void
|
||||
syntax_error(int st_lineno, char *st_line, char *st_cptr)
|
||||
syntax_error(int st_lineno, const char *st_line, const char *st_cptr)
|
||||
{
|
||||
fprintf(stderr, "%s: e - line %d of \"%s\", syntax error\n",
|
||||
myname, st_lineno, input_file_name);
|
||||
@ -76,6 +79,15 @@ syntax_error(int st_lineno, char *st_line, char *st_cptr)
|
||||
done(1);
|
||||
}
|
||||
|
||||
void
|
||||
unexpected_value(const struct ainfo *a)
|
||||
{
|
||||
fprintf(stderr, "%s: e - line %d of \"%s\", unexpected value\n",
|
||||
myname, a->a_lineno, input_file_name);
|
||||
print_pos(a->a_line, a->a_cptr);
|
||||
done(1);
|
||||
}
|
||||
|
||||
void
|
||||
unterminated_comment(const struct ainfo *a)
|
||||
{
|
||||
@ -113,7 +125,7 @@ declaration\n", myname, a->a_lineno, input_file_name);
|
||||
}
|
||||
|
||||
void
|
||||
over_unionized(char *u_cptr)
|
||||
over_unionized(const char *u_cptr)
|
||||
{
|
||||
fprintf(stderr, "%s: e - line %d of \"%s\", too many %%union \
|
||||
declarations\n", myname, lineno, input_file_name);
|
||||
@ -122,7 +134,7 @@ declarations\n", myname, lineno, input_file_name);
|
||||
}
|
||||
|
||||
void
|
||||
illegal_tag(int t_lineno, char *t_line, char *t_cptr)
|
||||
illegal_tag(int t_lineno, const char *t_line, const char *t_cptr)
|
||||
{
|
||||
fprintf(stderr, "%s: e - line %d of \"%s\", illegal tag\n",
|
||||
myname, t_lineno, input_file_name);
|
||||
@ -131,7 +143,7 @@ illegal_tag(int t_lineno, char *t_line, char *t_cptr)
|
||||
}
|
||||
|
||||
void
|
||||
illegal_character(char *c_cptr)
|
||||
illegal_character(const char *c_cptr)
|
||||
{
|
||||
fprintf(stderr, "%s: e - line %d of \"%s\", illegal character\n",
|
||||
myname, lineno, input_file_name);
|
||||
@ -140,7 +152,7 @@ illegal_character(char *c_cptr)
|
||||
}
|
||||
|
||||
void
|
||||
used_reserved(char *s)
|
||||
used_reserved(const char *s)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s: e - line %d of \"%s\", illegal use of reserved symbol \
|
||||
@ -149,7 +161,7 @@ used_reserved(char *s)
|
||||
}
|
||||
|
||||
void
|
||||
tokenized_start(char *s)
|
||||
tokenized_start(const char *s)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s: e - line %d of \"%s\", the start symbol %s cannot be \
|
||||
@ -158,14 +170,14 @@ declared to be a token\n", myname, lineno, input_file_name, s);
|
||||
}
|
||||
|
||||
void
|
||||
retyped_warning(char *s)
|
||||
retyped_warning(const char *s)
|
||||
{
|
||||
fprintf(stderr, "%s: w - line %d of \"%s\", the type of %s has been \
|
||||
redeclared\n", myname, lineno, input_file_name, s);
|
||||
}
|
||||
|
||||
void
|
||||
reprec_warning(char *s)
|
||||
reprec_warning(const char *s)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s: w - line %d of \"%s\", the precedence of %s has been \
|
||||
@ -173,14 +185,14 @@ redeclared\n", myname, lineno, input_file_name, s);
|
||||
}
|
||||
|
||||
void
|
||||
revalued_warning(char *s)
|
||||
revalued_warning(const char *s)
|
||||
{
|
||||
fprintf(stderr, "%s: w - line %d of \"%s\", the value of %s has been \
|
||||
redeclared\n", myname, lineno, input_file_name, s);
|
||||
}
|
||||
|
||||
void
|
||||
terminal_start(char *s)
|
||||
terminal_start(const char *s)
|
||||
{
|
||||
fprintf(stderr, "%s: e - line %d of \"%s\", the start symbol %s is a \
|
||||
token\n", myname, lineno, input_file_name, s);
|
||||
@ -234,7 +246,7 @@ end of the current rule\n", myname, a_lineno, input_file_name, i);
|
||||
}
|
||||
|
||||
void
|
||||
dollar_error(int a_lineno, char *a_line, char *a_cptr)
|
||||
dollar_error(int a_lineno, const char *a_line, const char *a_cptr)
|
||||
{
|
||||
fprintf(stderr, "%s: e - line %d of \"%s\", illegal $-name\n",
|
||||
myname, a_lineno, input_file_name);
|
||||
@ -242,6 +254,13 @@ dollar_error(int a_lineno, char *a_line, char *a_cptr)
|
||||
done(1);
|
||||
}
|
||||
|
||||
void
|
||||
dislocations_warning(void)
|
||||
{
|
||||
fprintf(stderr, "%s: e - line %d of \"%s\", expected %%locations\n",
|
||||
myname, lineno, input_file_name);
|
||||
}
|
||||
|
||||
void
|
||||
untyped_lhs(void)
|
||||
{
|
||||
@ -251,7 +270,7 @@ untyped_lhs(void)
|
||||
}
|
||||
|
||||
void
|
||||
untyped_rhs(int i, char *s)
|
||||
untyped_rhs(int i, const char *s)
|
||||
{
|
||||
fprintf(stderr, "%s: e - line %d of \"%s\", $%d (%s) is untyped\n",
|
||||
myname, lineno, input_file_name, i, s);
|
||||
@ -267,7 +286,7 @@ unknown_rhs(int i)
|
||||
}
|
||||
|
||||
void
|
||||
default_action_warning(char *s)
|
||||
default_action_warning(const char *s)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s: w - line %d of \"%s\", the default action for %s assigns an \
|
||||
@ -276,14 +295,14 @@ undefined value to $$\n",
|
||||
}
|
||||
|
||||
void
|
||||
undefined_goal(char *s)
|
||||
undefined_goal(const char *s)
|
||||
{
|
||||
fprintf(stderr, "%s: e - the start symbol %s is undefined\n", myname, s);
|
||||
done(1);
|
||||
}
|
||||
|
||||
void
|
||||
undefined_symbol_warning(char *s)
|
||||
undefined_symbol_warning(const char *s)
|
||||
{
|
||||
fprintf(stderr, "%s: w - the symbol %s is undefined\n", myname, s);
|
||||
}
|
||||
@ -306,7 +325,7 @@ end of the current rule\n", myname, a_lineno, input_file_name, i);
|
||||
}
|
||||
|
||||
void
|
||||
at_error(int a_lineno, char *a_line, char *a_cptr)
|
||||
at_error(int a_lineno, const char *a_line, const char *a_cptr)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s: e - line %d of \"%s\", illegal @$ or @N reference\n",
|
||||
@ -326,7 +345,7 @@ unterminated_arglist(const struct ainfo *a)
|
||||
}
|
||||
|
||||
void
|
||||
arg_number_disagree_warning(int a_lineno, char *a_name)
|
||||
arg_number_disagree_warning(int a_lineno, const char *a_name)
|
||||
{
|
||||
fprintf(stderr, "%s: w - line %d of \"%s\", number of arguments of %s "
|
||||
"doesn't agree with previous declaration\n",
|
||||
@ -343,7 +362,7 @@ bad_formals(void)
|
||||
}
|
||||
|
||||
void
|
||||
arg_type_disagree_warning(int a_lineno, int i, char *a_name)
|
||||
arg_type_disagree_warning(int a_lineno, int i, const char *a_name)
|
||||
{
|
||||
fprintf(stderr, "%s: w - line %d of \"%s\", type of argument %d "
|
||||
"to %s doesn't agree with previous declaration\n",
|
||||
@ -351,8 +370,10 @@ arg_type_disagree_warning(int a_lineno, int i, char *a_name)
|
||||
}
|
||||
|
||||
void
|
||||
unknown_arg_warning(int d_lineno, const char *dlr_opt, const char *d_arg, const char
|
||||
*d_line, const char *d_cptr)
|
||||
unknown_arg_warning(int d_lineno, const char *dlr_opt,
|
||||
const char *d_arg,
|
||||
const char *d_line,
|
||||
const char *d_cptr)
|
||||
{
|
||||
fprintf(stderr, "%s: w - line %d of \"%s\", unknown argument %s%s\n",
|
||||
myname, d_lineno, input_file_name, dlr_opt, d_arg);
|
||||
@ -376,7 +397,7 @@ wrong_number_args_warning(const char *which, const char *a_name)
|
||||
}
|
||||
|
||||
void
|
||||
wrong_type_for_arg_warning(int i, char *a_name)
|
||||
wrong_type_for_arg_warning(int i, const char *a_name)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s: w - line %d of \"%s\", wrong type for default argument %d to %s\n",
|
||||
@ -385,7 +406,7 @@ wrong_type_for_arg_warning(int i, char *a_name)
|
||||
}
|
||||
|
||||
void
|
||||
start_requires_args(char *a_name)
|
||||
start_requires_args(const char *a_name)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s: w - line %d of \"%s\", start symbol %s requires arguments\n",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: main.c,v 1.73 2021/08/08 20:39:34 tom Exp $ */
|
||||
/* $Id: main.c,v 1.74 2023/05/11 07:51:36 tom Exp $ */
|
||||
|
||||
#include <signal.h>
|
||||
#if !defined(_WIN32) || defined(__MINGW32__)
|
||||
@ -563,8 +563,8 @@ static char *
|
||||
alloc_file_name(size_t len, const char *suffix)
|
||||
{
|
||||
char *result = TMALLOC(char, len + strlen(suffix) + 1);
|
||||
if (result == 0)
|
||||
no_space();
|
||||
if (result == NULL)
|
||||
on_error();
|
||||
strcpy(result, file_prefix);
|
||||
strcpy(result + len, suffix);
|
||||
return result;
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: makefile.in,v 1.25 2022/11/06 21:03:11 tom Exp $
|
||||
# $Id: makefile.in,v 1.26 2023/05/19 23:16:31 tom Exp $
|
||||
#
|
||||
# UNIX template-makefile for Berkeley Yacc
|
||||
|
||||
@ -99,7 +99,7 @@ all : $(THIS)$x
|
||||
|
||||
install: all installdirs
|
||||
$(INSTALL_PROGRAM) $(THIS)$x $(bindir)/$(actual_bin)
|
||||
- $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(actual_man)
|
||||
@ $(SHELL) ./install-man $(srcdir)/$(THIS).1 $(mandir)/$(actual_man)
|
||||
|
||||
installdirs:
|
||||
mkdir -p $(bindir)
|
||||
@ -107,7 +107,7 @@ installdirs:
|
||||
|
||||
uninstall:
|
||||
- rm -f $(bindir)/$(actual_bin)
|
||||
- rm -f $(mandir)/$(actual_man)
|
||||
@ $(SHELL) ./install-man $(mandir)/$(actual_man)
|
||||
|
||||
################################################################################
|
||||
.SUFFIXES : .c $o .i .skel
|
||||
@ -135,7 +135,7 @@ clean :: mostlyclean
|
||||
- rm -f $(THIS)$x
|
||||
|
||||
distclean :: clean
|
||||
- rm -f config.log config.cache config.status config.h makefile man2html.tmp
|
||||
- rm -f config.log config.cache config.status config.h makefile man2html.tmp install-man*
|
||||
- rm -f $(testdir)/yacc/test-* $(testdir)/btyacc/test-*
|
||||
|
||||
realclean :: distclean
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: mstring.c,v 1.9 2019/11/19 23:54:53 tom Exp $ */
|
||||
/* $Id: mstring.c,v 1.10 2023/02/26 10:15:01 tom Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -40,7 +40,7 @@ msprintf(struct mstring *s, const char *fmt, ...)
|
||||
do
|
||||
{
|
||||
va_start(args, fmt);
|
||||
len = (size_t) vsnprintf(buf_ptr, buf_len, fmt, args);
|
||||
len = (size_t)vsnprintf(buf_ptr, buf_len, fmt, args);
|
||||
va_end(args);
|
||||
if ((changed = (len > buf_len)) != 0)
|
||||
{
|
||||
@ -57,17 +57,17 @@ msprintf(struct mstring *s, const char *fmt, ...)
|
||||
while (changed);
|
||||
#else
|
||||
va_start(args, fmt);
|
||||
len = (size_t) vsprintf(buf_ptr, fmt, args);
|
||||
len = (size_t)vsprintf(buf_ptr, fmt, args);
|
||||
va_end(args);
|
||||
if (len >= buf_len)
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (len > (size_t) (s->end - s->ptr))
|
||||
if (len > (size_t)(s->end - s->ptr))
|
||||
{
|
||||
char *new_base;
|
||||
size_t cp = (size_t) (s->ptr - s->base);
|
||||
size_t cl = (size_t) (s->end - s->base);
|
||||
size_t cp = (size_t)(s->ptr - s->base);
|
||||
size_t cl = (size_t)(s->end - s->base);
|
||||
size_t nl = cl;
|
||||
while (len > (nl - cp))
|
||||
nl = nl + nl + TAIL;
|
||||
@ -97,7 +97,7 @@ mputchar(struct mstring *s, int ch)
|
||||
return ch;
|
||||
if (s->ptr == s->end)
|
||||
{
|
||||
size_t len = (size_t) (s->end - s->base);
|
||||
size_t len = (size_t)(s->end - s->base);
|
||||
if ((s->base = realloc(s->base, len + len + TAIL)))
|
||||
{
|
||||
s->ptr = s->base + len;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: output.c,v 1.100 2022/01/09 18:03:56 tom Exp $ */
|
||||
/* $Id: output.c,v 1.101 2023/05/16 21:19:48 tom Exp $ */
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
@ -1623,21 +1623,14 @@ output_pure_parser(FILE * fp)
|
||||
if (fp == code_file)
|
||||
++outline;
|
||||
fprintf(fp, "#define YYPURE %d\n", pure_parser);
|
||||
putc_code(fp, '\n');
|
||||
}
|
||||
|
||||
#if defined(YY_NO_LEAKS)
|
||||
static void
|
||||
output_no_leaks(FILE * fp)
|
||||
{
|
||||
putc_code(fp, '\n');
|
||||
|
||||
if (fp == code_file)
|
||||
++outline;
|
||||
fputs("#define YY_NO_LEAKS 1\n", fp);
|
||||
#else
|
||||
putc_code(fp, '\n');
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
output_trailing_text(void)
|
||||
@ -2092,9 +2085,6 @@ output(void)
|
||||
|
||||
output_prefix(fp);
|
||||
output_pure_parser(fp);
|
||||
#if defined(YY_NO_LEAKS)
|
||||
output_no_leaks(fp);
|
||||
#endif
|
||||
output_stored_text(fp);
|
||||
output_stype(fp);
|
||||
#if defined(YYBTYACC)
|
||||
|
@ -1,119 +0,0 @@
|
||||
Summary: public domain Berkeley LALR Yacc parser generator
|
||||
|
||||
%global AppVersion 2.0
|
||||
%global AppPatched 20230201
|
||||
|
||||
%global AltProgram byacc2
|
||||
%global UseProgram yacc
|
||||
|
||||
# $Id: byacc.spec,v 1.70 2023/02/02 00:12:06 tom Exp $
|
||||
Name: byacc
|
||||
Version: %{AppVersion}.%{AppPatched}
|
||||
Release: 1
|
||||
License: Public Domain, MIT
|
||||
URL: https://invisible-island.net/%{name}/
|
||||
Source0: https://invisible-mirror.net/archives/%{name}/%{name}-%{AppPatched}.tgz
|
||||
|
||||
%description
|
||||
This package provides a parser generator utility that reads a grammar
|
||||
specification from a file and generates an LR(1) parser for it. The
|
||||
parsers consist of a set of LALR(1) parsing tables and a driver
|
||||
routine written in the C programming language. It has a public domain
|
||||
license which includes the generated C.
|
||||
|
||||
%package -n byacc2
|
||||
Summary: public domain Berkeley LALR Yacc parser generator with backtracking
|
||||
|
||||
%description -n byacc2
|
||||
This package provides a parser generator utility that reads a grammar
|
||||
specification from a file and generates an LR(1) parser for it. The
|
||||
parsers consist of a set of LALR(1) parsing tables and a driver
|
||||
routine written in the C programming language. It has a public domain
|
||||
license which includes the generated C.
|
||||
|
||||
This package has the backtracking extension.
|
||||
|
||||
%prep
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
%setup -q -n %{name}-%{AppPatched}
|
||||
|
||||
%build
|
||||
%define my_srcdir ..
|
||||
%define CFG_OPTS \\\
|
||||
--verbose \\\
|
||||
--disable-echo \\\
|
||||
--enable-stdnoreturn \\\
|
||||
--target %{_target_platform} \\\
|
||||
--prefix=%{_prefix} \\\
|
||||
--srcdir=%{my_srcdir} \\\
|
||||
--bindir=%{_bindir} \\\
|
||||
--libdir=%{_libdir} \\\
|
||||
--mandir=%{_mandir}
|
||||
|
||||
%global _configure ../configure
|
||||
|
||||
mkdir BUILD-byacc
|
||||
pushd BUILD-byacc
|
||||
CONFIGURE_TOP=%{my_srcdir} \
|
||||
%configure %{CFG_OPTS} \
|
||||
--program-prefix=b \
|
||||
make
|
||||
popd
|
||||
|
||||
mkdir BUILD-byacc2
|
||||
pushd BUILD-byacc2
|
||||
CONFIGURE_TOP=%{my_srcdir} \
|
||||
%configure %{CFG_OPTS} \
|
||||
--enable-btyacc \
|
||||
--program-transform-name='s,\<yacc,byacc2,g' \
|
||||
--with-max-table-size=123456 \
|
||||
make
|
||||
popd
|
||||
|
||||
%install
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
pushd BUILD-byacc
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
( cd $RPM_BUILD_ROOT%{_bindir} && ln -vs %{name} %{UseProgram} )
|
||||
popd
|
||||
|
||||
pushd BUILD-byacc2
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
popd
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%doc ACKNOWLEDGEMENTS CHANGES NEW_FEATURES NOTES NO_WARRANTY README
|
||||
%license LICENSE
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/%{UseProgram}
|
||||
%{_mandir}/man1/%{name}.*
|
||||
|
||||
%files -n byacc2
|
||||
%doc ACKNOWLEDGEMENTS CHANGES NEW_FEATURES NOTES NO_WARRANTY README README.BTYACC
|
||||
%license LICENSE
|
||||
%{_bindir}/%{AltProgram}
|
||||
%{_mandir}/man1/%{AltProgram}.*
|
||||
|
||||
%changelog
|
||||
# each patch should add its ChangeLog entries here
|
||||
|
||||
* Sun Jan 09 2022 Thomas Dickey
|
||||
- rpmlint
|
||||
|
||||
* Sat Jan 01 2022 Thomas Dickey
|
||||
- rename btyacc package to byacc2 to co-exist with traditional btyacc
|
||||
|
||||
* Fri May 25 2018 Thomas Dickey
|
||||
- add btyacc package
|
||||
|
||||
* Sun Jul 09 2017 Thomas Dickey
|
||||
- use predefined "configure"
|
||||
|
||||
* Sun Jun 06 2010 Thomas Dickey
|
||||
- initial version
|
@ -1,519 +0,0 @@
|
||||
byacc (1:2.0.20230201) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 01 Feb 2023 19:12:06 -0500
|
||||
|
||||
byacc (1:2.0.20221229) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Thu, 29 Dec 2022 05:23:05 -0500
|
||||
|
||||
byacc (1:2.0.20221106) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 06 Nov 2022 10:51:43 -0500
|
||||
|
||||
byacc (1:2.0.20220128) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 28 Jan 2022 08:38:52 -0500
|
||||
|
||||
byacc (1:2.0.20220114) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 14 Jan 2022 16:33:35 -0500
|
||||
|
||||
byacc (1:2.0.20220109) unstable; urgency=low
|
||||
|
||||
* maintenance updates, modify packaging to more closely match distributors.
|
||||
In particular, correct versioning using an epoch.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 09 Jan 2022 10:49:20 -0500
|
||||
|
||||
byacc (20220102) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 02 Jan 2022 11:12:56 -0500
|
||||
|
||||
byacc (20220101) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 Jan 2022 07:06:35 -0500
|
||||
|
||||
byacc (20211224) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 24 Dec 2021 19:13:22 -0500
|
||||
|
||||
byacc (20210808) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 08 Aug 2021 15:26:10 -0400
|
||||
|
||||
byacc (20210802) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 02 Aug 2021 16:50:01 -0400
|
||||
|
||||
byacc (20210801) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 01 Aug 2021 15:30:22 -0400
|
||||
|
||||
byacc (20210619) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 19 Jun 2021 14:06:48 -0400
|
||||
|
||||
byacc (20210520) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Thu, 20 May 2021 15:25:00 -0400
|
||||
|
||||
byacc (20210328) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 28 Mar 2021 11:14:10 -0400
|
||||
|
||||
byacc (20210109) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 09 Jan 2021 09:32:51 -0500
|
||||
|
||||
byacc (20200910) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Thu, 10 Sep 2020 10:45:10 -0400
|
||||
|
||||
byacc (20200330) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 30 Mar 2020 19:31:42 -0400
|
||||
|
||||
byacc (20191125) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 25 Nov 2019 18:13:14 -0500
|
||||
|
||||
byacc (20191119) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 19 Nov 2019 20:40:56 -0500
|
||||
|
||||
byacc (20191103) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 03 Nov 2019 16:42:41 -0500
|
||||
|
||||
byacc (20190617) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 16 Jun 2019 15:51:03 -0400
|
||||
|
||||
byacc (20190616) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 16 Jun 2019 08:55:03 -0400
|
||||
|
||||
byacc (20180609) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 09 Jun 2018 20:42:16 -0400
|
||||
|
||||
byacc (20180525) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 21 May 2018 18:50:44 -0400
|
||||
|
||||
byacc (20180510) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Thu, 10 May 2018 04:59:09 -0400
|
||||
|
||||
byacc (20180509) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 09 May 2018 21:13:51 -0400
|
||||
|
||||
byacc (20180508) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 08 May 2018 16:24:39 -0400
|
||||
|
||||
byacc (20170709) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 09 Jul 2017 13:49:13 -0400
|
||||
|
||||
byacc (20170430) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 30 Apr 2017 16:55:15 -0400
|
||||
|
||||
byacc (20170201) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 01 Feb 2017 04:55:04 -0500
|
||||
|
||||
byacc (20161202) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 02 Dec 2016 07:58:46 -0500
|
||||
|
||||
byacc (20160606) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 06 Jun 2016 20:44:26 -0400
|
||||
|
||||
byacc (20160601) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 06 Jun 2016 05:21:18 -0400
|
||||
|
||||
byacc (20160324) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Thu, 24 Mar 2016 19:55:52 -0400
|
||||
|
||||
byacc (20150711) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 10 Jul 2015 20:53:15 -0400
|
||||
|
||||
byacc (20150705) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 05 Jul 2015 18:24:51 -0400
|
||||
|
||||
byacc (20141128) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 28 Nov 2014 10:42:17 -0500
|
||||
|
||||
byacc (20141006) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 06 Oct 2014 18:52:03 -0400
|
||||
|
||||
byacc (20141005) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 27 Jul 2014 10:45:06 -0400
|
||||
|
||||
byacc (20140715) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 15 Jul 2014 15:36:54 -0400
|
||||
|
||||
byacc (20140527) unstable; urgency=low
|
||||
|
||||
* remove obsolete option from usage message
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 27 May 2014 22:01:55 -0400
|
||||
|
||||
byacc (20140422) unstable; urgency=low
|
||||
|
||||
* maintenance updates
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Tue, 22 Apr 2014 04:13:20 -0400
|
||||
|
||||
byacc (20140409) unstable; urgency=low
|
||||
|
||||
* integrate Tom Shield's btyacc-related changes
|
||||
* add test-cases to fill in gaps reported by lcov
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 09 Apr 2014 15:53:59 -0400
|
||||
|
||||
byacc (20140101) unstable; urgency=low
|
||||
|
||||
* yytname[] changes
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 01 Jan 2014 10:02:12 -0500
|
||||
|
||||
byacc (20130925) unstable; urgency=low
|
||||
|
||||
* increase default stack-size
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 25 Sep 2013 18:41:54 -0400
|
||||
|
||||
byacc (20130304) unstable; urgency=low
|
||||
|
||||
* changes prompted by Richard Mitton bug-report
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 04 Mar 2013 20:17:32 -0500
|
||||
|
||||
byacc (20121003) unstable; urgency=low
|
||||
|
||||
* changes from or prompted by Adrian Bunk.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 29 Sep 2012 09:14:31 -0400
|
||||
|
||||
byacc (20120526) unstable; urgency=low
|
||||
|
||||
* minor code-cleanup.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 26 May 2012 12:14:17 -0400
|
||||
|
||||
byacc (20120115) unstable; urgency=low
|
||||
|
||||
* add testcases, improve documentation for "-s" option.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 13 Jan 2012 20:44:34 -0500
|
||||
|
||||
byacc (20111219) unstable; urgency=low
|
||||
|
||||
* add "-s" option.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 19 Dec 2011 20:54:09 -0500
|
||||
|
||||
byacc (20110908) unstable; urgency=low
|
||||
|
||||
* add "-i" option.
|
||||
* add error-check in reader.c
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 05 Sep 2011 20:05:51 -0400
|
||||
|
||||
byacc (20101229) unstable; urgency=low
|
||||
|
||||
* fixes from Christos Zoulos
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 29 Dec 2010 13:03:50 -0500
|
||||
|
||||
byacc (20101226) unstable; urgency=low
|
||||
|
||||
* portability fix for MinGW
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 25 Dec 2010 19:37:54 -0500
|
||||
|
||||
byacc (20101127) unstable; urgency=low
|
||||
|
||||
* corrected yyerror use of %parse-param data
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 27 Nov 2010 12:32:00 -0500
|
||||
|
||||
byacc (20101126) unstable; urgency=low
|
||||
|
||||
* additional fix to generated code to avoid symbol conflict
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 26 Nov 2010 04:23:08 -0500
|
||||
|
||||
byacc (20101124) unstable; urgency=low
|
||||
|
||||
* amend fix for Red Hat #112617 to restore warning message.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 22 Nov 2010 08:21:23 -0500
|
||||
|
||||
byacc (20101122) unstable; urgency=low
|
||||
|
||||
* fix for generated header to avoid symbol conflict
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Mon, 22 Nov 2010 08:21:23 -0500
|
||||
|
||||
byacc (20100610) unstable; urgency=low
|
||||
|
||||
* Add package scripts to upstream source, for test-builds.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Thu, 10 Jun 2010 08:59:11 -0400
|
||||
|
||||
byacc (20100216-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* debian/source/format: Added using format "3.0 (quilt)"
|
||||
|
||||
-- Dave Beckett <dajobe@debian.org> Tue, 20 Apr 2010 12:56:11 -0700
|
||||
|
||||
byacc (20091027-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* debian/control:
|
||||
- Updated to policy 3.8.4
|
||||
- Add ${misc:Depends}
|
||||
|
||||
-- Dave Beckett <dajobe@debian.org> Tue, 02 Feb 2010 21:36:34 -0800
|
||||
|
||||
byacc (20090221-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Dave Beckett <dajobe@debian.org> Thu, 26 Feb 2009 21:06:20 -0800
|
||||
|
||||
byacc (20080826-1) unstable; urgency=high
|
||||
|
||||
* New upstream release
|
||||
* debian/patches/02-skeleton.patch: Removed - merged upstream
|
||||
* debian/control: Updated to policy 3.8.0
|
||||
* debian/preinst, debian/postrm: removed - empty (lintian)
|
||||
* debian/watch: version 3 and make FTP passive
|
||||
* Acknowledge NMU - thanks.
|
||||
|
||||
-- Dave Beckett <dajobe@debian.org> Wed, 11 Sep 2008 23:58:00 -0700
|
||||
|
||||
byacc (20070509-1.1) unstable; urgency=high
|
||||
|
||||
* Non-maintainer upload.
|
||||
* Fix stack overflow in skeleton.c with upstream patch.
|
||||
Closes: #491182 aka CVE-2008-3196
|
||||
|
||||
-- Thomas Viehmann <tv@beamnet.de> Sun, 24 Aug 2008 23:13:07 +0200
|
||||
|
||||
byacc (20070509-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* debian/watch: Fix to use passive FTP
|
||||
* debian/compat: added instead of use of DH_COMPAT in debian/rules
|
||||
|
||||
-- Dave Beckett <dajobe@debian.org> Tue, 26 Jun 2007 22:39:45 -0700
|
||||
|
||||
byacc (20050813-1) unstable; urgency=low
|
||||
|
||||
* New upstream release:
|
||||
- Do not close union_file for -d option (Closes: #322858)
|
||||
|
||||
-- Dave Beckett <dajobe@debian.org> Sun, 14 Aug 2005 10:14:12 +0100
|
||||
|
||||
byacc (20050505-1) unstable; urgency=low
|
||||
|
||||
* New maintainer (Closes: #321377)
|
||||
* Switch to new upstream and new source (Closes: #240662)
|
||||
* debian/copyright: Update to new upstream and add source information
|
||||
(Closes: #166300)
|
||||
* Acknowledge fix in NMUs (Closes: #283174)
|
||||
* New manual page does not have the formatting problem (Closes: #100947)
|
||||
* Added debian/watch file.
|
||||
|
||||
-- Dave Beckett <dajobe@debian.org> Fri, 5 Aug 2005 22:50:20 +0100
|
||||
|
||||
byacc (1.9.1-1.1) unstable; urgency=low
|
||||
|
||||
* Remove alternative in prerm. Closes: #283174
|
||||
|
||||
-- LaMont Jones <lamont@debian.org> Fri, 26 Nov 2004 18:49:09 -0700
|
||||
|
||||
byacc (1.9.1-1) unstable; urgency=low
|
||||
|
||||
* Maintainer upload.
|
||||
* Fixed alternatives entry, closes: Bug#146195;
|
||||
* Changed priority to "extra" at behest of Daniel Bungert,
|
||||
closes: Bug#142271.
|
||||
* Fixed awful packaging error which meant the test/ directory was excluded
|
||||
from the orig.tar.gz.
|
||||
|
||||
-- Jason Henry Parker <henry@debian.org> Fri, 27 Sep 2002 16:25:27 -0400
|
||||
|
||||
byacc (1.9-13.1) unstable; urgency=low
|
||||
|
||||
* Non-maintainer upload
|
||||
* Removed erraneous escapes in manpage - some data wasn't visable,
|
||||
closes: Bug#100947
|
||||
* Alternatives entry added, closes: Bug#113168
|
||||
* Standards-version: 3.5.6
|
||||
* Maintainer script cleaning
|
||||
|
||||
-- Daniel Bungert <drb@debian.org> Fri, 29 Mar 2002 16:58:30 -0500
|
||||
|
||||
byacc (1.9-13) unstable; urgency=low
|
||||
|
||||
* Applied patch from "Randolph Chung" <tausq@debian.org> to fix build problems
|
||||
on ia64, closes: Bug#91966
|
||||
|
||||
-- Jason Henry Parker <henry@debian.org> Thu, 29 Mar 2001 21:41:19 +1000
|
||||
|
||||
byacc (1.9-12) unstable; urgency=low
|
||||
|
||||
* Updated to latest version of debhelper, and Standards-Version: 3.2.1.0, closes: Bug#81444
|
||||
* Added Build-Depends: debhelper, closes: Bug#70207
|
||||
* Removed mktemp() calls in main.c
|
||||
|
||||
-- Jason Henry Parker <henry@debian.org> Mon, 18 Dec 2000 08:02:54 +1000
|
||||
|
||||
byacc (1.9-11.7) unstable; urgency=low
|
||||
|
||||
* New maintainer.
|
||||
* Updated to dh_make and standards version 2.4.0.0, no lintian errors
|
||||
or warnings.
|
||||
* Added several more files from the upstream distribution to
|
||||
/usr/doc/byacc.
|
||||
|
||||
-- Jason Henry Parker <henry@debian.org> Sat, 2 Jan 1999 03:04:17 +1000
|
||||
|
||||
byacc (1.9-11.6) unstable; urgency=low
|
||||
|
||||
* Patch by <mdorman@law.miami.edu> to remove some
|
||||
superfluous files that can interfere with the build process on other
|
||||
architectures. (Bug #21607).
|
||||
|
||||
-- Vincent Renardias <vincent@waw.com> Fri, 24 Apr 1998 19:56:58 +0200
|
||||
|
||||
byacc (1.9-11.5) unstable; urgency=low
|
||||
|
||||
* Added 'binary-arch' target in debian/rules (Bug #12742).
|
||||
|
||||
-- Vincent Renardias <vincent@waw.com> Sun, 9 Nov 1997 23:37:31 +0100
|
||||
|
||||
byacc (1.9-11.4) unstable; urgency=low
|
||||
|
||||
* Cosmetic change (Fix bug #9623).
|
||||
|
||||
-- Vincent Renardias <vincent@waw.com> Fri, 9 May 1997 16:30:24 +0200
|
||||
|
||||
byacc (1.9-11.3) unstable; urgency=low
|
||||
|
||||
* Rebuilt with libc6.
|
||||
|
||||
-- Debian QA Group <debian-qa@lists.debian.org> Thu, 1 May 1997 22:02:04 +0200
|
||||
|
||||
byacc (1.9-11.2) unstable; urgency=low
|
||||
|
||||
* Orphaned the package at his maintainer's request (dgregor@coil.com).
|
||||
|
||||
-- Debian QA Group <debian-qa@lists.debian.org> Sun, 20 Apr 1997 20:03:03 +0200
|
||||
|
||||
byacc (1.9-11.1) unstable; urgency=low
|
||||
|
||||
* Converted to new source format (Fixes #8085).
|
||||
* Compressed manpage.
|
||||
* Fixed to allow compilation on non-i386 (Fixes #3361).
|
||||
* Added extended description (Fixes #3567).
|
||||
* Added diversion to avoid conflict with bison (Fixes #8086).
|
||||
|
||||
-- Vincent Renardias <vincent@waw.com> Sun, 20 Apr 1997 15:59:28 +0200
|
@ -1,28 +0,0 @@
|
||||
Source: byacc
|
||||
Maintainer: Thomas E. Dickey <dickey@invisible-island.net>
|
||||
Uploaders: Thomas E. Dickey <dickey@his.com>
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Standards-Version: 4.6.0.1
|
||||
Build-Depends: debhelper-compat (= 12),
|
||||
Rules-Requires-Root: no
|
||||
Homepage: https://invisible-island.net/byacc/
|
||||
Vcs-Browser: https://salsa.debian.org/debian/byacc
|
||||
Vcs-Git: https://salsa.debian.org/debian/byacc.git
|
||||
|
||||
Package: byacc2
|
||||
Provides: yacc
|
||||
Architecture: any
|
||||
Multi-Arch: foreign
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: public domain Berkeley LALR Yacc parser generator
|
||||
This package provides a parser generator utility that reads a grammar
|
||||
specification from a file and generates an LR(1) parser for it. The
|
||||
parsers consist of a set of LALR(1) parsing tables and a driver
|
||||
routine written in the C programming language. It has a public domain
|
||||
license which includes the generated C.
|
||||
.
|
||||
This package has the backtracking extension, adapted from btyacc.
|
||||
The package is renamed to allow installing at the same time as "byacc".
|
||||
.
|
||||
Related packages: bison, btyacc, byacc, antlr
|
@ -1,129 +0,0 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: byacc
|
||||
Upstream-Contact: <dickey@invisible-island.net> (Thomas E. Dickey)
|
||||
Source: https://invisible-island.net/byacc/
|
||||
|
||||
Files: *
|
||||
Copyright: 2001-2022,2023 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.
|
||||
A few files (currently those related to autoconf scripting) have other
|
||||
licenses as noted here.
|
||||
.
|
||||
Current byacc upstream maintainer: Thomas Dickey <dickey@invisible-island.net>
|
||||
.
|
||||
Public domain notice and no warranty:
|
||||
-------------------------------------------------------------------------------
|
||||
Berkeley Yacc is an LALR(1) parser generator. Berkeley Yacc has been made
|
||||
as compatible as possible with AT&T Yacc. Berkeley Yacc can accept any input
|
||||
specification that conforms to the AT&T Yacc documentation. Specifications
|
||||
that take advantage of undocumented features of AT&T Yacc will probably be
|
||||
rejected.
|
||||
.
|
||||
Berkeley Yacc is distributed with no warranty whatever. The code
|
||||
is certain to contain errors. Neither the author nor any contributor
|
||||
takes responsibility for any consequences of its use.
|
||||
.
|
||||
Berkeley Yacc is in the public domain. The data structures and algorithms
|
||||
used in Berkeley Yacc are all either taken from documents available to the
|
||||
general public or are inventions of the author. Anyone may freely distribute
|
||||
source or binary forms of Berkeley Yacc whether unchanged or modified.
|
||||
Distributers may charge whatever fees they can obtain for Berkeley Yacc.
|
||||
Programs generated by Berkeley Yacc may be distributed freely.
|
||||
.
|
||||
Please report bugs to
|
||||
.
|
||||
robert.corbett@eng.Sun.COM
|
||||
.
|
||||
Include a small example if possible. Please include the banner string from
|
||||
skeleton.c with the bug report. Do not expect rapid responses.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Files: aclocal.m4
|
||||
Copyright: 2004-2022,2023 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
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, distribute with modifications, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or portions of the Software.
|
||||
.
|
||||
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 ABOVE COPYRIGHT HOLDERS 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.
|
||||
|
||||
Files: install-sh
|
||||
Copyright: 1994 X Consortium
|
||||
License: other-BSD
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
.
|
||||
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.
|
||||
.
|
||||
FSF changes to this file are in the public domain.
|
||||
.
|
||||
Calling this script install-sh is preferred over install.sh, to prevent
|
||||
`make' implicit rules from creating a file called install from it
|
||||
when there is no Makefile.
|
||||
.
|
||||
This script is compatible with the BSD install script, but was written
|
||||
from scratch. It can only install one file at a time, a restriction
|
||||
shared with many OS's install programs.
|
||||
|
||||
Files: package/debian/*
|
||||
Copyright: 2012-2022,2023 Thomas E. Dickey
|
||||
License: other-BSD
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the name of the above listed
|
||||
copyright holder(s) not be used in advertising or publicity pertaining
|
||||
to distribution of the software without specific, written prior
|
||||
permission.
|
||||
.
|
||||
THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
|
||||
TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
|
||||
LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
Files: config.guess config.sub
|
||||
Copyright: 1992-2021 Free Software Foundation, Inc.
|
||||
License: GPL-3
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License can be found in '/usr/share/common-licenses/GPL-3'
|
@ -1,29 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS := hardening=+all qa=+bug reproducible=+all
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
# dh_autoreconf interferes with portability -- skip it
|
||||
override_dh_autoreconf:
|
||||
echo "skip: dh_autoreconf autoreconf-dickey -- -f -i"
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
--enable-warnings \
|
||||
--verbose \
|
||||
--enable-stdnoreturn \
|
||||
--enable-btyacc \
|
||||
--with-max-table-size=123456 \
|
||||
--program-transform-name='s,^yacc,byacc2,'
|
||||
|
||||
# workaround for whatis
|
||||
sed -i '/- an LALR/s,^..N,byacc2,' yacc.1
|
||||
|
||||
# omit tests which rely upon getopt error-messages
|
||||
sed -i.bak '/MYFILE=nosuchfile/,/# Test special cases/d' test/run_test.sh
|
||||
diff -u test/run_test.sh.bak test/run_test.sh || echo OK
|
@ -1 +0,0 @@
|
||||
3.0 (native)
|
@ -1,20 +0,0 @@
|
||||
version=4
|
||||
|
||||
# upstream provides tarballs such as "byacc-20220101.tgz" (originally to
|
||||
# keep the filenames compatible with systems where multiple "." are illegal).
|
||||
#
|
||||
# The version number (2.0) is current since late 2020; before that it was
|
||||
# "1.9" for a long time. Use
|
||||
# byacc -V
|
||||
# to see the version number:
|
||||
# byacc - 2.0 20220101
|
||||
#
|
||||
# The introduction of the back-tracking configuration motivated the change of
|
||||
# major/minor numbers; for compatibility the parser skeleton still says "1.9".
|
||||
#
|
||||
# Patch-dates are always # in yyyymmdd format.
|
||||
|
||||
opts=pgpmode=auto,\
|
||||
dversionmangle=s/^2\.0\.//,\
|
||||
oversionmangle=s/^(.*)/2.0.$1/ \
|
||||
https://invisible-mirror.net/archives/byacc/byacc-(\d+)\.tgz
|
@ -1,68 +0,0 @@
|
||||
Summary: public domain Berkeley LALR Yacc parser generator
|
||||
|
||||
%global AppVersion 2.0
|
||||
%global AppPatched 20230201
|
||||
|
||||
%global UseProgram yacc
|
||||
|
||||
# $Id: mingw-byacc.spec,v 1.47 2023/02/02 00:12:06 tom Exp $
|
||||
Name: byacc
|
||||
Version: %{AppVersion}.%{AppPatched}
|
||||
Release: 1
|
||||
License: Public Domain, MIT
|
||||
URL: https://invisible-island.net/%{name}/
|
||||
Source0: https://invisible-mirror.net/archives/%{name}/%{name}-%{AppPatched}.tgz
|
||||
|
||||
%description
|
||||
This package provides a parser generator utility that reads a grammar
|
||||
specification from a file and generates an LR(1) parser for it. The
|
||||
parsers consist of a set of LALR(1) parsing tables and a driver
|
||||
routine written in the C programming language. It has a public domain
|
||||
license which includes the generated C.
|
||||
|
||||
%prep
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
%setup -q -n %{name}-%{AppPatched}
|
||||
|
||||
%build
|
||||
%configure --verbose \
|
||||
--program-prefix=b \
|
||||
--target %{_target_platform} \
|
||||
--prefix=%{_prefix} \
|
||||
--bindir=%{_bindir} \
|
||||
--libdir=%{_libdir} \
|
||||
--mandir=%{_mandir}
|
||||
|
||||
make
|
||||
|
||||
%install
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
( cd $RPM_BUILD_ROOT%{_bindir} && ln -s %{name} %{UseProgram} )
|
||||
|
||||
strip $RPM_BUILD_ROOT%{_bindir}/%{name}
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%doc ACKNOWLEDGEMENTS CHANGES NEW_FEATURES NOTES NO_WARRANTY README
|
||||
%license LICENSE
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/%{UseProgram}
|
||||
%{_mandir}/man1/%{name}.*
|
||||
|
||||
%changelog
|
||||
# each patch should add its ChangeLog entries here
|
||||
|
||||
* Sun Jan 09 2022 Thomas Dickey
|
||||
- rpmlint
|
||||
|
||||
* Sun Jul 09 2017 Thomas Dickey
|
||||
- use predefined "configure"
|
||||
|
||||
* Wed Sep 25 2013 Thomas Dickey
|
||||
- cloned from byacc.spec
|
@ -1,6 +0,0 @@
|
||||
Berkeley Yacc (byacc) is a LALR(1) parser generator. Berkeley Yacc
|
||||
has been made as compatible as possible with AT&T Yacc. Berkeley
|
||||
Yacc can accept any input specification that conforms to the AT&T
|
||||
Yacc documentation.
|
||||
|
||||
Some programs depend on a byacc (instead of bison).
|
@ -1,19 +0,0 @@
|
||||
# $NetBSD: Makefile,v 1.24 2021/08/14 01:04:32 mef Exp $
|
||||
#
|
||||
|
||||
DISTNAME= byacc-20230201
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= https://invisible-mirror.net/archives/byacc/
|
||||
DIST_SUBDIR= byacc-20220101
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
MAINTAINER= fcambus@NetBSD.org
|
||||
HOMEPAGE= https://invisible-island.net/byacc/byacc.html
|
||||
COMMENT= Berkeley Yacc
|
||||
LICENSE= public-domain
|
||||
|
||||
|
||||
GNU_CONFIGURE= YES
|
||||
MAKE_FILE= makefile
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
@ -1,3 +0,0 @@
|
||||
@comment $NetBSD: PLIST,v 1.2 2005/04/13 14:11:54 wiz Exp $
|
||||
bin/yacc
|
||||
man/man1/yacc.1
|
@ -1,6 +0,0 @@
|
||||
$NetBSD: distinfo,v 1.4 2008/07/24 17:13:00 tonnerre Exp $
|
||||
|
||||
SHA1 (byacc-20050813.tgz) = 3258494f3422eb3150944c1823af1c9c2c386062
|
||||
RMD160 (byacc-20050813.tgz) = 3ee159857a79025a83e2b0807577925fe460f816
|
||||
Size (byacc-20050813.tgz) = 138684 bytes
|
||||
SHA1 (patch-aa) = decae78775a5e0f1e1f7aaaa258da53903aa1f7a
|
@ -1,4 +1,4 @@
|
||||
/* $Id: reader.c,v 1.91 2022/01/09 18:04:58 tom Exp $ */
|
||||
/* $Id: reader.c,v 1.104 2023/05/18 21:18:17 tom Exp $ */
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
@ -20,6 +20,11 @@
|
||||
/* this is a hard limit, but seems more than adequate */
|
||||
#define MAXARGS 20
|
||||
|
||||
/* limit the size of optional names for %union */
|
||||
#define NAME_LEN 32
|
||||
|
||||
#define IS_ALNUM(c) (isalnum(c) || (c) == '_')
|
||||
|
||||
#define begin_case(f,n) fprintf(f, "case %d:\n", (int)(n))
|
||||
|
||||
#define end_case(f) \
|
||||
@ -27,6 +32,17 @@
|
||||
fprintf_lineno(f, 1, ""); \
|
||||
fprintf(f, "break;\n")
|
||||
|
||||
#define begin_ainfo(data, offset) do { \
|
||||
data.a_lineno = lineno; \
|
||||
data.a_line = dup_line(); \
|
||||
data.a_cptr = data.a_line + (cptr - line - offset); \
|
||||
} while (0)
|
||||
|
||||
#define end_ainfo(data) do { \
|
||||
FREE(data.a_line); \
|
||||
memset(&data, 0, sizeof(data)); \
|
||||
} while (0)
|
||||
|
||||
static void start_rule(bucket *bp, int s_lineno);
|
||||
#if defined(YYBTYACC)
|
||||
static void copy_initial_action(void);
|
||||
@ -44,8 +60,22 @@ static char **tag_table;
|
||||
|
||||
static char saw_eof;
|
||||
char unionized;
|
||||
char *cptr, *line;
|
||||
static int linesize;
|
||||
|
||||
char *line; /* current input-line */
|
||||
char *cptr; /* position within current input-line */
|
||||
static size_t linesize; /* length of current input-line */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *line_data; /* saved input-line */
|
||||
size_t line_used; /* position within saved input-line */
|
||||
size_t line_size; /* length of saved input-line */
|
||||
fpos_t line_fpos; /* pointer before reading past saved input-line */
|
||||
}
|
||||
SAVE_LINE;
|
||||
|
||||
static SAVE_LINE save_area;
|
||||
static int must_save; /* request > 0, triggered < 0, inactive 0 */
|
||||
|
||||
static bucket *goal;
|
||||
static Value_t prec;
|
||||
@ -264,15 +294,59 @@ line_directive(void)
|
||||
#undef UNLESS
|
||||
}
|
||||
|
||||
static void
|
||||
save_line(void)
|
||||
{
|
||||
/* remember to save the input-line if we call get_line() */
|
||||
if (!must_save)
|
||||
{
|
||||
must_save = 1;
|
||||
save_area.line_used = (size_t)(cptr - line);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
restore_line(void)
|
||||
{
|
||||
/* if we saved the line, restore it */
|
||||
if (must_save < 0)
|
||||
{
|
||||
free(line);
|
||||
line = save_area.line_data;
|
||||
cptr = save_area.line_used + line;
|
||||
linesize = save_area.line_size;
|
||||
if (fsetpos(input_file, &save_area.line_fpos) != 0)
|
||||
on_error();
|
||||
memset(&save_area, 0, sizeof(save_area));
|
||||
}
|
||||
else if (must_save > 0)
|
||||
{
|
||||
cptr = line + save_area.line_used;
|
||||
}
|
||||
must_save = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
get_line(void)
|
||||
{
|
||||
FILE *f = input_file;
|
||||
|
||||
if (must_save > 0)
|
||||
{
|
||||
save_area.line_data = TMALLOC(char, linesize);
|
||||
save_area.line_used = (size_t)(cptr - line);
|
||||
save_area.line_size = linesize;
|
||||
NO_SPACE(save_area.line_data);
|
||||
memcpy(save_area.line_data, line, linesize);
|
||||
if (fgetpos(f, &save_area.line_fpos) != 0)
|
||||
on_error();
|
||||
must_save = -must_save;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
int c;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
if (saw_eof || (c = getc(f)) == EOF)
|
||||
{
|
||||
@ -348,9 +422,8 @@ skip_comment(void)
|
||||
{
|
||||
char *s;
|
||||
struct ainfo a;
|
||||
a.a_lineno = lineno;
|
||||
a.a_line = dup_line();
|
||||
a.a_cptr = a.a_line + (cptr - line);
|
||||
|
||||
begin_ainfo(a, 0);
|
||||
|
||||
s = cptr + 2;
|
||||
for (;;)
|
||||
@ -358,7 +431,7 @@ skip_comment(void)
|
||||
if (*s == '*' && s[1] == '/')
|
||||
{
|
||||
cptr = s + 2;
|
||||
FREE(a.a_line);
|
||||
end_ainfo(a);
|
||||
return;
|
||||
}
|
||||
if (*s == '\n')
|
||||
@ -425,6 +498,7 @@ nextc(void)
|
||||
{
|
||||
switch (ch = next_inline())
|
||||
{
|
||||
case '\0':
|
||||
case '\n':
|
||||
get_line();
|
||||
break;
|
||||
@ -459,6 +533,7 @@ keywords[] = {
|
||||
{ "binary", NONASSOC },
|
||||
{ "code", XCODE },
|
||||
{ "debug", NONPOSIX_DEBUG },
|
||||
{ "define", HACK_DEFINE },
|
||||
#if defined(YYBTYACC)
|
||||
{ "destructor", DESTRUCTOR },
|
||||
#endif
|
||||
@ -475,6 +550,7 @@ keywords[] = {
|
||||
{ "locations", LOCATIONS },
|
||||
#endif
|
||||
{ "nonassoc", NONASSOC },
|
||||
{ "nterm", TYPE },
|
||||
{ "parse-param", PARSE_PARAM },
|
||||
{ "pure-parser", PURE_PARSER },
|
||||
{ "right", RIGHT },
|
||||
@ -597,9 +673,8 @@ copy_string(int quote)
|
||||
{
|
||||
struct mstring *temp = msnew();
|
||||
struct ainfo a;
|
||||
a.a_lineno = lineno;
|
||||
a.a_line = dup_line();
|
||||
a.a_cptr = a.a_line + (cptr - line - 1);
|
||||
|
||||
begin_ainfo(a, 1);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@ -608,7 +683,7 @@ copy_string(int quote)
|
||||
mputc(temp, c);
|
||||
if (c == quote)
|
||||
{
|
||||
FREE(a.a_line);
|
||||
end_ainfo(a);
|
||||
return msdone(temp);
|
||||
}
|
||||
if (c == '\n')
|
||||
@ -649,9 +724,8 @@ copy_comment(void)
|
||||
else if (c == '*')
|
||||
{
|
||||
struct ainfo a;
|
||||
a.a_lineno = lineno;
|
||||
a.a_line = dup_line();
|
||||
a.a_cptr = a.a_line + (cptr - line - 1);
|
||||
|
||||
begin_ainfo(a, 1);
|
||||
|
||||
mputc(temp, c);
|
||||
++cptr;
|
||||
@ -663,7 +737,7 @@ copy_comment(void)
|
||||
{
|
||||
mputc(temp, '/');
|
||||
++cptr;
|
||||
FREE(a.a_line);
|
||||
end_ainfo(a);
|
||||
return msdone(temp);
|
||||
}
|
||||
if (c == '\n')
|
||||
@ -706,6 +780,16 @@ copy_code(void)
|
||||
c = *++cptr;
|
||||
if (c == EOF)
|
||||
unexpected_EOF();
|
||||
if (c == '\0')
|
||||
{
|
||||
get_line();
|
||||
if (line == NULL)
|
||||
{
|
||||
unexpected_EOF();
|
||||
/*NOTREACHED */
|
||||
}
|
||||
c = *cptr;
|
||||
}
|
||||
if (isspace(UCH(c)))
|
||||
continue;
|
||||
|
||||
@ -806,9 +890,8 @@ copy_text(void)
|
||||
FILE *f = text_file;
|
||||
int need_newline = 0;
|
||||
struct ainfo a;
|
||||
a.a_lineno = lineno;
|
||||
a.a_line = dup_line();
|
||||
a.a_cptr = a.a_line + (cptr - line - 2);
|
||||
|
||||
begin_ainfo(a, 2);
|
||||
|
||||
if (*cptr == '\n')
|
||||
{
|
||||
@ -858,7 +941,7 @@ copy_text(void)
|
||||
if (need_newline)
|
||||
putc('\n', f);
|
||||
++cptr;
|
||||
FREE(a.a_line);
|
||||
end_ainfo(a);
|
||||
return;
|
||||
}
|
||||
/* FALLTHRU */
|
||||
@ -873,9 +956,12 @@ copy_text(void)
|
||||
static void
|
||||
puts_both(const char *s)
|
||||
{
|
||||
fputs(s, text_file);
|
||||
if (dflag)
|
||||
fputs(s, union_file);
|
||||
if (s && *s)
|
||||
{
|
||||
fputs(s, text_file);
|
||||
if (dflag)
|
||||
fputs(s, union_file);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -892,9 +978,16 @@ copy_union(void)
|
||||
int c;
|
||||
int depth;
|
||||
struct ainfo a;
|
||||
a.a_lineno = lineno;
|
||||
a.a_line = dup_line();
|
||||
a.a_cptr = a.a_line + (cptr - line - 6);
|
||||
char prefix_buf[NAME_LEN + 1];
|
||||
size_t prefix_len = 0;
|
||||
char filler_buf[NAME_LEN + 1];
|
||||
size_t filler_len = 0;
|
||||
int in_prefix = 1;
|
||||
|
||||
prefix_buf[0] = '\0';
|
||||
filler_buf[0] = '\0';
|
||||
|
||||
begin_ainfo(a, 6);
|
||||
|
||||
if (unionized)
|
||||
over_unionized(cptr - 6);
|
||||
@ -908,12 +1001,51 @@ copy_union(void)
|
||||
puts_both("#define YYSTYPE_IS_DECLARED 1\n");
|
||||
|
||||
fprintf_lineno(text_file, lineno, input_file_name);
|
||||
puts_both("typedef union");
|
||||
|
||||
depth = 0;
|
||||
loop:
|
||||
c = *cptr++;
|
||||
putc_both(c);
|
||||
if (in_prefix)
|
||||
{
|
||||
if (c == L_CURL)
|
||||
{
|
||||
in_prefix = 0;
|
||||
if (prefix_len)
|
||||
{
|
||||
puts_both("union ");
|
||||
puts_both(prefix_buf);
|
||||
puts_both(filler_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
puts_both("typedef union YYSTYPE");
|
||||
puts_both(filler_buf);
|
||||
}
|
||||
}
|
||||
else if (isspace(c))
|
||||
{
|
||||
if (filler_len >= sizeof(filler_buf) - 1)
|
||||
{
|
||||
puts_both(filler_buf);
|
||||
filler_len = 0;
|
||||
}
|
||||
filler_buf[filler_len++] = (char)c;
|
||||
filler_buf[filler_len] = 0;
|
||||
if (c != '\n')
|
||||
goto loop;
|
||||
}
|
||||
else if (IS_IDENT(c))
|
||||
{
|
||||
if (prefix_len < NAME_LEN)
|
||||
{
|
||||
prefix_buf[prefix_len++] = (char)c;
|
||||
prefix_buf[prefix_len] = 0;
|
||||
}
|
||||
goto loop;
|
||||
}
|
||||
}
|
||||
if (c != '\n' || !in_prefix)
|
||||
putc_both(c);
|
||||
switch (c)
|
||||
{
|
||||
case '\n':
|
||||
@ -929,9 +1061,15 @@ copy_union(void)
|
||||
case R_CURL:
|
||||
if (--depth == 0)
|
||||
{
|
||||
puts_both(" YYSTYPE;\n");
|
||||
puts_both(prefix_len ? "; " : " YYSTYPE;\n");
|
||||
if (prefix_len)
|
||||
{
|
||||
puts_both("typedef union ");
|
||||
puts_both(prefix_buf);
|
||||
puts_both(" YYSTYPE;\n");
|
||||
}
|
||||
puts_both("#endif /* !YYSTYPE_IS_DECLARED */\n");
|
||||
FREE(a.a_line);
|
||||
end_ainfo(a);
|
||||
return;
|
||||
}
|
||||
goto loop;
|
||||
@ -1017,9 +1155,9 @@ trim_blanks(char *buffer)
|
||||
static int
|
||||
more_curly(void)
|
||||
{
|
||||
char *save = cptr;
|
||||
int result = 0;
|
||||
int finish = 0;
|
||||
save_line();
|
||||
do
|
||||
{
|
||||
switch (next_inline())
|
||||
@ -1036,7 +1174,7 @@ more_curly(void)
|
||||
++cptr;
|
||||
}
|
||||
while (!finish);
|
||||
cptr = save;
|
||||
restore_line();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1053,6 +1191,24 @@ save_param(int k, char *buffer, int name, int type2)
|
||||
buffer[type2] = '\0';
|
||||
(void)trim_blanks(p->type2);
|
||||
|
||||
if (!IS_ALNUM(buffer[name]))
|
||||
{
|
||||
int n;
|
||||
for (n = name - 1; n >= 0; --n)
|
||||
{
|
||||
if (!isspace(UCH(buffer[n])))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (n > 0)
|
||||
{
|
||||
if (!IS_ALNUM(UCH(buffer[n - 1])))
|
||||
break;
|
||||
--n;
|
||||
}
|
||||
name = n;
|
||||
}
|
||||
p->name = strdup(buffer + name);
|
||||
NO_SPACE(p->name);
|
||||
buffer[name] = '\0';
|
||||
@ -1240,7 +1396,7 @@ copy_param(int k)
|
||||
type2 = i + 1;
|
||||
}
|
||||
|
||||
while (i > 0 && (isalnum(UCH(parms[i])) || UCH(parms[i]) == '_'))
|
||||
while (i > 0 && IS_ALNUM(UCH(parms[i])))
|
||||
i--;
|
||||
|
||||
if (!isspace(UCH(parms[i])) && parms[i] != '*')
|
||||
@ -1280,9 +1436,8 @@ get_literal(void)
|
||||
char *s;
|
||||
bucket *bp;
|
||||
struct ainfo a;
|
||||
a.a_lineno = lineno;
|
||||
a.a_line = dup_line();
|
||||
a.a_cptr = a.a_line + (cptr - line);
|
||||
|
||||
begin_ainfo(a, 0);
|
||||
|
||||
quote = *cptr++;
|
||||
cinc = 0;
|
||||
@ -1375,7 +1530,7 @@ get_literal(void)
|
||||
}
|
||||
cachec(c);
|
||||
}
|
||||
FREE(a.a_line);
|
||||
end_ainfo(a);
|
||||
|
||||
n = cinc;
|
||||
s = TMALLOC(char, n);
|
||||
@ -1742,6 +1897,82 @@ declare_argtypes(bucket *bp)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
scan_blanks(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
do
|
||||
{
|
||||
c = next_inline();
|
||||
if (c == '\n')
|
||||
{
|
||||
++cptr;
|
||||
return 0;
|
||||
}
|
||||
else if (c == ' ' || c == '\t')
|
||||
++cptr;
|
||||
else
|
||||
break;
|
||||
}
|
||||
while (c == ' ' || c == '\t');
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
scan_ident(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
cinc = 0;
|
||||
for (c = *cptr; IS_IDENT(c); c = *++cptr)
|
||||
cachec(c);
|
||||
cachec(NUL);
|
||||
|
||||
return cinc;
|
||||
}
|
||||
|
||||
static void
|
||||
hack_defines(void)
|
||||
{
|
||||
struct ainfo a;
|
||||
|
||||
if (!scan_blanks())
|
||||
return;
|
||||
|
||||
begin_ainfo(a, 0);
|
||||
if (!scan_ident())
|
||||
{
|
||||
end_ainfo(a);
|
||||
}
|
||||
|
||||
if (!strcmp(cache, "api.pure"))
|
||||
{
|
||||
end_ainfo(a);
|
||||
scan_blanks();
|
||||
begin_ainfo(a, 0);
|
||||
scan_ident();
|
||||
|
||||
if (!strcmp(cache, "false"))
|
||||
pure_parser = 0;
|
||||
else if (!strcmp(cache, "true")
|
||||
|| !strcmp(cache, "full")
|
||||
|| *cache == 0)
|
||||
pure_parser = 1;
|
||||
else
|
||||
unexpected_value(&a);
|
||||
end_ainfo(a);
|
||||
}
|
||||
else
|
||||
{
|
||||
unexpected_value(&a);
|
||||
}
|
||||
|
||||
while (next_inline() != '\n')
|
||||
++cptr;
|
||||
}
|
||||
|
||||
static void
|
||||
declare_types(void)
|
||||
{
|
||||
@ -1900,6 +2131,10 @@ read_declarations(void)
|
||||
tflag = 1;
|
||||
break;
|
||||
|
||||
case HACK_DEFINE:
|
||||
hack_defines();
|
||||
break;
|
||||
|
||||
case POSIX_YACC:
|
||||
/* noop for bison compatibility. byacc is already designed to be posix
|
||||
* yacc compatible. */
|
||||
@ -1983,9 +2218,7 @@ copy_args(int *alen)
|
||||
char c, quote = 0;
|
||||
struct ainfo a;
|
||||
|
||||
a.a_lineno = lineno;
|
||||
a.a_line = dup_line();
|
||||
a.a_cptr = a.a_line + (cptr - line - 1);
|
||||
begin_ainfo(a, 1);
|
||||
|
||||
while ((c = *cptr++) != R_PAREN || depth || quote)
|
||||
{
|
||||
@ -2029,7 +2262,7 @@ copy_args(int *alen)
|
||||
}
|
||||
if (alen)
|
||||
*alen = len;
|
||||
FREE(a.a_line);
|
||||
end_ainfo(a);
|
||||
return msdone(s);
|
||||
}
|
||||
|
||||
@ -2681,9 +2914,7 @@ copy_action(void)
|
||||
Value_t *offsets = NULL, maxoffset;
|
||||
bucket **rhs;
|
||||
|
||||
a.a_lineno = lineno;
|
||||
a.a_line = dup_line();
|
||||
a.a_cptr = a.a_line + (cptr - line);
|
||||
begin_ainfo(a, 0);
|
||||
|
||||
if (last_was_action)
|
||||
insert_empty_rule();
|
||||
@ -2877,10 +3108,8 @@ copy_action(void)
|
||||
{
|
||||
if (!locations)
|
||||
{
|
||||
int l_lineno = lineno;
|
||||
char *l_line = dup_line();
|
||||
char *l_cptr = l_line + (cptr - line);
|
||||
syntax_error(l_lineno, l_line, l_cptr);
|
||||
dislocations_warning();
|
||||
locations = 1;
|
||||
}
|
||||
if (cptr[1] == '$')
|
||||
{
|
||||
@ -2949,7 +3178,7 @@ copy_action(void)
|
||||
goto loop;
|
||||
}
|
||||
end_case(f);
|
||||
FREE(a.a_line);
|
||||
end_ainfo(a);
|
||||
if (maxoffset > 0)
|
||||
FREE(offsets);
|
||||
return;
|
||||
@ -2969,7 +3198,7 @@ copy_action(void)
|
||||
if (depth > 0)
|
||||
goto loop;
|
||||
end_case(f);
|
||||
free(a.a_line);
|
||||
end_ainfo(a);
|
||||
if (maxoffset > 0)
|
||||
FREE(offsets);
|
||||
return;
|
||||
@ -3011,7 +3240,7 @@ copy_action(void)
|
||||
}
|
||||
#endif
|
||||
end_case(f);
|
||||
free(a.a_line);
|
||||
end_ainfo(a);
|
||||
if (maxoffset > 0)
|
||||
FREE(offsets);
|
||||
return;
|
||||
@ -3057,9 +3286,7 @@ get_code(struct ainfo *a, const char *loc)
|
||||
else
|
||||
syntax_error(lineno, line, cptr);
|
||||
|
||||
a->a_lineno = lineno;
|
||||
a->a_line = dup_line();
|
||||
a->a_cptr = a->a_line + (cptr - line);
|
||||
begin_ainfo((*a), 0);
|
||||
|
||||
depth = 0;
|
||||
loop:
|
||||
@ -3097,10 +3324,8 @@ get_code(struct ainfo *a, const char *loc)
|
||||
{
|
||||
if (!locations)
|
||||
{
|
||||
int l_lineno = lineno;
|
||||
char *l_line = dup_line();
|
||||
char *l_cptr = l_line + (cptr - line);
|
||||
syntax_error(l_lineno, l_line, l_cptr);
|
||||
dislocations_warning();
|
||||
locations = 1;
|
||||
}
|
||||
msprintf(code_mstr, "%s", loc);
|
||||
cptr += 2;
|
||||
@ -3165,7 +3390,7 @@ copy_initial_action(void)
|
||||
struct ainfo a;
|
||||
|
||||
initial_action = get_code(&a, "yyloc");
|
||||
free(a.a_line);
|
||||
end_ainfo(a);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -3247,7 +3472,7 @@ copy_destructor(void)
|
||||
else
|
||||
break;
|
||||
}
|
||||
free(a.a_line);
|
||||
end_ainfo(a);
|
||||
free(code_text);
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ INTERVAL vreg[26];
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 29 "btyacc_calc1.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
int ival;
|
||||
double dval;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
int ival;
|
||||
double dval;
|
||||
|
@ -152,7 +152,7 @@ typedef struct Decl {
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 36 "btyacc_demo.y"
|
||||
typedef union {
|
||||
typedef union YYSTYPE {
|
||||
Scope *scope;
|
||||
Expr *expr;
|
||||
Expr_List *elist;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union {
|
||||
typedef union YYSTYPE {
|
||||
Scope *scope;
|
||||
Expr *expr;
|
||||
Expr_List *elist;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -148,7 +148,7 @@ extern symbol *mksymbol(type t, class c, name id);
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 50 "btyacc_destroy2.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -148,7 +148,7 @@ extern symbol *mksymbol(type t, class c, name id);
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 53 "btyacc_destroy3.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -150,7 +150,7 @@ INTERVAL vreg[26];
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 31 "calc1.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
int ival;
|
||||
double dval;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
int ival;
|
||||
double dval;
|
||||
|
@ -143,7 +143,7 @@ extern symbol *mksymbol(type t, class c, name id);
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 39 "err_inherit3.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -151,7 +151,7 @@ extern symbol *mksymbol(type t, class c, name id);
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 41 "err_inherit4.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -137,7 +137,7 @@ extern void yyerror(const char *);
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 31 "expr.oxout.y"
|
||||
typedef union {
|
||||
typedef union YYSTYPE {
|
||||
struct yyyOxAttrbs {
|
||||
struct yyyStackItem *yyyOxStackItem;
|
||||
} yyyOxAttrbs;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union {
|
||||
typedef union YYSTYPE {
|
||||
struct yyyOxAttrbs {
|
||||
struct yyyStackItem *yyyOxStackItem;
|
||||
} yyyOxAttrbs;
|
||||
|
@ -145,7 +145,7 @@ extern void YYERROR_DECL();
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 32 "inherit1.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -143,7 +143,7 @@ extern symbol *mksymbol(type t, class c, name id);
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 39 "inherit2.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
class cval;
|
||||
type tval;
|
||||
|
@ -137,12 +137,12 @@ static void YYERROR_DECL();
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 43 "ok_syntax1.y"
|
||||
typedef union
|
||||
union CalcData
|
||||
{
|
||||
char * cval;
|
||||
int ival;
|
||||
double dval;
|
||||
} YYSTYPE;
|
||||
}; typedef union CalcData YYSTYPE;
|
||||
#endif /* !YYSTYPE_IS_DECLARED */
|
||||
#line 148 "ok_syntax1.tab.c"
|
||||
|
||||
|
@ -23,12 +23,12 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
union CalcData
|
||||
{
|
||||
char * cval;
|
||||
int ival;
|
||||
double dval;
|
||||
} YYSTYPE;
|
||||
}; typedef union CalcData YYSTYPE;
|
||||
#endif /* !YYSTYPE_IS_DECLARED */
|
||||
|
||||
#endif /* _ok_syntax1__defines_h_ */
|
||||
|
@ -151,7 +151,7 @@ INTERVAL vreg[26];
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 32 "varsyntax_calc1.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
int ival; /* dreg & vreg array index values*/
|
||||
double dval; /* floating point values*/
|
||||
|
@ -11,7 +11,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
int ival; /* dreg & vreg array index values*/
|
||||
double dval; /* floating point values*/
|
||||
|
90
contrib/byacc/test/expr.oxout.h
Normal file
90
contrib/byacc/test/expr.oxout.h
Normal file
@ -0,0 +1,90 @@
|
||||
/* testing only */
|
||||
|
||||
typedef int yyyWAT;
|
||||
typedef int yyyWST;
|
||||
typedef int yyyFT;
|
||||
|
||||
typedef struct yyyLexemes {
|
||||
char * lexeme;
|
||||
} yyyLexemes;
|
||||
|
||||
typedef struct yyyAttribs {
|
||||
yyyLexemes yyyAttrb1;
|
||||
} yyyAttribs;
|
||||
|
||||
typedef struct yyyParent {
|
||||
struct yyyGNT * noderef;
|
||||
struct yyyStackItem * stackref;
|
||||
} yyyParent;
|
||||
|
||||
typedef struct yyyGNT {
|
||||
int * refCountList;
|
||||
int refCountListLen;
|
||||
struct yyyParent parent;
|
||||
int parentIsStack;
|
||||
int prodNum;
|
||||
int whichSym;
|
||||
struct yyyGNT ** cL;
|
||||
int cLlen;
|
||||
yyyAttribs yyyAttrbs;
|
||||
} yyyGNT;
|
||||
|
||||
typedef int yyyRCT;
|
||||
|
||||
typedef struct yyyStackItem {
|
||||
int wa;
|
||||
int whichSym;
|
||||
yyyGNT * node;
|
||||
long solvedSAlist;
|
||||
} yyySIT;
|
||||
|
||||
#define yyyRSitem yyySIT
|
||||
|
||||
yyyRSitem *yyyRSTop;
|
||||
yyyRSitem *yyyAfterRS;
|
||||
yyyRSitem *yyyRS;
|
||||
|
||||
#undef yyparse
|
||||
#undef yylex
|
||||
#undef yyerror
|
||||
#undef yychar
|
||||
#undef yyval
|
||||
#undef yylval
|
||||
#undef yydebug
|
||||
#undef yynerrs
|
||||
#undef yyerrflag
|
||||
#undef yylhs
|
||||
#undef yylen
|
||||
#undef yydefred
|
||||
#undef yystos
|
||||
#undef yydgoto
|
||||
#undef yysindex
|
||||
#undef yyrindex
|
||||
#undef yygindex
|
||||
#undef yytable
|
||||
#undef yycheck
|
||||
#undef yyname
|
||||
#undef yyrule
|
||||
#undef yycindex
|
||||
#undef yyctable
|
||||
|
||||
struct {
|
||||
int test_yycheck [256];
|
||||
int test_yydefred [256];
|
||||
int test_yydgoto [256];
|
||||
int test_yygindex [256];
|
||||
int test_yylen [256];
|
||||
int test_yylhs [256];
|
||||
int test_yyrindex [256];
|
||||
int test_yysindex [256];
|
||||
int test_yytable [256];
|
||||
#define yycheck test_expr.test_yycheck
|
||||
#define yydefred test_expr.test_yydefred
|
||||
#define yydgoto test_expr.test_yydgoto
|
||||
#define yygindex test_expr.test_yygindex
|
||||
#define yylen test_expr.test_yylen
|
||||
#define yylhs test_expr.test_yylhs
|
||||
#define yyrindex test_expr.test_yyrindex
|
||||
#define yysindex test_expr.test_yysindex
|
||||
#define yytable test_expr.test_yytable
|
||||
} test_expr;
|
@ -40,7 +40,7 @@ static void YYERROR_DECL();
|
||||
%token TAB '\t'
|
||||
%token VT '\v'
|
||||
|
||||
%union
|
||||
%union CalcData
|
||||
{
|
||||
char * cval;
|
||||
int ival;
|
||||
|
@ -130,7 +130,7 @@ INTERVAL vreg[26];
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 31 "calc1.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
int ival;
|
||||
double dval;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
int ival;
|
||||
double dval;
|
||||
|
@ -117,7 +117,7 @@ extern void yyerror(const char *);
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 31 "expr.oxout.y"
|
||||
typedef union {
|
||||
typedef union YYSTYPE {
|
||||
struct yyyOxAttrbs {
|
||||
struct yyyStackItem *yyyOxStackItem;
|
||||
} yyyOxAttrbs;
|
||||
|
@ -6,7 +6,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union {
|
||||
typedef union YYSTYPE {
|
||||
struct yyyOxAttrbs {
|
||||
struct yyyStackItem *yyyOxStackItem;
|
||||
} yyyOxAttrbs;
|
||||
|
@ -117,12 +117,12 @@ static void YYERROR_DECL();
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 43 "ok_syntax1.y"
|
||||
typedef union
|
||||
union CalcData
|
||||
{
|
||||
char * cval;
|
||||
int ival;
|
||||
double dval;
|
||||
} YYSTYPE;
|
||||
}; typedef union CalcData YYSTYPE;
|
||||
#endif /* !YYSTYPE_IS_DECLARED */
|
||||
#line 128 "ok_syntax1.tab.c"
|
||||
|
||||
|
@ -20,10 +20,10 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
union CalcData
|
||||
{
|
||||
char * cval;
|
||||
int ival;
|
||||
double dval;
|
||||
} YYSTYPE;
|
||||
}; typedef union CalcData YYSTYPE;
|
||||
#endif /* !YYSTYPE_IS_DECLARED */
|
||||
|
@ -131,7 +131,7 @@ INTERVAL vreg[26];
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 32 "varsyntax_calc1.y"
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
int ival; /* dreg & vreg array index values*/
|
||||
double dval; /* floating point values*/
|
||||
|
@ -8,7 +8,7 @@
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
typedef union
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
int ival; /* dreg & vreg array index values*/
|
||||
double dval; /* floating point values*/
|
||||
|
@ -1,14 +1,21 @@
|
||||
.\" $Id: yacc.1,v 1.42 2022/11/06 17:07:16 tom Exp $
|
||||
.\" $Id: yacc.1,v 1.43 2024/01/10 00:30:34 tom Exp $
|
||||
.\"
|
||||
.\" .TH YACC 1 "July\ 15,\ 1990"
|
||||
.\" .UC 6
|
||||
.TH YACC 1 2024-01-09 "Berkeley Yacc" "User Commands"
|
||||
.
|
||||
.ds N Yacc
|
||||
.ds n yacc
|
||||
.
|
||||
.ie n .ds CW R
|
||||
.el \{
|
||||
.ie \n(.g .ds CW CR
|
||||
.el .ds CW CW
|
||||
.\}
|
||||
.
|
||||
.de Ex
|
||||
.RS +7
|
||||
.PP
|
||||
.nf
|
||||
.ft CW
|
||||
.ft \*(CW
|
||||
..
|
||||
.de Ee
|
||||
.fi
|
||||
@ -16,20 +23,27 @@
|
||||
.RE
|
||||
..
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds AQ \(aq
|
||||
.el .ds AQ '
|
||||
.ie \n(.g .ds `` \(lq
|
||||
.el .ds `` ``
|
||||
.ie \n(.g .ds '' \(rq
|
||||
.el .ds '' ''
|
||||
.ie \n(.g \{\
|
||||
.ds `` \(lq
|
||||
.ds '' \(rq
|
||||
.ds ' \(aq
|
||||
.\}
|
||||
.el \{\
|
||||
.ie t .ds `` ``
|
||||
.el .ds `` ""
|
||||
.ie t .ds '' ''
|
||||
.el .ds '' ""
|
||||
.ie t .ds ' \(aq
|
||||
.el .ds ' '
|
||||
.\}",
|
||||
.\" Bulleted paragraph
|
||||
.de bP
|
||||
.ie n .IP \(bu 4
|
||||
.el .IP \(bu 2
|
||||
..
|
||||
.TH YACC 1 "November 6, 2022" "Berkeley Yacc" "User Commands"
|
||||
.SH NAME
|
||||
\*N \- an LALR(1) parser generator
|
||||
\*N \-
|
||||
an LALR(1) parser generator
|
||||
.SH SYNOPSIS
|
||||
.B \*n [ \-BdghilLPrtvVy ] [ \-b
|
||||
.I file_prefix
|
||||
@ -208,6 +222,13 @@ However, \fB\*n\fP accepts a single \*(``\-\*('' to read the grammar
|
||||
from the standard input.
|
||||
A double \*(``\-\-\*('' marker denotes the end of options.
|
||||
A single \fIfilename\fP parameter is expected after a \*(``\-\-\*('' marker.
|
||||
.
|
||||
.SH DIAGNOSTICS
|
||||
If there are rules that are never reduced, the number of such rules is
|
||||
reported on standard error.
|
||||
If there are any LALR(1) conflicts, the number of conflicts is reported
|
||||
on standard error.
|
||||
|
||||
.SH EXTENSIONS
|
||||
.B \*N
|
||||
provides some extensions for
|
||||
@ -357,6 +378,7 @@ However,
|
||||
.B \*n
|
||||
does not predefine \*(``$end\*('', \*(``$error\*(''
|
||||
or \*(``$undefined\*('' in this array.
|
||||
.
|
||||
.SH PORTABILITY
|
||||
According to Robert Corbett,
|
||||
.Ex
|
||||
@ -420,8 +442,9 @@ Bison puts the additional parameters \fIfirst\fP for
|
||||
\fByyparse\fP and \fByyerror\fP but \fIlast\fP for destructors.
|
||||
\fBYacc\fP matches this behavior.
|
||||
.
|
||||
.SH DIAGNOSTICS
|
||||
If there are rules that are never reduced, the number of such rules is
|
||||
reported on standard error.
|
||||
If there are any LALR(1) conflicts, the number of conflicts is reported
|
||||
on standard error.
|
||||
.SH SEE ALSO
|
||||
\fBbison\fP(1),
|
||||
\fBbtyacc\fP(1),
|
||||
\fBlex\fP(1),
|
||||
\fBflex\fP(1),
|
||||
\fByacc\fP(1)
|
||||
|
Loading…
Reference in New Issue
Block a user