byacc: Update to 20230201.

Note that this enables the backtracking extension, which we had previously left disabled.

PR:		244149, 269425
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D38421
This commit is contained in:
Dag-Erling Smørgrav 2023-02-20 23:35:32 +01:00
commit 8e022d3cde
216 changed files with 9918 additions and 4283 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,9 @@
MANIFEST for byacc-20200330, version t20200330
MANIFEST for byacc, version t20230201
--------------------------------------------------------------------------------
MANIFEST this file
ACKNOWLEDGEMENTS original version of byacc - 1993
AUTHORS nicknames for some contributors (see CHANGES for details)
LICENSE summary of byacc's license
Makefile.old renamed from Makefile
NEW_FEATURES original version of byacc - 1993
NOTES original version of byacc - 1993
@ -43,13 +44,12 @@ yaccpar.skel data which can be transformed into skeleton.c
package subdirectory
package/byacc.spec RPM file for byacc
package/debian subdirectory
package/debian/byacc2.docs extra docs for byacc2 package
package/debian/byacc2.postinst post-install script for byacc2 package
package/debian/byacc2.prerm pre-removal script for byacc2 package
package/debian/changelog scripts from Debian package
package/debian/compat scripts from Debian package
package/debian/control scripts from Debian package
package/debian/copyright scripts from Debian package
package/debian/docs scripts from Debian package
package/debian/postinst scripts from Debian package
package/debian/prerm scripts from Debian package
package/debian/rules scripts from Debian package
package/debian/source subdirectory
package/debian/source/format scripts from Debian package
@ -105,6 +105,30 @@ test/btyacc/calc3.error reference output for testing
test/btyacc/calc3.output reference output for testing
test/btyacc/calc3.tab.c reference output for testing
test/btyacc/calc3.tab.h reference output for testing
test/btyacc/calc_code_all.error reference output for testing
test/btyacc/calc_code_all.output reference output for testing
test/btyacc/calc_code_all.tab.c reference output for testing
test/btyacc/calc_code_all.tab.h reference output for testing
test/btyacc/calc_code_default.error reference output for testing
test/btyacc/calc_code_default.output reference output for testing
test/btyacc/calc_code_default.tab.c reference output for testing
test/btyacc/calc_code_default.tab.h reference output for testing
test/btyacc/calc_code_imports.error reference output for testing
test/btyacc/calc_code_imports.output reference output for testing
test/btyacc/calc_code_imports.tab.c reference output for testing
test/btyacc/calc_code_imports.tab.h reference output for testing
test/btyacc/calc_code_provides.error reference output for testing
test/btyacc/calc_code_provides.output reference output for testing
test/btyacc/calc_code_provides.tab.c reference output for testing
test/btyacc/calc_code_provides.tab.h reference output for testing
test/btyacc/calc_code_requires.error reference output for testing
test/btyacc/calc_code_requires.output reference output for testing
test/btyacc/calc_code_requires.tab.c reference output for testing
test/btyacc/calc_code_requires.tab.h reference output for testing
test/btyacc/calc_code_top.error reference output for testing
test/btyacc/calc_code_top.output reference output for testing
test/btyacc/calc_code_top.tab.c reference output for testing
test/btyacc/calc_code_top.tab.h reference output for testing
test/btyacc/code_calc.code.c reference output for testing
test/btyacc/code_calc.error reference output for testing
test/btyacc/code_calc.output reference output for testing
@ -115,6 +139,18 @@ test/btyacc/code_error.error reference output for testing
test/btyacc/code_error.output reference output for testing
test/btyacc/code_error.tab.c reference output for testing
test/btyacc/code_error.tab.h reference output for testing
test/btyacc/defines1.calc.c reference output for testing
test/btyacc/defines1.calc.h reference output for testing
test/btyacc/defines1.error reference output for testing
test/btyacc/defines1.output reference output for testing
test/btyacc/defines2.calc.c reference output for testing
test/btyacc/defines2.calc.h reference output for testing
test/btyacc/defines2.error reference output for testing
test/btyacc/defines2.output reference output for testing
test/btyacc/defines3.calc.c reference output for testing
test/btyacc/defines3.calc.h reference output for testing
test/btyacc/defines3.error reference output for testing
test/btyacc/defines3.output reference output for testing
test/btyacc/empty.error reference output for testing
test/btyacc/empty.output reference output for testing
test/btyacc/empty.tab.c reference output for testing
@ -363,6 +399,12 @@ test/btyacc/rename_debug.error reference output for testing
test/btyacc/rename_debug.h reference output for testing
test/btyacc/rename_debug.i reference output for testing
test/btyacc/rename_debug.output reference output for testing
test/btyacc/stdin1.calc.c reference output for testing
test/btyacc/stdin1.error reference output for testing
test/btyacc/stdin1.output reference output for testing
test/btyacc/stdin2.calc.c reference output for testing
test/btyacc/stdin2.error reference output for testing
test/btyacc/stdin2.output reference output for testing
test/btyacc/varsyntax_calc1.error reference output for testing
test/btyacc/varsyntax_calc1.output reference output for testing
test/btyacc/varsyntax_calc1.tab.c reference output for testing
@ -373,11 +415,16 @@ test/btyacc_demo.y testcase for btyacc
test/btyacc_destroy1.y btyacc test-case for %parse-param
test/btyacc_destroy2.y btyacc test-case for %parse-param
test/btyacc_destroy3.y btyacc test-case for %parse-param
test/calc.tab.c c-file for calc.y
test/calc.y example from VMS freeware version of byacc
test/calc1.y advanced example from Steve Johnson's paper.
test/calc2.y test-cases and reference files for %lex-param / %parse-param
test/calc3.y test-cases and reference files for %lex-param / %parse-param
test/calc_code_all.y test-case for "%code" with all recognized keywords
test/calc_code_default.y test-case for "%code" with no keyword
test/calc_code_imports.y test-case for "%code imports"
test/calc_code_provides.y test-case for "%code provides"
test/calc_code_requires.y test-case for "%code requires"
test/calc_code_top.y test-case for "%code top"
test/code_calc.y reference input for testing
test/code_debug.y test-input, for -i, -o, -d options
test/code_error.y reference input for testing
@ -418,6 +465,7 @@ test/err_syntax8.y testcase for used_reserved()
test/err_syntax8a.y testcase for used_reserved()
test/err_syntax9.y testcase for tokenized_start()
test/error.y original version of byacc - 1993
test/expr.oxout.h stub for "run_make.sh"
test/expr.oxout.y test-case for "#line" feature
test/grammar.y grammar from cproto
test/inherit0.y testcase for btyacc
@ -455,6 +503,30 @@ test/yacc/calc3.error reference output for testing
test/yacc/calc3.output reference output for testing
test/yacc/calc3.tab.c reference output for testing
test/yacc/calc3.tab.h reference output for testing
test/yacc/calc_code_all.error reference output for testing
test/yacc/calc_code_all.output reference output for testing
test/yacc/calc_code_all.tab.c reference output for testing
test/yacc/calc_code_all.tab.h reference output for testing
test/yacc/calc_code_default.error reference output for testing
test/yacc/calc_code_default.output reference output for testing
test/yacc/calc_code_default.tab.c reference output for testing
test/yacc/calc_code_default.tab.h reference output for testing
test/yacc/calc_code_imports.error reference output for testing
test/yacc/calc_code_imports.output reference output for testing
test/yacc/calc_code_imports.tab.c reference output for testing
test/yacc/calc_code_imports.tab.h reference output for testing
test/yacc/calc_code_provides.error reference output for testing
test/yacc/calc_code_provides.output reference output for testing
test/yacc/calc_code_provides.tab.c reference output for testing
test/yacc/calc_code_provides.tab.h reference output for testing
test/yacc/calc_code_requires.error reference output for testing
test/yacc/calc_code_requires.output reference output for testing
test/yacc/calc_code_requires.tab.c reference output for testing
test/yacc/calc_code_requires.tab.h reference output for testing
test/yacc/calc_code_top.error reference output for testing
test/yacc/calc_code_top.output reference output for testing
test/yacc/calc_code_top.tab.c reference output for testing
test/yacc/calc_code_top.tab.h reference output for testing
test/yacc/code_calc.code.c reference output for testing
test/yacc/code_calc.error reference output for testing
test/yacc/code_calc.output reference output for testing
@ -465,6 +537,18 @@ test/yacc/code_error.error reference output for testing
test/yacc/code_error.output reference output for testing
test/yacc/code_error.tab.c reference output for testing
test/yacc/code_error.tab.h reference output for testing
test/yacc/defines1.calc.c reference output for testing
test/yacc/defines1.calc.h reference output for testing
test/yacc/defines1.error reference output for testing
test/yacc/defines1.output reference output for testing
test/yacc/defines2.calc.c reference output for testing
test/yacc/defines2.calc.h reference output for testing
test/yacc/defines2.error reference output for testing
test/yacc/defines2.output reference output for testing
test/yacc/defines3.calc.c reference output for testing
test/yacc/defines3.calc.h reference output for testing
test/yacc/defines3.error reference output for testing
test/yacc/defines3.output reference output for testing
test/yacc/empty.error reference output for testing
test/yacc/empty.output reference output for testing
test/yacc/empty.tab.c reference output for testing
@ -681,6 +765,12 @@ test/yacc/rename_debug.error reference output for testing
test/yacc/rename_debug.h reference output for testing
test/yacc/rename_debug.i reference output for testing
test/yacc/rename_debug.output reference output for testing
test/yacc/stdin1.calc.c reference output for testing
test/yacc/stdin1.error reference output for testing
test/yacc/stdin1.output reference output for testing
test/yacc/stdin2.calc.c reference output for testing
test/yacc/stdin2.error reference output for testing
test/yacc/stdin2.output reference output for testing
test/yacc/varsyntax_calc1.error reference output for testing
test/yacc/varsyntax_calc1.output reference output for testing
test/yacc/varsyntax_calc1.tab.c reference output for testing

View File

@ -1 +1 @@
20200330
20230201

View File

@ -1,7 +1,7 @@
dnl $Id: aclocal.m4,v 1.48 2020/03/10 22:53:47 tom Exp $
dnl $Id: aclocal.m4,v 1.59 2023/01/05 22:53:11 tom Exp $
dnl Macros for byacc configure script (Thomas E. Dickey)
dnl ---------------------------------------------------------------------------
dnl Copyright 2004-2019,2020 Thomas E. Dickey
dnl Copyright 2004-2022,2023 Thomas E. Dickey
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the
@ -54,10 +54,11 @@ define([CF_ACVERSION_COMPARE],
[ifelse([$8], , ,[$8])],
[ifelse([$9], , ,[$9])])])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ADD_CFLAGS version: 13 updated: 2017/02/25 18:57:40
dnl CF_ADD_CFLAGS version: 15 updated: 2020/12/31 10:54:15
dnl -------------
dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
dnl The second parameter if given makes this macro verbose.
dnl $1 = flags to add
dnl $2 = if given makes this macro verbose.
dnl
dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS,
dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily
@ -71,19 +72,19 @@ cf_new_extra_cppflags=
for cf_add_cflags in $1
do
case $cf_fix_cppflags in
case "$cf_fix_cppflags" in
(no)
case $cf_add_cflags in
case "$cf_add_cflags" in
(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
case "$cf_add_cflags" in
(-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=yes
if test $cf_fix_cppflags = yes ; then
if test "$cf_fix_cppflags" = yes ; then
CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags)
continue
elif test "${cf_tst_cflags}" = "\"'" ; then
@ -96,7 +97,7 @@ case $cf_fix_cppflags in
(*$cf_add_cflags)
;;
(*)
case $cf_add_cflags in
case "$cf_add_cflags" in
(-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags)
@ -114,7 +115,7 @@ case $cf_fix_cppflags in
(yes)
CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'`
cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[[^"]]*"'\''//'`
test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
@ -140,6 +141,25 @@ fi
AC_SUBST(EXTRA_CPPFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_APPEND_CFLAGS version: 3 updated: 2021/09/05 17:25:40
dnl ----------------
dnl Use CF_ADD_CFLAGS after first checking for potential redefinitions.
dnl $1 = flags to add
dnl $2 = if given makes this macro verbose.
define([CF_APPEND_CFLAGS],
[
for cf_add_cflags in $1
do
case "x$cf_add_cflags" in
(x-[[DU]]*)
CF_REMOVE_CFLAGS($cf_add_cflags,CFLAGS,[$2])
CF_REMOVE_CFLAGS($cf_add_cflags,CPPFLAGS,[$2])
;;
esac
CF_ADD_CFLAGS([$cf_add_cflags],[$2])
done
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_APPEND_TEXT version: 1 updated: 2017/02/25 18:58:55
@ -158,6 +178,12 @@ dnl Allow user to disable a normally-on option.
AC_DEFUN([CF_ARG_DISABLE],
[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31
dnl -------------
dnl Allow user to enable a normally-off option.
AC_DEFUN([CF_ARG_ENABLE],
[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ARG_OPTION version: 5 updated: 2015/05/10 19:52:14
dnl -------------
dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
@ -181,7 +207,46 @@ ifelse([$3],,[ :]dnl
])dnl
])])dnl
dnl ---------------------------------------------------------------------------
dnl CF_CC_ENV_FLAGS version: 9 updated: 2018/07/29 18:03:26
dnl CF_C11_NORETURN version: 3 updated: 2021/03/28 11:36:23
dnl ---------------
AC_DEFUN([CF_C11_NORETURN],
[
AC_MSG_CHECKING(if you want to use C11 _Noreturn feature)
CF_ARG_ENABLE(stdnoreturn,
[ --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics],
[enable_stdnoreturn=yes],
[enable_stdnoreturn=no])
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>
#include <stdnoreturn.h>
static _Noreturn void giveup(void) { exit(0); }
],
[if (feof(stdin)) giveup()],
cf_cv_c11_noreturn=yes,
cf_cv_c11_noreturn=no)
])
else
cf_cv_c11_noreturn=no,
fi
if test "$cf_cv_c11_noreturn" = yes; then
AC_DEFINE(HAVE_STDNORETURN_H, 1,[Define if <stdnoreturn.h> header is available and working])
AC_DEFINE_UNQUOTED(STDC_NORETURN,_Noreturn,[Define if C11 _Noreturn keyword is supported])
HAVE_STDNORETURN_H=1
else
HAVE_STDNORETURN_H=0
fi
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 ---------------
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
@ -196,7 +261,7 @@ dnl outweighs that limitation.
AC_DEFUN([CF_CC_ENV_FLAGS],
[
# This should have been defined by AC_PROG_CC
: ${CC:=cc}
: "${CC:=cc}"
AC_MSG_CHECKING(\$CFLAGS variable)
case "x$CFLAGS" in
@ -245,7 +310,7 @@ case "$CC" in
esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_CHECK_CACHE version: 12 updated: 2012/10/02 20:55:03
dnl CF_CHECK_CACHE version: 13 updated: 2020/12/31 10:54:15
dnl --------------
dnl Check if we're accidentally using a cache from a different machine.
dnl Derive the system name, as a check for reusing the autoconf cache.
@ -259,7 +324,7 @@ dnl Note: we would use $ac_config_sub, but that is one of the places where
dnl autoconf 2.5x broke compatibility with autoconf 2.13
AC_DEFUN([CF_CHECK_CACHE],
[
if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
ifelse([$1],,[AC_CANONICAL_HOST],[$1])
system_name="$host_os"
else
@ -280,7 +345,7 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_CLANG_COMPILER version: 2 updated: 2013/11/19 19:23:35
dnl CF_CLANG_COMPILER version: 8 updated: 2021/01/01 13:31:04
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
@ -299,21 +364,56 @@ ifelse([$2],,CLANG_COMPILER,[$2])=no
if test "$ifelse([$1],,[$1],GCC)" = yes ; then
AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler)
cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -Qunused-arguments"
AC_TRY_COMPILE([],[
#ifdef __clang__
#else
make an error
#endif
],[ifelse([$2],,CLANG_COMPILER,[$2])=yes
cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
],[])
ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2]))
fi
CLANG_VERSION=none
if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then
case "$CC" in
(c[[1-9]][[0-9]]|*/c[[1-9]][[0-9]])
AC_MSG_WARN(replacing broken compiler alias $CC)
CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
CC=clang
;;
esac
AC_MSG_CHECKING(version of $CC)
CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
AC_MSG_RESULT($CLANG_VERSION)
for cf_clang_opt in \
-Qunused-arguments \
-Wno-error=implicit-function-declaration
do
AC_MSG_CHECKING(if option $cf_clang_opt works)
cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $cf_clang_opt"
AC_TRY_LINK([
#include <stdio.h>],[
printf("hello!\\n");],[
cf_clang_optok=yes],[
cf_clang_optok=no])
AC_MSG_RESULT($cf_clang_optok)
CFLAGS="$cf_save_CFLAGS"
if test "$cf_clang_optok" = yes; then
CF_VERBOSE(adding option $cf_clang_opt)
CF_APPEND_TEXT(CFLAGS,$cf_clang_opt)
fi
done
fi
])
dnl ---------------------------------------------------------------------------
dnl CF_CONST_X_STRING version: 4 updated: 2020/03/10 18:53:47
dnl CF_CONST_X_STRING version: 7 updated: 2021/06/07 17:39:17
dnl -----------------
dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most
dnl character-strings.
@ -325,7 +425,7 @@ dnl did not take into account the use of const for telling the compiler that
dnl string literals would be in readonly memory.
dnl
dnl As a workaround, one could (starting with X11R5) define XTSTRINGDEFINES, to
dnl let the compiler decide how to represent Xt's strings which were #define'd.
dnl let the compiler decide how to represent Xt's strings which were #define'd.
dnl That does not solve the problem of using the block of Xt's strings which
dnl are compiled into the library (and is less efficient than one might want).
dnl
@ -343,7 +443,7 @@ AC_TRY_COMPILE(
#include <stdlib.h>
#include <X11/Intrinsic.h>
],
[String foo = malloc(1); (void)foo],[
[String foo = malloc(1); free((void*)foo)],[
AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[
AC_TRY_COMPILE(
@ -361,7 +461,7 @@ AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[
CF_RESTORE_XTRA_FLAGS([CF_CONST_X_STRING])
case $cf_cv_const_x_string in
case "$cf_cv_const_x_string" in
(no)
CF_APPEND_TEXT(CPPFLAGS,-DXTSTRINGDEFINES)
;;
@ -373,9 +473,9 @@ esac
])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_DISABLE_ECHO version: 13 updated: 2015/04/18 08:56:57
dnl CF_DISABLE_ECHO version: 14 updated: 2021/09/04 06:35:04
dnl ---------------
dnl You can always use "make -n" to see the actual options, but it's hard to
dnl You can always use "make -n" to see the actual options, but it is hard to
dnl pick out/analyze warning messages when the compile-line is long.
dnl
dnl Sets:
@ -410,7 +510,7 @@ AC_SUBST(SHOW_CC)
AC_SUBST(ECHO_CC)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_DISABLE_LEAKS version: 7 updated: 2012/10/02 20:55:03
dnl CF_DISABLE_LEAKS version: 9 updated: 2021/04/03 16:41:50
dnl ----------------
dnl Combine no-leak checks with the libraries or tools that are used for the
dnl checks.
@ -423,24 +523,98 @@ AC_REQUIRE([CF_WITH_VALGRIND])
AC_MSG_CHECKING(if you want to perform memory-leak testing)
AC_ARG_ENABLE(leaks,
[ --disable-leaks test: free permanent memory, analyze leaks],
[if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi],
: ${with_no_leaks:=no})
[enable_leaks=$enableval],
[enable_leaks=yes])
dnl with_no_leaks is more readable...
if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
AC_MSG_RESULT($with_no_leaks)
if test "$with_no_leaks" = yes ; then
if test "$enable_leaks" = no ; then
AC_DEFINE(NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.])
AC_DEFINE(YY_NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.])
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GCC_ATTRIBUTES version: 18 updated: 2020/03/10 18:53:47
dnl CF_ENABLE_WARNINGS version: 9 updated: 2021/01/05 19:40:50
dnl ------------------
dnl Configure-option to enable gcc warnings
dnl
dnl $1 = extra options to add, if supported
dnl $2 = option for checking attributes. By default, this is done when
dnl warnings are enabled. For other values:
dnl yes: always do this, e.g., to use in generated library-headers
dnl no: never do this
AC_DEFUN([CF_ENABLE_WARNINGS],[
if test "$GCC" = yes || test "$GXX" = yes
then
CF_FIX_WARNINGS(CFLAGS)
CF_FIX_WARNINGS(CPPFLAGS)
CF_FIX_WARNINGS(LDFLAGS)
AC_MSG_CHECKING(if you want to turn on gcc warnings)
CF_ARG_ENABLE(warnings,
[ --enable-warnings test: turn on gcc compiler warnings],
[enable_warnings=yes],
[enable_warnings=no])
AC_MSG_RESULT($enable_warnings)
if test "$enable_warnings" = "yes"
then
ifelse($2,,[CF_GCC_ATTRIBUTES])
CF_GCC_WARNINGS($1)
fi
ifelse($2,yes,[CF_GCC_ATTRIBUTES])
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_FIX_WARNINGS version: 4 updated: 2021/12/16 18:22:31
dnl ---------------
dnl Warning flags do not belong in CFLAGS, CPPFLAGS, etc. Any of gcc's
dnl "-Werror" flags can interfere with configure-checks. Those go into
dnl EXTRA_CFLAGS.
dnl
dnl $1 = variable name to repair
define([CF_FIX_WARNINGS],[
if test "$GCC" = yes || test "$GXX" = yes
then
case [$]$1 in
(*-Werror=*)
cf_temp_flags=
for cf_temp_scan in [$]$1
do
case "x$cf_temp_scan" in
(x-Werror=format*)
CF_APPEND_TEXT(cf_temp_flags,$cf_temp_scan)
;;
(x-Werror=*)
CF_APPEND_TEXT(EXTRA_CFLAGS,$cf_temp_scan)
;;
(*)
CF_APPEND_TEXT(cf_temp_flags,$cf_temp_scan)
;;
esac
done
if test "x[$]$1" != "x$cf_temp_flags"
then
CF_VERBOSE(repairing $1: [$]$1)
$1="$cf_temp_flags"
CF_VERBOSE(... fixed [$]$1)
CF_VERBOSE(... extra $EXTRA_CFLAGS)
fi
;;
esac
fi
AC_SUBST(EXTRA_CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GCC_ATTRIBUTES version: 24 updated: 2021/03/20 12:00:25
dnl -----------------
dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary
dnl to documentation, unrecognized directives cause older compilers to barf.
AC_DEFUN([CF_GCC_ATTRIBUTES],
[
if test "$GCC" = yes
[AC_REQUIRE([AC_PROG_FGREP])dnl
AC_REQUIRE([CF_C11_NORETURN])dnl
if test "$GCC" = yes || test "$GXX" = yes
then
cat > conftest.i <<EOF
#ifndef GCC_PRINTF
@ -459,8 +633,9 @@ EOF
if test "$GCC" = yes
then
AC_CHECKING([for $CC __attribute__ directives])
cat > conftest.$ac_ext <<EOF
cat > "conftest.$ac_ext" <<EOF
#line __oline__ "${as_me:-configure}"
#include <stdio.h>
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@ -475,8 +650,8 @@ cat > conftest.$ac_ext <<EOF
#define GCC_SCANFLIKE(fmt,var) /*nothing*/
#endif
extern void wow(char *,...) GCC_SCANFLIKE(1,2);
extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
extern void foo(void) GCC_NORETURN;
extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
extern GCC_NORETURN void foo(void);
int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
EOF
cf_printf_attribute=no
@ -487,7 +662,7 @@ EOF
cf_directive="__attribute__(($cf_attribute))"
echo "checking for $CC $cf_directive" 1>&AC_FD_CC
case $cf_attribute in
case "$cf_attribute" in
(printf)
cf_printf_attribute=yes
cat >conftest.h <<EOF
@ -510,7 +685,7 @@ EOF
if AC_TRY_EVAL(ac_compile); then
test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
cat conftest.h >>confdefs.h
case $cf_attribute in
case "$cf_attribute" in
(noreturn)
AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
;;
@ -537,9 +712,9 @@ EOF
fi
done
else
fgrep define conftest.i >>confdefs.h
${FGREP-fgrep} define conftest.i >>confdefs.h
fi
rm -rf conftest*
rm -rf ./conftest*
fi
])dnl
dnl ---------------------------------------------------------------------------
@ -560,7 +735,7 @@ CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GCC_WARNINGS version: 37 updated: 2020/01/05 20:04:12
dnl CF_GCC_WARNINGS version: 41 updated: 2021/01/01 16:53:59
dnl ---------------
dnl Check if the compiler supports useful warning options. There's a few that
dnl we don't use, simply because they're too noisy:
@ -584,7 +759,7 @@ AC_DEFUN([CF_GCC_WARNINGS],
[
AC_REQUIRE([CF_GCC_VERSION])
if test "x$have_x" = xyes; then CF_CONST_X_STRING fi
cat > conftest.$ac_ext <<EOF
cat > "conftest.$ac_ext" <<EOF
#line __oline__ "${as_me:-configure}"
int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
EOF
@ -603,7 +778,7 @@ then
AC_CHECKING([for $CC warning options])
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-Wall"
EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
for cf_opt in \
wd1419 \
wd1683 \
@ -626,7 +801,6 @@ elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
then
AC_CHECKING([for $CC warning options])
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS=
cf_warn_CONST=""
test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
@ -649,16 +823,16 @@ then
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
if AC_TRY_EVAL(ac_compile); then
test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
case $cf_opt in
case "$cf_opt" in
(Winline)
case $GCC_VERSION in
case "$GCC_VERSION" in
([[34]].*)
CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
continue;;
esac
;;
(Wpointer-arith)
case $GCC_VERSION in
case "$GCC_VERSION" in
([[12]].*)
CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
continue;;
@ -670,12 +844,12 @@ then
done
CFLAGS="$cf_save_CFLAGS"
fi
rm -rf conftest*
rm -rf ./conftest*
AC_SUBST(EXTRA_CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GETOPT_HEADER version: 6 updated: 2014/07/22 14:45:54
dnl CF_GETOPT_HEADER version: 8 updated: 2021/06/19 19:16:16
dnl ----------------
dnl Check for getopt's variables which are commonly defined in stdlib.h,
dnl unistd.h or (nonstandard) in getopt.h
@ -688,15 +862,15 @@ for cf_header in stdio.h stdlib.h unistd.h getopt.h
do
AC_TRY_COMPILE([
#include <$cf_header>],
[int x = optind; char *y = optarg],
[int x = optind; char *y = optarg; (void)x; (void)y],
[cf_cv_getopt_header=$cf_header
break])
done
])
if test $cf_cv_getopt_header != none ; then
if test "$cf_cv_getopt_header" != none ; then
AC_DEFINE(HAVE_GETOPT_HEADER,1,[Define to 1 if getopt variables are declared in header])
fi
if test $cf_cv_getopt_header = getopt.h ; then
if test "$cf_cv_getopt_header" = getopt.h ; then
AC_DEFINE(NEED_GETOPT_H,1,[Define to 1 if we must include getopt.h])
fi
])dnl
@ -812,7 +986,7 @@ if test x$cf_cv_gnu_library = xyes; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_INTEL_COMPILER version: 7 updated: 2015/04/12 15:39:00
dnl CF_INTEL_COMPILER version: 8 updated: 2021/01/01 16:53:59
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
@ -830,7 +1004,7 @@ AC_REQUIRE([AC_CANONICAL_HOST])
ifelse([$2],,INTEL_COMPILER,[$2])=no
if test "$ifelse([$1],,[$1],GCC)" = yes ; then
case $host_os in
case "$host_os" in
(linux*|gnu*)
AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler)
cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
@ -850,7 +1024,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147"
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_MAKE_DOCS version: 4 updated: 2015/07/04 21:43:03
dnl CF_MAKE_DOCS version: 5 updated: 2021/01/10 16:05:11
dnl ------------
dnl $1 = name(s) to generate rules for
dnl $2 = suffix of corresponding manpages used as input.
@ -879,7 +1053,7 @@ ${GROFF_NOTE}.$2.ps :
${GROFF_NOTE} [\$](SHELL) -c "tbl [\$]*.$2 | groff -man" >[\$]@
${GROFF_NOTE}
${GROFF_NOTE}.$2.txt :
${GROFF_NOTE} GROFF_NO_SGR=stupid [\$](SHELL) -c "tbl [\$]*.$2 | nroff -Tascii -man | col -bx" >[\$]@
${GROFF_NOTE} GROFF_NO_SGR=stupid [\$](SHELL) -c "tbl [\$]*.$2 | nroff -rHY=0 -Tascii -man | col -bx" >[\$]@
${MAN2HTML_NOTE}.$2.html :
${MAN2HTML_NOTE} ./${MAN2HTML_TEMP} [\$]* $2 man >[\$]@
@ -952,7 +1126,7 @@ AC_SUBST(MAKE_UPPER_TAGS)
AC_SUBST(MAKE_LOWER_TAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_MIXEDCASE_FILENAMES version: 7 updated: 2015/04/12 15:39:00
dnl CF_MIXEDCASE_FILENAMES version: 9 updated: 2021/01/01 16:53:59
dnl ----------------------
dnl Check if the file-system supports mixed-case filenames. If we're able to
dnl create a lowercase name and see it as uppercase, it doesn't support that.
@ -960,8 +1134,8 @@ AC_DEFUN([CF_MIXEDCASE_FILENAMES],
[
AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
if test "$cross_compiling" = yes ; then
case $target_alias in
(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
case "$target_alias" in
(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
cf_cv_mixedcase=no
;;
(*)
@ -982,7 +1156,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: 10 updated: 2017/01/21 11:12:16
dnl CF_MKSTEMP version: 12 updated: 2023/01/05 17:53:11
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).
@ -991,16 +1165,10 @@ AC_CHECK_HEADERS( \
unistd.h \
)
AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[
rm -rf conftest*
rm -rf ./conftest*
AC_TRY_RUN([
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
$ac_includes_default
int main(void)
{
char *tmpl = "conftestXXXXXX";
@ -1048,23 +1216,33 @@ AC_DEFUN([CF_MSG_LOG],[
echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_NO_LEAKS_OPTION version: 6 updated: 2015/04/12 15:39:00
dnl CF_NO_LEAKS_OPTION version: 9 updated: 2021/06/13 19:45:41
dnl ------------------
dnl see CF_WITH_NO_LEAKS
dnl
dnl $1 = option/name
dnl $2 = help-text
dnl $3 = symbol to define if the option is set
dnl $4 = additional actions to take if the option is set
AC_DEFUN([CF_NO_LEAKS_OPTION],[
AC_MSG_CHECKING(if you want to use $1 for testing)
AC_ARG_WITH($1,
[$2],
[AC_DEFINE_UNQUOTED($3,1,"Define to 1 if you want to use $1 for testing.")ifelse([$4],,[
[case "x$withval" in
(x|xno) ;;
(*)
: "${with_cflags:=-g}"
: "${enable_leaks:=no}"
with_$1=yes
AC_DEFINE_UNQUOTED($3,1,"Define to 1 if you want to use $1 for testing.")ifelse([$4],,[
$4
])
: ${with_cflags:=-g}
: ${with_no_leaks:=yes}
with_$1=yes],
;;
esac],
[with_$1=])
AC_MSG_RESULT(${with_$1:-no})
case .$with_cflags in
case ".$with_cflags" in
(.*-g*)
case .$CFLAGS in
(.*-g*)
@ -1077,7 +1255,7 @@ case .$with_cflags in
esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PATH_SYNTAX version: 16 updated: 2015/04/18 08:56:57
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
dnl begins with one of the prefix/exec_prefix variables, and then again if the
@ -1097,16 +1275,16 @@ case ".[$]$1" in
;;
(.[[a-zA-Z]]:[[\\/]]*) # OS/2 EMX
;;
(.\[$]{*prefix}*|.\[$]{*dir}*)
(.\[$]\{*prefix\}*|.\[$]\{*dir\}*)
eval $1="[$]$1"
case ".[$]$1" in
(.NONE/*)
$1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
$1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%`
;;
esac
;;
(.no|.NONE/*)
$1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
$1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%`
;;
(*)
ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)
@ -1266,7 +1444,7 @@ AC_SUBST(GROFF_NOTE)
AC_SUBST(NROFF_NOTE)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PROG_LINT version: 4 updated: 2019/11/20 18:55:37
dnl CF_PROG_LINT version: 5 updated: 2022/08/20 15:44:13
dnl ------------
AC_DEFUN([CF_PROG_LINT],
[
@ -1277,6 +1455,25 @@ case "x$LINT" in
;;
esac
AC_SUBST(LINT_OPTS)
AC_SUBST(LINT_LIBS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_REMOVE_CFLAGS version: 3 updated: 2021/09/05 17:25:40
dnl ----------------
dnl Remove a given option from CFLAGS/CPPFLAGS
dnl $1 = option to remove
dnl $2 = variable to update
dnl $3 = nonempty to allow verbose message
define([CF_REMOVE_CFLAGS],
[
cf_tmp_cflag=`echo "x$1" | sed -e 's/^.//' -e 's/=.*//'`
while true
do
cf_old_cflag=`echo "x[$]$2" | sed -e 's/^.//' -e 's/[[ ]][[ ]]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[[^ ]][[^ ]]*\\)\?%%" -e 's/^[[ ]]*//' -e 's%[[ ]][[ ]]*-D% -D%g' -e 's%[[ ]][[ ]]*-I% -I%g'`
test "[$]$2" != "$cf_old_cflag" || break
ifelse([$3],,,[CF_VERBOSE(removing old option $1 from $2)])
$2="$cf_old_cflag"
done
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50
@ -1296,34 +1493,20 @@ $1=`echo "$2" | \
-e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_TRY_XOPEN_SOURCE version: 2 updated: 2018/06/20 20:23:13
dnl CF_TRY_XOPEN_SOURCE version: 4 updated: 2022/09/10 15:16:16
dnl -------------------
dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we
dnl can define it successfully.
AC_DEFUN([CF_TRY_XOPEN_SOURCE],[
AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
AC_TRY_COMPILE([
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
],[
#ifndef _XOPEN_SOURCE
make an error
#endif],
AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,
[cf_cv_xopen_source=no],
[cf_save="$CPPFLAGS"
CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE)
AC_TRY_COMPILE([
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
],[
#ifdef _XOPEN_SOURCE
make an error
#endif],
[cf_cv_xopen_source=no],
[cf_cv_xopen_source=$cf_XOPEN_SOURCE])
CPPFLAGS="$cf_save"
AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,
[cf_cv_xopen_source=no],
[cf_cv_xopen_source=$cf_XOPEN_SOURCE])
CPPFLAGS="$cf_save"
])
])
@ -1331,7 +1514,7 @@ if test "$cf_cv_xopen_source" != no ; then
CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
CF_ADD_CFLAGS($cf_temp_xopen_source)
CF_APPEND_CFLAGS($cf_temp_xopen_source)
fi
])
dnl ---------------------------------------------------------------------------
@ -1352,12 +1535,17 @@ AC_DEFUN([CF_VERBOSE],
CF_MSG_LOG([$1])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_WITHOUT_X version: 1 updated: 2020/03/03 18:27:24
dnl CF_WITHOUT_X version: 3 updated: 2021/01/13 16:51:52
dnl ------------
dnl Use this to cancel the check for X headers/libraries which would be pulled
dnl in via CF_GCC_WARNINGS.
define([CF_WITHOUT_X],
AC_DEFUN([AC_PATH_XTRA],[])
AC_DEFUN([CF_SAVE_XTRA_FLAGS],[])
AC_DEFUN([CF_RESTORE_XTRA_FLAGS],[])
AC_DEFUN([CF_CONST_X_STRING],[echo "skipping X-const check";])dnl
AC_SUBST(X_CFLAGS)
AC_SUBST(X_LIBS)
[])dnl
dnl ---------------------------------------------------------------------------
dnl CF_WITH_DBMALLOC version: 7 updated: 2010/06/21 17:26:47
@ -1390,7 +1578,7 @@ if test "$with_dmalloc" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_WITH_MAN2HTML version: 8 updated: 2018/06/27 18:44:03
dnl CF_WITH_MAN2HTML version: 12 updated: 2021/01/03 18:30:50
dnl ----------------
dnl Check for man2html and groff. Prefer man2html over groff, but use groff
dnl as a fallback. See
@ -1403,7 +1591,8 @@ dnl We name that "man2html.tmp".
dnl
dnl The shell script can be removed later, e.g., using "make distclean".
AC_DEFUN([CF_WITH_MAN2HTML],[
AC_REQUIRE([CF_PROG_GROFF])
AC_REQUIRE([CF_PROG_GROFF])dnl
AC_REQUIRE([AC_PROG_FGREP])dnl
case "x${with_man2html}" in
(xno)
@ -1476,6 +1665,7 @@ export GROFF_NO_SGR
CF_EOF
NROFF_OPTS=
if test "x$cf_with_groff" = xyes
then
MAN2HTML_NOTE="$GROFF_NOTE"
@ -1484,6 +1674,16 @@ then
$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
CF_EOF
else
# disable hyphenation if this is groff
if test "x$GROFF_PATH" != xno
then
AC_MSG_CHECKING(if nroff is really groff)
cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
test -n "$cf_check_groff" && cf_check_groff=yes
test -n "$cf_check_groff" || cf_check_groff=no
AC_MSG_RESULT($cf_check_groff)
test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
fi
MAN2HTML_NOTE=""
CF_PATH_SYNTAX(cf_man2html)
MAN2HTML_PATH="$cf_man2html"
@ -1498,10 +1698,10 @@ CF_EOF
LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
cf_man2html_1st=`fgrep -n MARKER conftest.out |sed -e 's/^[[^0-9]]*://' -e 's/:.*//'`
cf_man2html_top=`expr $cf_man2html_1st - 2`
cf_man2html_bot=`wc -l conftest.out |sed -e 's/[[^0-9]]//g'`
cf_man2html_bot=`expr $cf_man2html_bot - 2 - $cf_man2html_top`
cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[[^0-9]]*://' -e 's/:.*//'`"
cf_man2html_top=`expr "$cf_man2html_1st" - 2`
cf_man2html_bot="`wc -l conftest.out |sed -e 's/[[^0-9]]//g'`"
cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
AC_MSG_RESULT($cf_man2html_top_bot)
@ -1525,7 +1725,7 @@ CF_EOF
done
LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
cf_man2html_page=`fgrep -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[[^0-9]]*://' -e 's/:.*//'`
cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[[^0-9]]*://' -e 's/:.*//'`"
test -z "$cf_man2html_page" && cf_man2html_page=99999
test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
@ -1534,13 +1734,13 @@ CF_EOF
cat >>$MAN2HTML_TEMP <<CF_EOF
: \${MAN2HTML_PATH=$MAN2HTML_PATH}
MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title="\$ROOT\(\$TYPE\)" -compress -pgsize $cf_man2html_page"
MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
case \${TYPE} in
(ms)
$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
;;
(*)
$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
;;
esac
CF_EOF
@ -1561,30 +1761,7 @@ CF_NO_LEAKS_OPTION(valgrind,
[USE_VALGRIND])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_WITH_WARNINGS version: 5 updated: 2004/07/23 14:40:34
dnl ----------------
dnl Combine the checks for gcc features into a configure-script option
dnl
dnl Parameters:
dnl $1 - see CF_GCC_WARNINGS
AC_DEFUN([CF_WITH_WARNINGS],
[
if ( test "$GCC" = yes || test "$GXX" = yes )
then
AC_MSG_CHECKING(if you want to check for gcc warnings)
AC_ARG_WITH(warnings,
[ --with-warnings test: turn on gcc warnings],
[cf_opt_with_warnings=$withval],
[cf_opt_with_warnings=no])
AC_MSG_RESULT($cf_opt_with_warnings)
if test "$cf_opt_with_warnings" != no ; then
CF_GCC_ATTRIBUTES
CF_GCC_WARNINGS([$1])
fi
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_XOPEN_SOURCE version: 55 updated: 2018/12/31 20:46:17
dnl CF_XOPEN_SOURCE version: 63 updated: 2022/12/29 10:10:26
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,
@ -1603,7 +1780,7 @@ cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
cf_xopen_source=
case $host_os in
case "$host_os" in
(aix[[4-7]]*)
cf_xopen_source="-D_ALL_SOURCE"
;;
@ -1635,7 +1812,7 @@ case $host_os in
cf_xopen_source="-D_SGI_SOURCE"
cf_XOPEN_SOURCE=
;;
(linux*|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)
CF_GNU_SOURCE($cf_XOPEN_SOURCE)
;;
(minix*)
@ -1649,7 +1826,15 @@ case $host_os in
(netbsd*)
cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
;;
(openbsd[[4-9]]*)
(openbsd[[6-9]]*)
# OpenBSD 6.x has broken locale support, both compile-time and runtime.
# see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
# Abusing the conformance level is a workaround.
AC_MSG_WARN(this system does not provide usable locale support)
cf_xopen_source="-D_BSD_SOURCE"
cf_XOPEN_SOURCE=700
;;
(openbsd[[4-5]]*)
# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
cf_xopen_source="-D_BSD_SOURCE"
cf_XOPEN_SOURCE=600
@ -1676,12 +1861,20 @@ case $host_os in
;;
(*)
CF_TRY_XOPEN_SOURCE
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)
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"])
fi
;;
esac
if test -n "$cf_xopen_source" ; then
CF_ADD_CFLAGS($cf_xopen_source,true)
CF_APPEND_CFLAGS($cf_xopen_source,true)
fi
dnl In anything but the default case, we may have system-specific setting
@ -1696,7 +1889,7 @@ make an error
[cf_XOPEN_SOURCE_set=yes],
[cf_XOPEN_SOURCE_set=no])
AC_MSG_RESULT($cf_XOPEN_SOURCE_set)
if test $cf_XOPEN_SOURCE_set = yes
if test "$cf_XOPEN_SOURCE_set" = yes
then
AC_TRY_COMPILE([#include <stdlib.h>],[
#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
@ -1704,7 +1897,7 @@ make an error
#endif],
[cf_XOPEN_SOURCE_set_ok=yes],
[cf_XOPEN_SOURCE_set_ok=no])
if test $cf_XOPEN_SOURCE_set_ok = no
if test "$cf_XOPEN_SOURCE_set_ok" = no
then
AC_MSG_WARN(_XOPEN_SOURCE is lower than requested)
fi
@ -1714,3 +1907,23 @@ make an error
fi
fi # cf_cv_posix_visible
])
dnl ---------------------------------------------------------------------------
dnl CF__XOPEN_SOURCE_BODY version: 1 updated: 2022/09/10 15:17:35
dnl ---------------------
dnl body of test when test-compiling for _XOPEN_SOURCE check
define([CF__XOPEN_SOURCE_BODY],
[
#ifndef _XOPEN_SOURCE
make an error
#endif
])
dnl ---------------------------------------------------------------------------
dnl CF__XOPEN_SOURCE_HEAD version: 1 updated: 2022/09/10 15:17:03
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>
])

View File

@ -2,7 +2,7 @@
* @Id: skel2c,v 1.4 2016/06/07 00:26:09 tom Exp @
*/
/* @Id: btyaccpar.skel,v 1.10 2018/05/25 01:03:46 tom Exp @ */
/* @Id: btyaccpar.skel,v 1.12 2021/06/19 20:46:31 tom Exp @ */
#include "defs.h"
@ -485,7 +485,7 @@ const char *const body_3[] =
"#endif /* YYBTYACC */",
#endif /* defined(YYBTYACC) */
" yym = 0;",
" yyn = 0;",
" /* yyn is set below */",
" yynerrs = 0;",
" yyerrflag = 0;",
" yychar = YYEMPTY;",

View File

@ -1,4 +1,4 @@
/* $Id: btyaccpar.skel,v 1.11 2018/06/10 00:41:06 Tom.Shields Exp $ */
/* $Id: btyaccpar.skel,v 1.13 2021/08/08 19:56:28 tom Exp $ */
#include "defs.h"
@ -410,7 +410,7 @@ YYPARSE_DECL()
yyps->save = 0;
%%endif
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;

View File

@ -1,4 +1,4 @@
/* $Id: closure.c,v 1.11 2014/09/18 00:40:07 tom Exp $ */
/* $Id: closure.c,v 1.14 2022/01/09 16:22:58 tom Exp $ */
#include "defs.h"
@ -6,7 +6,6 @@ Value_t *itemset;
Value_t *itemsetend;
unsigned *ruleset;
static unsigned *first_base;
static unsigned *first_derives;
static unsigned *EFF;
@ -21,7 +20,6 @@ set_EFF(void)
{
unsigned *row;
int symbol;
Value_t *sp;
int rowsize;
int i;
int rule;
@ -32,7 +30,7 @@ set_EFF(void)
row = EFF;
for (i = start_symbol; i < nsyms; i++)
{
sp = derives[i];
Value_t *sp = derives[i];
for (rule = *sp; rule > 0; rule = *++sp)
{
symbol = ritem[rrhs[rule]];
@ -56,9 +54,7 @@ void
set_first_derives(void)
{
unsigned *rrow;
unsigned *vrow;
int j;
unsigned k;
unsigned cword = 0;
Value_t *rp;
@ -69,16 +65,16 @@ set_first_derives(void)
rulesetsize = WORDSIZE(nrules);
varsetsize = WORDSIZE(nvars);
first_base = NEW2(nvars * rulesetsize, unsigned);
first_derives = first_base - ntokens * rulesetsize;
first_derives = NEW2(nvars * rulesetsize, unsigned);
set_EFF();
rrow = first_derives + ntokens * rulesetsize;
rrow = first_derives;
for (i = start_symbol; i < nsyms; i++)
{
vrow = EFF + ((i - ntokens) * varsetsize);
k = BITS_PER_WORD;
unsigned *vrow = EFF + ((i - ntokens) * varsetsize);
unsigned k = BITS_PER_WORD;
for (j = start_symbol; j < nsyms; k++, j++)
{
if (k >= BITS_PER_WORD)
@ -87,7 +83,7 @@ set_first_derives(void)
k = 0;
}
if (cword & (1u << k))
if (cword & (1U << k))
{
rp = derives[j];
while ((rule = *rp++) >= 0)
@ -111,7 +107,6 @@ void
closure(Value_t *nucleus, int n)
{
unsigned ruleno;
unsigned word;
unsigned i;
Value_t *csp;
unsigned *dsp;
@ -120,7 +115,6 @@ closure(Value_t *nucleus, int n)
Value_t *csend;
unsigned *rsend;
int symbol;
Value_t itemno;
rulesetsize = WORDSIZE(nrules);
@ -131,10 +125,11 @@ closure(Value_t *nucleus, int n)
csend = nucleus + n;
for (csp = nucleus; csp < csend; ++csp)
{
symbol = ritem[*csp];
int symbol = ritem[*csp];
if (ISVAR(symbol))
{
dsp = first_derives + symbol * rulesetsize;
dsp = first_derives + (symbol - ntokens) * rulesetsize;
rsp = ruleset;
while (rsp < rsend)
*rsp++ |= *dsp++;
@ -146,12 +141,13 @@ closure(Value_t *nucleus, int n)
csp = nucleus;
for (rsp = ruleset; rsp < rsend; ++rsp)
{
word = *rsp;
unsigned word = *rsp;
if (word)
{
for (i = 0; i < BITS_PER_WORD; ++i)
{
if (word & (1u << i))
if (word & (1U << i))
{
itemno = rrhs[ruleno + i];
while (csp < csend && *csp < itemno)
@ -178,7 +174,7 @@ finalize_closure(void)
{
FREE(itemset);
FREE(ruleset);
FREE(first_base);
FREE(first_derives);
}
#ifdef DEBUG
@ -238,7 +234,7 @@ print_first_derives(void)
for (i = start_symbol; i < nsyms; i++)
{
printf("\n%s derives\n", symbol_name[i]);
rp = first_derives + i * WORDSIZE(nrules);
rp = first_derives + (i - ntokens) * WORDSIZE(nrules);
k = BITS_PER_WORD;
for (j = 0; j <= nrules; k++, j++)
{

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -51,6 +51,9 @@
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if <stdnoreturn.h> header is available and working */
#undef HAVE_STDNORETURN_H
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@ -84,6 +87,9 @@
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if C11 _Noreturn keyword is supported */
#undef STDC_NORETURN
/* Define to the system name. */
#undef SYSTEM_NAME

3670
contrib/byacc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
dnl Process this file with 'autoconf' to produce a 'configure' script
dnl $Id: configure.in,v 1.23 2020/03/10 22:53:47 tom Exp $
AC_PREREQ(2.52.20200111)
AC_REVISION($Revision: 1.23 $)
dnl $Id: configure.in,v 1.28 2023/02/02 00:14:51 tom Exp $
AC_PREREQ(2.52.20200802)
AC_REVISION($Revision: 1.28 $)
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config_h.in)
@ -18,6 +18,8 @@ CF_PROG_LINT
CF_WITHOUT_X
CF_XOPEN_SOURCE
AC_CHECK_DECL(exit)
AC_CHECK_HEADERS(fcntl.h)
CF_MKSTEMP
CF_GETOPT_HEADER
@ -41,19 +43,21 @@ else
fi
AC_MSG_CHECKING(if backtracking extension is wanted)
AC_ARG_ENABLE([btyacc],
[AC_HELP_STRING([--enable-btyacc],
[turn on support for the btyacc backtracking extension (default: no)])])
CF_ARG_DISABLE([btyacc],
[AC_HELP_STRING([--disable-btyacc],
[disable support for the btyacc backtracking extension (default: enabled)])],
[enable_btyacc=no],
[enable_btyacc=yes])
AC_MSG_RESULT($enable_btyacc)
if test "$enable_btyacc" = "yes"; then
if test "$enable_btyacc" = "no"; then
SKELETON=yaccpar
else
AC_DEFINE(YYBTYACC,1,[Define to 1 to enable backtracking extension])
SKELETON=btyaccpar
else
SKELETON=yaccpar
fi
AC_SUBST(SKELETON)
CF_WITH_WARNINGS(Wwrite-strings)
CF_ENABLE_WARNINGS(Wwrite-strings,yes)
CF_DISABLE_ECHO
CF_DISABLE_LEAKS
CF_WITH_MAN2HTML

View File

@ -1,4 +1,4 @@
/* $Id: defs.h,v 1.65 2019/11/19 23:47:49 tom Exp $ */
/* $Id: defs.h,v 1.71 2022/11/06 21:44:54 tom Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@ -16,8 +16,8 @@
#define class myClass
#endif
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define CONCAT(first,second) first #second
#define CONCAT1(string,number) CONCAT(string, number)
@ -48,7 +48,7 @@
#define MAXCHAR UCHAR_MAX
#ifndef MAXTABLE
#define MAXTABLE 32500
#define MAXTABLE INT_MAX
#endif
#if MAXTABLE <= SHRT_MAX
#define YYINT short
@ -58,6 +58,10 @@
#define YYINT int
#define MAXYYINT INT_MAX
#define MINYYINT INT_MIN
#elif MAXTABLE <= LONG_MAX
#define YYINT long
#define MAXYYINT LONG_MAX
#define MINYYINT LONG_MIN
#else
#error "MAXTABLE is too large for this machine architecture!"
#endif
@ -113,21 +117,25 @@ typedef enum
,START
,UNION
,IDENT
/* trivial bison "extensions" which have POSIX equivalents */
,NONPOSIX_DEBUG
/* other bison "extensions", some useful */
,ERROR_VERBOSE
,EXPECT
,EXPECT_RR
,PURE_PARSER
,PARSE_PARAM
,LEX_PARAM
,PARSE_PARAM
,POSIX_YACC
,PURE_PARSER
,TOKEN_TABLE
,ERROR_VERBOSE
,XXXDEBUG
,XCODE
#if defined(YYBTYACC)
,LOCATIONS
,DESTRUCTOR
,INITIAL_ACTION
,LOCATIONS
#endif
}
KEY_CASES;
@ -350,6 +358,10 @@ extern int ntags;
extern char unionized;
extern char line_format[];
#define fprintf_lineno(f, n, s) \
if (!lflag) \
fprintf(f, line_format, (n), (s) ? (s) : "(null)")
extern Value_t start_symbol;
extern char **symbol_name;
extern char **symbol_pname;
@ -375,7 +387,7 @@ extern char *nullable;
extern bucket *first_symbol;
extern bucket *last_symbol;
extern int nstates;
extern Value_t nstates;
extern core *first_state;
extern shifts *first_shift;
extern reductions *first_reduction;
@ -412,24 +424,20 @@ extern param *parse_param;
/* global functions */
#ifdef HAVE_STDNORETURN_H
#undef GCC_NORETURN
#include <stdnoreturn.h>
#define GCC_NORETURN _Noreturn
#endif
#ifndef GCC_NORETURN
#if defined(__dead2)
#define GCC_NORETURN __dead2
#elif defined(__dead)
#define GCC_NORETURN __dead
#if defined(_MSC_VER)
#define GCC_NORETURN __declspec(noreturn)
#else
#define GCC_NORETURN /* nothing */
#endif
#endif
#ifdef __GNUC__
#define ATTRIBUTE_NORETURN __attribute__((noreturn))
#elif defined(_MSC_VER)
#define ATTRIBUTE_NORETURN __declspec(noreturn)
#else
#define ATTRIBUTE_NORETURN
#endif
#if defined(NDEBUG) && defined(_MSC_VER)
#define NODEFAULT __assume(0);
#else
@ -464,76 +472,49 @@ struct ainfo
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);
ATTRIBUTE_NORETURN
extern void at_error(int a_lineno, char *a_line, char *a_cptr) GCC_NORETURN;
extern GCC_NORETURN void at_error(int a_lineno, char *a_line, char *a_cptr);
extern void at_warning(int a_lineno, int i);
ATTRIBUTE_NORETURN
extern void bad_formals(void) GCC_NORETURN;
extern GCC_NORETURN void bad_formals(void);
extern void default_action_warning(char *s);
extern void destructor_redeclared_warning(const struct ainfo *);
ATTRIBUTE_NORETURN
extern void dollar_error(int a_lineno, char *a_line, char *a_cptr) GCC_NORETURN;
extern GCC_NORETURN void dollar_error(int a_lineno, char *a_line, char *a_cptr);
extern void dollar_warning(int a_lineno, int i);
ATTRIBUTE_NORETURN
extern void fatal(const char *msg) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void illegal_character(char *c_cptr) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void illegal_tag(int t_lineno, char *t_line, char *t_cptr) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void missing_brace(void) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void no_grammar(void) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void no_space(void) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void open_error(const char *filename) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void over_unionized(char *u_cptr) GCC_NORETURN;
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 missing_brace(void);
extern GCC_NORETURN void no_grammar(void);
extern GCC_NORETURN void no_space(void);
extern GCC_NORETURN void open_error(const char *filename);
extern GCC_NORETURN void over_unionized(char *u_cptr);
extern void prec_redeclared(void);
extern void reprec_warning(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);
ATTRIBUTE_NORETURN
extern void syntax_error(int st_lineno, char *st_line, char *st_cptr) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void terminal_lhs(int s_lineno) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void terminal_start(char *s) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void tokenized_start(char *s) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void undefined_goal(char *s) GCC_NORETURN;
extern GCC_NORETURN void syntax_error(int st_lineno, char *st_line, 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);
ATTRIBUTE_NORETURN
extern void unexpected_EOF(void) GCC_NORETURN;
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,
const char *d_cptr);
ATTRIBUTE_NORETURN
extern void unknown_rhs(int i) GCC_NORETURN;
extern GCC_NORETURN void unknown_rhs(int i);
extern void unsupported_flag_warning(const char *flag, const char *details);
ATTRIBUTE_NORETURN
extern void unterminated_action(const struct ainfo *) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void unterminated_comment(const struct ainfo *) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void unterminated_string(const struct ainfo *) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void unterminated_text(const struct ainfo *) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void unterminated_union(const struct ainfo *) GCC_NORETURN;
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 *);
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);
ATTRIBUTE_NORETURN
extern void untyped_lhs(void) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void untyped_rhs(int i, char *s) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void used_reserved(char *s) GCC_NORETURN;
ATTRIBUTE_NORETURN
extern void unterminated_arglist(const struct ainfo *) GCC_NORETURN;
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 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);
@ -552,8 +533,7 @@ extern void show_shifts(void);
/* main.c */
extern void *allocate(size_t n);
ATTRIBUTE_NORETURN
extern void done(int k) GCC_NORETURN;
extern GCC_NORETURN void done(int k);
/* mkpar.c */
extern void free_parser(void);

View File

@ -1,4 +1,4 @@
/* $Id: graph.c,v 1.8 2014/02/19 00:46:57 Tom.Shields Exp $ */
/* $Id: graph.c,v 1.9 2020/09/10 17:22:51 tom Exp $ */
#include "defs.h"
@ -52,15 +52,16 @@ static void
graph_state(int stateno)
{
Value_t *isp;
int rule;
Value_t *sp;
Value_t *sp1;
larno = (unsigned)lookaheads[stateno];
fprintf(graph_file, "\n\tq%d [label=\"%d:\\l", stateno, stateno);
for (isp = itemset; isp < itemsetend; isp++)
{
Value_t *sp1;
int rule;
sp1 = sp = ritem + *isp;
while (*sp >= 0)
@ -90,15 +91,14 @@ graph_state(int stateno)
static void
graph_LA(int ruleno)
{
int i;
unsigned tokensetsize;
unsigned *rowp;
tokensetsize = (unsigned)WORDSIZE(ntokens);
if (ruleno == LAruleno[larno])
{
rowp = LA + larno * tokensetsize;
int i;
unsigned *rowp = LA + larno * tokensetsize;
fprintf(graph_file, " { ");
for (i = ntokens - 1; i >= 0; i--)

View File

@ -1,7 +1,8 @@
#! /bin/sh
#
#!/bin/sh
# install - install a program, script, or datafile
#
scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
@ -34,261 +35,507 @@
# 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
# '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.
# from scratch.
tab=' '
nl='
'
IFS=" $tab$nl"
# set DOITPROG to echo to test this script
# Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
doit=${DOITPROG-}
doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
# put in absolute paths if you don't have them in your path; or use env. vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
posix_mkdir=
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
# Desired mode of installed file.
mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
stripcmd=
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
src=
dst=
dir_arg=
dst_arg=
-d) dir_arg=true
shift
continue;;
copy_on_change=false
is_target_a_directory=possibly
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
Options:
--help display this help and exit.
--version display version info and exit.
-s) stripcmd=$stripprog
shift
continue;;
-c (ignored)
-C install only if different (preserve data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;;
-S) backupsuffix="$2"
shift;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
# The $RANDOM variable is not portable (e.g., dash). Use it
# here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap '
ret=$?
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
oIFS=$IFS
IFS=/
set -f
set fnord $dstdir
shift
set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=${dstdirslash}_inst.$$_
rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View File

@ -1,4 +1,4 @@
/* $Id: lalr.c,v 1.12 2016/06/07 00:28:03 tom Exp $ */
/* $Id: lalr.c,v 1.14 2021/05/20 23:57:23 tom Exp $ */
#include "defs.h"
@ -41,7 +41,7 @@ Value_t *to_state;
static Value_t infinity;
static int maxrhs;
static int ngotos;
static Value_t ngotos;
static unsigned *F;
static Value_t **includes;
static shorts **lookback;
@ -183,7 +183,6 @@ set_goto_map(void)
Value_t *temp_base;
Value_t *temp_map;
Value_t state2;
Value_t state1;
goto_base = NEW2(nvars + 1, Value_t);
temp_base = NEW2(nvars + 1, Value_t);
@ -227,7 +226,8 @@ set_goto_map(void)
for (sp = first_shift; sp; sp = sp->next)
{
state1 = sp->number;
Value_t state1 = sp->number;
for (i = sp->nshifts - 1; i >= 0; i--)
{
state2 = sp->shift[i];
@ -250,16 +250,14 @@ set_goto_map(void)
static Value_t
map_goto(int state, int symbol)
{
int high;
int low;
int middle;
int s;
low = goto_map[symbol];
high = goto_map[symbol + 1];
int low = goto_map[symbol];
int high = goto_map[symbol + 1];
for (;;)
{
int middle;
int s;
assert(low <= high);
middle = (low + high) >> 1;
s = from_state[middle];
@ -284,7 +282,6 @@ initialize_F(void)
Value_t *rp;
Value_t **reads;
int nedges;
int stateno;
int symbol;
int nwords;
@ -298,7 +295,8 @@ initialize_F(void)
rowp = F;
for (i = 0; i < ngotos; i++)
{
stateno = to_state[i];
int stateno = to_state[i];
sp = shift_table[stateno];
if (sp)
@ -358,11 +356,8 @@ build_relations(void)
Value_t *rp;
shifts *sp;
int length;
int nedges;
int done_flag;
Value_t state1;
Value_t stateno;
int symbol1;
int symbol2;
Value_t *shortp;
Value_t *edge;
@ -375,9 +370,9 @@ build_relations(void)
for (i = 0; i < ngotos; i++)
{
nedges = 0;
state1 = from_state[i];
symbol1 = accessing_symbol[to_state[i]];
int nedges = 0;
int symbol1 = accessing_symbol[to_state[i]];
Value_t state1 = from_state[i];
for (rulep = derives[symbol1]; *rulep >= 0; rulep++)
{
@ -475,7 +470,6 @@ transpose(Value_t **R2, int n)
Value_t *nedges;
Value_t *sp;
int i;
int k;
nedges = NEW2(n, Value_t);
@ -494,7 +488,8 @@ transpose(Value_t **R2, int n)
for (i = 0; i < n; i++)
{
k = nedges[i];
int k = nedges[i];
if (k > 0)
{
sp = NEW2(k + 1, Value_t);
@ -646,10 +641,10 @@ traverse(int i)
void
lalr_leaks(void)
{
int i;
if (includes != 0)
{
int i;
for (i = 0; i < ngotos; i++)
{
free(includes[i]);

View File

@ -1,4 +1,4 @@
/* $Id: lr0.c,v 1.19 2016/06/07 00:21:53 tom Exp $ */
/* $Id: lr0.c,v 1.21 2021/05/20 23:57:23 tom Exp $ */
#include "defs.h"
@ -16,7 +16,7 @@ static void save_shifts(void);
static void set_derives(void);
static void set_nullable(void);
int nstates;
Value_t nstates;
core *first_state;
shifts *first_shift;
reductions *first_reduction;
@ -44,7 +44,6 @@ allocate_itemsets(void)
{
Value_t *itemp;
Value_t *item_end;
int symbol;
int i;
int count;
int max;
@ -56,7 +55,8 @@ allocate_itemsets(void)
item_end = ritem + nitems;
for (itemp = ritem; itemp < item_end; itemp++)
{
symbol = *itemp;
int symbol = *itemp;
if (symbol >= 0)
{
count++;
@ -94,7 +94,6 @@ static void
append_states(void)
{
int i;
int j;
Value_t symbol;
#ifdef TRACE
@ -102,8 +101,9 @@ append_states(void)
#endif
for (i = 1; i < nshifts; i++)
{
int j = i;
symbol = shift_symbol[i];
j = i;
while (j > 0 && shift_symbol[j - 1] > symbol)
{
shift_symbol[j] = shift_symbol[j - 1];
@ -161,10 +161,8 @@ get_state(int symbol)
{
int key;
Value_t *isp1;
Value_t *isp2;
Value_t *iend;
core *sp;
int found;
int n;
#ifdef TRACE
@ -180,11 +178,14 @@ get_state(int symbol)
sp = state_set[key];
if (sp)
{
found = 0;
int found = 0;
while (!found)
{
if (sp->nitems == n)
{
Value_t *isp2;
found = 1;
isp1 = kernel_base[symbol];
isp2 = sp->items;
@ -252,7 +253,6 @@ new_itemsets(void)
int shiftcount;
Value_t *isp;
Value_t *ksp;
Value_t symbol;
for (i = 0; i < nsyms; i++)
kernel_end[i] = 0;
@ -261,8 +261,9 @@ new_itemsets(void)
isp = itemset;
while (isp < itemsetend)
{
i = *isp++;
symbol = ritem[i];
int j = *isp++;
Value_t symbol = ritem[j];
if (symbol > 0)
{
ksp = kernel_end[symbol];
@ -272,7 +273,7 @@ new_itemsets(void)
ksp = kernel_base[symbol];
}
*ksp++ = (Value_t)(i + 1);
*ksp++ = (Value_t)(j + 1);
kernel_end[symbol] = ksp;
}
}
@ -435,16 +436,14 @@ save_reductions(void)
{
Value_t *isp;
Value_t *rp1;
Value_t *rp2;
int item;
Value_t count;
reductions *p;
Value_t *rend;
count = 0;
for (isp = itemset; isp < itemsetend; isp++)
{
item = ritem[*isp];
int item = ritem[*isp];
if (item < 0)
{
redset[count++] = (Value_t)-item;
@ -453,6 +452,9 @@ save_reductions(void)
if (count)
{
Value_t *rp2;
Value_t *rend;
p = (reductions *)allocate((sizeof(reductions) +
(unsigned)(count - 1) *
sizeof(Value_t)));

View File

@ -1,4 +1,4 @@
/* $Id: main.c,v 1.69 2019/11/25 23:24:36 Tom.Shields Exp $ */
/* $Id: main.c,v 1.73 2021/08/08 20:39:34 tom Exp $ */
#include <signal.h>
#if !defined(_WIN32) || defined(__MINGW32__)
@ -148,6 +148,8 @@ done(int k)
_exit(EXIT_FAILURE);
#ifdef NO_LEAKS
DO_FREE(input_file_name);
if (rflag)
DO_FREE(code_file_name);
@ -201,40 +203,89 @@ set_signals(void)
#endif
}
#define SIZEOF(v) (sizeof(v) / sizeof((v)[0]))
/*
* Long options are provided only as a compatibility aid for scripters.
*/
/* *INDENT-OFF* */
static const struct {
const char long_opt[16];
const char yacc_arg;
const char yacc_opt;
} long_opts[] = {
{ "defines", 1, 'H' },
{ "file-prefix", 1, 'b' },
{ "graph", 0, 'g' },
{ "help", 0, 'h' },
{ "name-prefix", 1, 'p' },
{ "no-lines", 0, 'l' },
{ "output", 1, 'o' },
{ "version", 0, 'V' }
};
/* *INDENT-ON* */
/*
* Usage-message is designed for 80 columns, with some unknowns. Account for
* those in the maximum width so that the usage message uses no relocatable
* pointers.
*/
#define USAGE_COLS (80 + sizeof(DEFINES_SUFFIX) + sizeof(OUTPUT_SUFFIX))
static void
usage(void)
{
static const char *msg[] =
/* *INDENT-OFF* */
static const char msg[][USAGE_COLS] =
{
""
,"Options:"
," -b file_prefix set filename prefix (default \"y.\")"
," -B create a backtracking parser"
," -d write definitions (" DEFINES_SUFFIX ")"
," -H defines_file write definitions to defines_file"
," -i write interface (y.tab.i)"
," -g write a graphical description"
," -l suppress #line directives"
," -L enable position processing, e.g., \"%locations\""
," -o output_file (default \"" OUTPUT_SUFFIX "\")"
," -p symbol_prefix set symbol prefix (default \"yy\")"
," -P create a reentrant parser, e.g., \"%pure-parser\""
," -r produce separate code and table files (y.code.c)"
," -s suppress #define's for quoted names in %token lines"
," -t add debugging support"
," -v write description (y.output)"
," -V show version information and exit"
{ " -b file_prefix set filename prefix (default \"y.\")" },
{ " -B create a backtracking parser" },
{ " -d write definitions (" DEFINES_SUFFIX ")" },
{ " -h print this help-message" },
{ " -H defines_file write definitions to defines_file" },
{ " -i write interface (y.tab.i)" },
{ " -g write a graphical description" },
{ " -l suppress #line directives" },
{ " -L enable position processing, e.g., \"%locations\"" },
{ " -o output_file (default \"" OUTPUT_SUFFIX "\")" },
{ " -p symbol_prefix set symbol prefix (default \"yy\")" },
{ " -P create a reentrant parser, e.g., \"%pure-parser\"" },
{ " -r produce separate code and table files (y.code.c)" },
{ " -s suppress #define's for quoted names in %token lines" },
{ " -t add debugging support" },
{ " -v write description (y.output)" },
{ " -V show version information and exit" },
};
/* *INDENT-ON* */
unsigned n;
fflush(stdout);
fprintf(stderr, "Usage: %s [options] filename\n", myname);
for (n = 0; n < sizeof(msg) / sizeof(msg[0]); ++n)
fprintf(stderr, "\nOptions:\n");
for (n = 0; n < SIZEOF(msg); ++n)
{
fprintf(stderr, "%s\n", msg[n]);
}
fprintf(stderr, "\nLong options:\n");
for (n = 0; n < SIZEOF(long_opts); ++n)
{
fprintf(stderr, " --%-20s-%c\n",
long_opts[n].long_opt,
long_opts[n].yacc_opt);
}
exit(EXIT_FAILURE);
}
static void
invalid_option(const char *option)
{
fprintf(stderr, "invalid option: %s\n", option);
usage();
}
static void
setflag(int ch)
{
@ -313,17 +364,66 @@ getargs(int argc, char *argv[])
int i;
#ifdef HAVE_GETOPT
int ch;
#endif
/*
* Map bison's long-options into yacc short options.
*/
for (i = 1; i < argc; ++i)
{
char *a = argv[i];
if (!strncmp(a, "--", 2))
{
char *eqls;
size_t lc;
size_t len;
if ((len = strlen(a)) == 2)
break;
if ((eqls = strchr(a, '=')) != NULL)
{
len = (size_t)(eqls - a);
if (len == 0 || eqls[1] == '\0')
invalid_option(a);
}
for (lc = 0; lc < SIZEOF(long_opts); ++lc)
{
if (!strncmp(long_opts[lc].long_opt, a + 2, len - 2))
{
if (eqls != NULL && !long_opts[lc].yacc_arg)
invalid_option(a);
*a++ = '-';
*a++ = long_opts[lc].yacc_opt;
*a = '\0';
if (eqls)
{
while ((*a++ = *++eqls) != '\0') /* empty */ ;
}
break;
}
}
if (!strncmp(a, "--", 2))
invalid_option(a);
}
}
#ifdef HAVE_GETOPT
if (argc > 0)
myname = argv[0];
while ((ch = getopt(argc, argv, "Bb:dgH:ilLo:Pp:rstVvy")) != -1)
while ((ch = getopt(argc, argv, "Bb:dghH:ilLo:Pp:rstVvy")) != -1)
{
switch (ch)
{
case 'b':
file_prefix = optarg;
break;
case 'h':
usage();
break;
case 'H':
dflag = dflag2 = 1;
defines_file_name = optarg;
@ -509,7 +609,7 @@ create_file_names(void)
if (suffix != NULL)
{
len = (size_t) (suffix - output_file_name);
len = (size_t)(suffix - output_file_name);
file_prefix = TMALLOC(char, len + 1);
NO_SPACE(file_prefix);
strncpy(file_prefix, output_file_name, len)[len] = 0;
@ -628,10 +728,8 @@ open_tmpfile(const char *label)
#define MY_FMT "%s/%.*sXXXXXX"
FILE *result;
#if USE_MKSTEMP
int fd;
const char *tmpdir;
char *name;
const char *mark;
if (((tmpdir = getenv("TMPDIR")) == 0 || access(tmpdir, W_OK) != 0) ||
((tmpdir = getenv("TEMP")) == 0 || access(tmpdir, W_OK) != 0))
@ -654,6 +752,9 @@ open_tmpfile(const char *label)
result = 0;
if (name != 0)
{
int fd;
const char *mark;
mode_t save_umask = umask(0177);
if ((mark = strrchr(label, '_')) == 0)

View File

@ -1,4 +1,4 @@
# $Id: makefile.in,v 1.24 2015/07/05 22:12:29 tom Exp $
# $Id: makefile.in,v 1.25 2022/11/06 21:03:11 tom Exp $
#
# UNIX template-makefile for Berkeley Yacc
@ -27,6 +27,7 @@ LIBS = @LIBS@
AWK = @AWK@
CTAGS = @CTAGS@
ETAGS = @ETAGS@
FGREP = @FGREP@
LINT = @LINT@
LINTFLAGS = @LINT_OPTS@
@ -147,13 +148,16 @@ maintainer-clean :: realclean
################################################################################
check: $(THIS)$x
$(SHELL) $(testdir)/run_test.sh $(testdir)
@echo "** making $@"
@FGREP="$(FGREP)" $(SHELL) $(testdir)/run_test.sh $(testdir)
check_make: $(THIS)$x
$(SHELL) $(testdir)/run_make.sh $(testdir)
@echo "** making $@"
@FGREP="$(FGREP)" $(SHELL) $(testdir)/run_make.sh $(testdir)
check_lint:
$(SHELL) $(testdir)/run_lint.sh $(testdir)
@echo "** making $@"
@FGREP="$(FGREP)" $(SHELL) $(testdir)/run_lint.sh $(testdir)
################################################################################
tags: $(H_FILES) $(C_FILES)
$(CTAGS) $(C_FILES) $(H_FILES)

View File

@ -1,4 +1,4 @@
/* $Id: mkpar.c,v 1.16 2019/11/04 01:23:02 tom Exp $ */
/* $Id: mkpar.c,v 1.18 2021/05/20 23:57:23 tom Exp $ */
#include "defs.h"
@ -76,18 +76,19 @@ get_shifts(int stateno)
action *actions, *temp;
shifts *sp;
Value_t *to_state2;
Value_t i, k;
Value_t symbol;
actions = 0;
sp = shift_table[stateno];
if (sp)
{
Value_t i;
to_state2 = sp->shift;
for (i = (Value_t)(sp->nshifts - 1); i >= 0; i--)
{
k = to_state2[i];
symbol = accessing_symbol[k];
Value_t k = to_state2[i];
Value_t symbol = accessing_symbol[k];
if (ISTOKEN(symbol))
{
temp = NEW(action);
@ -108,16 +109,16 @@ static action *
add_reductions(int stateno, action *actions)
{
int i, j, m, n;
int ruleno, tokensetsize;
unsigned *rowp;
int tokensetsize;
tokensetsize = WORDSIZE(ntokens);
m = lookaheads[stateno];
n = lookaheads[stateno + 1];
for (i = m; i < n; i++)
{
ruleno = LAruleno[i];
rowp = LA + i * tokensetsize;
int ruleno = LAruleno[i];
unsigned *rowp = LA + i * tokensetsize;
for (j = ntokens - 1; j >= 0; j--)
{
if (BIT(rowp, j))
@ -170,14 +171,15 @@ add_reduce(action *actions,
static void
find_final_state(void)
{
int goal, i;
Value_t *to_state2;
shifts *p;
if ((p = shift_table[0]) != 0)
{
int i;
int goal = ritem[1];
to_state2 = p->shift;
goal = ritem[1];
for (i = p->nshifts - 1; i >= 0; --i)
{
final_state = to_state2[i];
@ -218,7 +220,7 @@ unused_rules(void)
if (nunused == 1)
fprintf(stderr, "%s: 1 rule never reduced\n", myname);
else
fprintf(stderr, "%s: %d rules never reduced\n", myname, nunused);
fprintf(stderr, "%s: %ld rules never reduced\n", myname, (long)nunused);
}
}
@ -226,7 +228,6 @@ static void
remove_conflicts(void)
{
int i;
int symbol;
action *p, *pref = 0;
SRtotal = 0;
@ -235,9 +236,10 @@ remove_conflicts(void)
RRconflicts = NEW2(nstates, Value_t);
for (i = 0; i < nstates; i++)
{
int symbol = -1;
SRcount = 0;
RRcount = 0;
symbol = -1;
#if defined(YYBTYACC)
pref = NULL;
#endif

View File

@ -1,4 +1,4 @@
/* $Id: output.c,v 1.92 2019/11/20 00:55:05 tom Exp $ */
/* $Id: output.c,v 1.100 2022/01/09 18:03:56 tom Exp $ */
#include "defs.h"
@ -96,7 +96,7 @@ write_code_lineno(FILE * fp)
if (!lflag && (fp == code_file))
{
++outline;
fprintf(fp, line_format, outline + 1, code_file_name);
fprintf_lineno(fp, outline + 1, code_file_name);
}
}
@ -106,7 +106,7 @@ write_input_lineno(void)
if (!lflag)
{
++outline;
fprintf(code_file, line_format, lineno, input_file_name);
fprintf_lineno(code_file, lineno, input_file_name);
}
}
@ -372,12 +372,12 @@ output_yydefred(void)
static void
output_accessing_symbols(void)
{
int i, j;
int *translate;
if (nstates != 0)
{
translate = TMALLOC(int, nstates);
int i, j;
int *translate;
translate = TCMALLOC(int, nstates);
NO_SPACE(translate);
for (i = 0; i < nstates; ++i)
@ -442,7 +442,7 @@ token_actions(void)
Value_t csym = -1;
Value_t cbase = 0;
#endif
int max, min;
Value_t max, min;
Value_t *actionrow, *r, *s;
action *p;
@ -791,11 +791,9 @@ static int
matching_vector(int vector)
{
int i;
int j;
int k;
int t;
int w;
int match;
int prev;
i = order[vector];
@ -807,19 +805,25 @@ matching_vector(int vector)
for (prev = vector - 1; prev >= 0; prev--)
{
j = order[prev];
int j = order[prev];
if (width[j] != w || tally[j] != t)
return (-1);
match = 1;
for (k = 0; match && k < t; k++)
{
if (tos[j][k] != tos[i][k] || froms[j][k] != froms[i][k])
match = 0;
return (-1);
}
else
{
int match = 1;
if (match)
return (j);
for (k = 0; match && k < t; k++)
{
if (tos[j][k] != tos[i][k] || froms[j][k] != froms[i][k])
match = 0;
}
if (match)
return (j);
}
}
return (-1);
@ -830,7 +834,7 @@ pack_vector(int vector)
{
int i, j, k, l;
int t;
int loc;
Value_t loc;
int ok;
Value_t *from;
Value_t *to;
@ -854,7 +858,7 @@ pack_vector(int vector)
ok = 1;
for (k = 0; ok && k < t; k++)
{
loc = j + from[k];
loc = (Value_t)(j + from[k]);
if (loc >= maxtable - 1)
{
if (loc >= MAXTABLE - 1)
@ -893,7 +897,7 @@ pack_vector(int vector)
{
for (k = 0; k < t; k++)
{
loc = j + from[k];
loc = (Value_t)(j + from[k]);
table[loc] = to[k];
check[loc] = from[k];
if (loc > high)
@ -913,7 +917,6 @@ pack_table(void)
{
int i;
Value_t place;
int state;
base = NEW2(nvectors, Value_t);
pos = NEW2(nentries, Value_t);
@ -930,7 +933,7 @@ pack_table(void)
for (i = 0; i < nentries; i++)
{
state = matching_vector(i);
int state = matching_vector(i);
if (state < 0)
place = (Value_t)pack_vector(i);
@ -1048,7 +1051,7 @@ output_table(void)
if (high >= MAXYYINT)
{
fprintf(stderr, "YYTABLESIZE: %ld\n", high);
fprintf(stderr, "Table is longer than %d elements.\n", MAXYYINT);
fprintf(stderr, "Table is longer than %ld elements.\n", (long)MAXYYINT);
done(1);
}
@ -1225,7 +1228,6 @@ static void
output_defines(FILE * fp)
{
int c, i;
char *s;
if (fp == defines_file)
{
@ -1234,7 +1236,8 @@ output_defines(FILE * fp)
for (i = 2; i < ntokens; ++i)
{
s = symbol_name[i];
char *s = symbol_name[i];
if (is_C_identifier(s) && (!sflag || *s != '"'))
{
fprintf(fp, "#define ");
@ -1256,14 +1259,14 @@ output_defines(FILE * fp)
}
if (fp == code_file)
++outline;
fprintf(fp, " %d\n", symbol_value[i]);
fprintf(fp, " %ld\n", (long)symbol_value[i]);
}
}
if (fp == code_file)
++outline;
if (fp != defines_file || iflag)
fprintf(fp, "#define YYERRCODE %d\n", symbol_value[1]);
fprintf(fp, "#define YYERRCODE %ld\n", (long)symbol_value[1]);
if (fp == defines_file)
{
@ -1340,7 +1343,7 @@ output_debug(void)
const char *s;
++outline;
fprintf(code_file, "#define YYFINAL %d\n", final_state);
fprintf(code_file, "#define YYFINAL %ld\n", (long)final_state);
outline += output_yydebug(code_file);
@ -1372,7 +1375,7 @@ output_debug(void)
fprintf(code_file, "#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? "
"YYUNDFTOKEN : (a))\n");
symnam = TMALLOC(const char *, max + 2);
symnam = TCMALLOC(const char *, max + 2);
NO_SPACE(symnam);
/* Note that it is not necessary to initialize the element */
@ -1685,15 +1688,49 @@ static void
output_semantic_actions(void)
{
int c, last;
int state;
char line_state[20];
rewind(action_file);
if ((c = getc(action_file)) == EOF)
return;
if (!lflag)
{
state = -1;
sprintf(line_state, line_format, 1, "");
}
last = c;
putc_code(code_file, c);
while ((c = getc(action_file)) != EOF)
{
/*
* When writing the action file, we did not know the line-numbers in
* the code-file, but wrote empty #line directives. Detect those and
* replace with proper #line directives.
*/
if (!lflag && (last == '\n' || state >= 0))
{
if (c == line_state[state + 1])
{
++state;
if (line_state[state + 1] == '\0')
{
write_code_lineno(code_file);
state = -1;
}
last = c;
continue;
}
else
{
int n;
for (n = 0; n <= state; ++n)
putc_code(code_file, line_state[n]);
state = -1;
}
}
putc_code(code_file, c);
last = c;
}
@ -1956,8 +1993,8 @@ output_yydestruct_impl(void)
++outline;
puts_code(code_file, destructor_code);
putc_code(code_file, '\n');
putl_code(code_file, "\tbreak;\n");
write_code_lineno(code_file);
putl_code(code_file, "\tbreak;\n");
FREE(destructor_code);
}
}

View File

@ -1,17 +1,18 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
%define AltProgram btyacc
%define AppVersion 20200330
%define UseProgram yacc
# $Id: byacc.spec,v 1.49 2020/03/30 23:31:42 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
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
Group: Applications/Development
URL: ftp://invisible-island.net/%{AppProgram}
Source0: %{AppProgram}-%{AppVersion}.tgz
Packager: Thomas E. Dickey <dickey@invisible-island.net>
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
@ -20,10 +21,10 @@ 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 btyacc
Summary: Curses library with POSIX thread support.
%package -n byacc2
Summary: public domain Berkeley LALR Yacc parser generator with backtracking
%description -n btyacc
%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
@ -34,15 +35,16 @@ This package has the backtracking extension.
%prep
%define debug_package %{nil}
%global debug_package %{nil}
%setup -q -n %{AppProgram}-%{AppVersion}
%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} \\\
@ -57,18 +59,16 @@ pushd BUILD-byacc
CONFIGURE_TOP=%{my_srcdir} \
%configure %{CFG_OPTS} \
--program-prefix=b \
--program-transform-name='s,\^,b,'
make
popd
mkdir BUILD-btyacc
pushd BUILD-btyacc
mkdir BUILD-byacc2
pushd BUILD-byacc2
CONFIGURE_TOP=%{my_srcdir} \
%configure %{CFG_OPTS} \
--enable-btyacc \
--program-prefix=bt \
--with-max-table-size=18000 \
--program-transform-name='s,\^,bt,'
--program-transform-name='s,\<yacc,byacc2,g' \
--with-max-table-size=123456 \
make
popd
@ -77,10 +77,10 @@ popd
pushd BUILD-byacc
make install DESTDIR=$RPM_BUILD_ROOT
( cd $RPM_BUILD_ROOT%{_bindir} && ln -vs %{AppProgram} %{UseProgram} )
( cd $RPM_BUILD_ROOT%{_bindir} && ln -vs %{name} %{UseProgram} )
popd
pushd BUILD-btyacc
pushd BUILD-byacc2
make install DESTDIR=$RPM_BUILD_ROOT
popd
@ -88,19 +88,27 @@ popd
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_prefix}/bin/%{AppProgram}
%{_prefix}/bin/%{UseProgram}
%{_mandir}/man1/%{AppProgram}.*
%doc ACKNOWLEDGEMENTS CHANGES NEW_FEATURES NOTES NO_WARRANTY README
%license LICENSE
%{_bindir}/%{name}
%{_bindir}/%{UseProgram}
%{_mandir}/man1/%{name}.*
%files -n btyacc
%defattr(-,root,root)
%{_prefix}/bin/%{AltProgram}
%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

View File

@ -1,3 +1,106 @@
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

View File

@ -1 +0,0 @@
5

View File

@ -1,23 +1,19 @@
Source: byacc
Maintainer: Thomas E. Dickey <dickey@invisible-island.net>
Uploaders: Thomas E. Dickey <dickey@his.com>
Section: devel
Priority: optional
Standards-Version: 3.8.4
Build-Depends: debhelper (>= 5)
Homepage: http://invisible-island.net/byacc/
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: byacc
Architecture: any
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.
Package: btyacc
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
@ -26,4 +22,7 @@ Description: public domain Berkeley LALR Yacc parser generator
routine written in the C programming language. It has a public domain
license which includes the generated C.
.
This package has the backtracking extension.
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

View File

@ -1,42 +1,48 @@
Upstream source http://invisible-island.net/byacc/byacc.html
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/
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: *
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
Licence: other-BSD
Copyright: 2004-2019,2020 by Thomas E. Dickey
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
@ -44,10 +50,10 @@ Copyright: 2004-2019,2020 by Thomas E. Dickey
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.
@ -55,7 +61,7 @@ Copyright: 2004-2019,2020 by Thomas E. Dickey
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
@ -63,42 +69,42 @@ Copyright: 2004-2019,2020 by Thomas E. Dickey
Files: install-sh
Copyright: 1994 X Consortium
Licence: other-BSD
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: debian/*
Copyright: 2012 Thomas E. Dickey
Licence: other-BSD
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
@ -107,7 +113,7 @@ Licence: other-BSD
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
@ -116,5 +122,8 @@ Licence: other-BSD
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
On Debian systems, the complete text of the GNU General
Public License can be found in '/usr/share/common-licenses/GPL-2'
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'

View File

@ -1,4 +0,0 @@
README
ACKNOWLEDGEMENTS
NEW_FEATURES
NOTES

View File

@ -1,15 +0,0 @@
#! /bin/sh
# postinst script for byacc
set -e
if [ $1 != "upgrade" ] ; then
update-alternatives \
--install /usr/bin/yacc yacc /usr/bin/byacc 80 \
--slave /usr/share/man/man1/yacc.1.gz yaccman \
/usr/share/man/man1/byacc.1.gz
fi
#DEBHELPER#
exit 0

View File

@ -1,12 +0,0 @@
#! /bin/sh
# prerm script for byacc
set -e
if [ $1 != "upgrade" ]; then
update-alternatives --remove yacc /usr/bin/byacc
fi
#DEBHELPER#
exit 0

View File

@ -1,139 +1,29 @@
#!/usr/bin/make -f
# $Id: rules,v 1.3 2018/05/25 20:03:37 tom Exp $
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
export DEB_BUILD_MAINT_OPTIONS := hardening=+all qa=+bug reproducible=+all
PACKAGES.arch = byacc btyacc
%:
dh $@
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
# dh_autoreconf interferes with portability -- skip it
override_dh_autoreconf:
echo "skip: dh_autoreconf autoreconf-dickey -- -f -i"
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
BYACC_DIR = $(CURDIR)/debian/byacc
BTYACC_DIR = $(CURDIR)/debian/btyacc
BYACC_TMP = t/byacc
BTYACC_TMP = t/btyacc
verbose = # -v
configure = \
CPPFLAGS="$(CPPFLAGS)" \
CFLAGS="$(CFLAGS)" \
LDFLAGS="$(LDFLAGS)" \
../../configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--mandir=\$${prefix}/share/man \
--sysconfdir=/etc \
--program-transform-name='s,^,b,'
all: build
config: config-arch
build: build-arch
install: install-arch
binary: binary-arch
config-arch: $(PACKAGES.arch:%=config-%-stamp)
build-arch: $(PACKAGES.arch:%=build-%-stamp)
install-arch: $(PACKAGES.arch:%=install-%-stamp)
config-byacc-stamp:
dh_testdir
rm -rf $(BYACC_TMP)
mkdir -p $(BYACC_TMP)
cd $(BYACC_TMP); $(configure)
touch $@
config-btyacc-stamp:
dh_testdir
rm -rf $(BTYACC_TMP)
mkdir -p $(BTYACC_TMP)
cd $(BTYACC_TMP); $(configure) \
override_dh_auto_configure:
dh_auto_configure -- \
--enable-warnings \
--verbose \
--enable-stdnoreturn \
--enable-btyacc \
--with-max-table-size=18000 \
--program-transform-name='s,^,bt,'
--with-max-table-size=123456 \
--program-transform-name='s,^yacc,byacc2,'
touch $@
# workaround for whatis
sed -i '/- an LALR/s,^..N,byacc2,' yacc.1
build-byacc-stamp: config-byacc-stamp
dh_testdir
cd $(BYACC_TMP); $(MAKE)
touch $@
build-btyacc-stamp: config-btyacc-stamp
dh_testdir
cd $(BTYACC_TMP); $(MAKE)
touch $@
install-byacc-stamp: build-byacc-stamp
dh_testdir
dh_testroot
dh_installdirs
cd $(BYACC_TMP); $(MAKE) install DESTDIR=$(BYACC_DIR)
touch $@
install-btyacc-stamp: build-btyacc-stamp
dh_testdir
dh_testroot
dh_installdirs
cd $(BTYACC_TMP); $(MAKE) install DESTDIR=$(BTYACC_DIR)
touch $@
clean:
dh_testdir
dh_testroot
dh_clean $(verbose)
rm -rf t
# Build architecture-dependent files here.
binary-arch: build install
ifneq ($(PACKAGES.arch),)
rm -f $(PACKAGES.arch:%=install-%-stamp)
dh_testdir
dh_testroot
dh_lintian $(verbose) $(PACKAGES.arch:%=-p%)
dh_installdocs $(verbose) $(PACKAGES.arch:%=-p%)
dh_installexamples $(verbose) $(PACKAGES.arch:%=-p%)
dh_installchangelogs $(verbose) $(PACKAGES.arch:%=-p%) CHANGES
dh_strip $(verbose) $(PACKAGES.arch:%=-p%)
dh_compress $(verbose) $(PACKAGES.arch:%=-p%)
dh_fixperms $(verbose) $(PACKAGES.arch:%=-p%)
dh_installdeb $(verbose) $(PACKAGES.arch:%=-p%)
dh_shlibdeps $(verbose) $(PACKAGES.arch:%=-p%)
dh_gencontrol $(verbose) $(PACKAGES.arch:%=-p%)
dh_md5sums $(verbose) $(PACKAGES.arch:%=-p%)
dh_builddeb $(verbose) $(PACKAGES.arch:%=-p%)
endif
.PHONY: build clean config config-arch binary binary-arch install install-arch
# 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

View File

@ -1,4 +1,20 @@
version=3
version=4
opts=passive ftp://ftp.invisible-island.net/byacc/byacc-(\d+)\.tgz \
debian uupdate
# 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

View File

@ -1,16 +1,17 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
%define AppVersion 20200330
%define UseProgram yacc
# $Id: mingw-byacc.spec,v 1.29 2020/03/30 23:31:42 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
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
Group: Applications/Development
URL: ftp://invisible-island.net/%{AppProgram}
Source0: %{AppProgram}-%{AppVersion}.tgz
Packager: Thomas Dickey <dickey@invisible-island.net>
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
@ -21,9 +22,9 @@ license which includes the generated C.
%prep
%define debug_package %{nil}
%global debug_package %{nil}
%setup -q -n %{AppProgram}-%{AppVersion}
%setup -q -n %{name}-%{AppPatched}
%build
%configure --verbose \
@ -39,23 +40,27 @@ make
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
( cd $RPM_BUILD_ROOT%{_bindir} && ln -s %{AppProgram} %{UseProgram} )
make install DESTDIR=$RPM_BUILD_ROOT
( cd $RPM_BUILD_ROOT%{_bindir} && ln -s %{name} %{UseProgram} )
strip $RPM_BUILD_ROOT%{_bindir}/%{AppProgram}
strip $RPM_BUILD_ROOT%{_bindir}/%{name}
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_prefix}/bin/%{AppProgram}
%{_prefix}/bin/%{UseProgram}
%{_mandir}/man1/%{AppProgram}.*
%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"

View File

@ -1,17 +1,17 @@
# $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $
# $NetBSD: Makefile,v 1.24 2021/08/14 01:04:32 mef Exp $
#
DISTNAME= byacc-20200330
PKGREVISION= 1
DISTNAME= byacc-20230201
CATEGORIES= devel
MASTER_SITES= ftp://ftp.invisible-island.net/byacc/
MASTER_SITES= https://invisible-mirror.net/archives/byacc/
DIST_SUBDIR= byacc-20220101
EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://invisible-island.net/byacc/byacc.html
MAINTAINER= fcambus@NetBSD.org
HOMEPAGE= https://invisible-island.net/byacc/byacc.html
COMMENT= Berkeley Yacc
LICENSE= public-domain
PKG_DESTDIR_SUPPORT= user-destdir
GNU_CONFIGURE= YES
MAKE_FILE= makefile

View File

@ -1,4 +1,4 @@
/* $Id: reader.c,v 1.79 2020/03/30 23:54:13 tom Exp $ */
/* $Id: reader.c,v 1.91 2022/01/09 18:04:58 tom Exp $ */
#include "defs.h"
@ -20,6 +20,13 @@
/* this is a hard limit, but seems more than adequate */
#define MAXARGS 20
#define begin_case(f,n) fprintf(f, "case %d:\n", (int)(n))
#define end_case(f) \
fprintf(f, "\n"); \
fprintf_lineno(f, 1, ""); \
fprintf(f, "break;\n")
static void start_rule(bucket *bp, int s_lineno);
#if defined(YYBTYACC)
static void copy_initial_action(void);
@ -185,7 +192,7 @@ line_directive(void)
else
UNLESS(!isdigit(UCH(ch)));
line_1st = n;
ld = ldNUM;
ld = ldNUM; /* this is needed, but cppcheck says no... */
/* FALLTHRU */
case ldNUM:
if (isdigit(UCH(ch)))
@ -223,7 +230,7 @@ line_directive(void)
if (ld == ldOK)
{
size_t need = (size_t) (name_end - name_1st);
size_t need = (size_t)(name_end - name_1st);
if ((long)need > (long)input_file_name_len)
{
input_file_name_len = ((need + 1) * 3) / 2;
@ -261,11 +268,12 @@ static void
get_line(void)
{
FILE *f = input_file;
int c;
int i;
do
{
int c;
int i;
if (saw_eof || (c = getc(f)) == EOF)
{
if (line)
@ -450,7 +458,7 @@ static struct keyword
keywords[] = {
{ "binary", NONASSOC },
{ "code", XCODE },
{ "debug", XXXDEBUG },
{ "debug", NONPOSIX_DEBUG },
#if defined(YYBTYACC)
{ "destructor", DESTRUCTOR },
#endif
@ -493,11 +501,12 @@ keyword(void)
{
int c;
char *t_cptr = cptr;
struct keyword *key;
c = *++cptr;
if (isalpha(UCH(c)))
{
struct keyword *key;
cinc = 0;
for (;;)
{
@ -587,7 +596,6 @@ static char *
copy_string(int quote)
{
struct mstring *temp = msnew();
int c;
struct ainfo a;
a.a_lineno = lineno;
a.a_line = dup_line();
@ -595,7 +603,8 @@ copy_string(int quote)
for (;;)
{
c = *cptr++;
int c = *cptr++;
mputc(temp, c);
if (c == quote)
{
@ -726,7 +735,7 @@ copy_code(void)
if (pos == -1 || !check_key(pos))
{
syntax_error(lineno, line, cptr);
return;
/*NOTREACHED */
}
}
}
@ -747,7 +756,8 @@ copy_code(void)
code_mstr = msnew();
}
cline++;
msprintf(code_mstr, line_format, lineno, input_file_name);
if (!lflag)
msprintf(code_mstr, line_format, lineno, input_file_name);
for (;;)
{
c = *cptr++;
@ -758,7 +768,7 @@ copy_code(void)
if (line == NULL)
{
unexpected_EOF();
return;
/*NOTREACHED */
}
continue;
case '\n':
@ -777,7 +787,7 @@ copy_code(void)
cline++;
}
code_lines[pos].lines = msdone(code_mstr);
code_lines[pos].num = (size_t) cline;
code_lines[pos].num = (size_t)cline;
return;
}
break;
@ -806,8 +816,7 @@ copy_text(void)
if (line == NULL)
unterminated_text(&a);
}
if (!lflag)
fprintf(f, line_format, lineno, input_file_name);
fprintf_lineno(f, lineno, input_file_name);
loop:
c = *cptr++;
@ -898,8 +907,7 @@ copy_union(void)
puts_both("#ifndef YYSTYPE_IS_DECLARED\n");
puts_both("#define YYSTYPE_IS_DECLARED 1\n");
if (!lflag)
fprintf(text_file, line_format, lineno, input_file_name);
fprintf_lineno(text_file, lineno, input_file_name);
puts_both("typedef union");
depth = 0;
@ -1140,19 +1148,23 @@ copy_param(int k)
}
if (buf == 0)
{
buf_size = (size_t) linesize;
buf_size = (size_t)linesize;
buf = TMALLOC(char, buf_size);
NO_SPACE(buf);
}
else if (c == '\n')
{
char *tmp;
get_line();
if (line == NULL)
unexpected_EOF();
--cptr;
buf_size += (size_t) linesize;
buf = TREALLOC(char, buf, buf_size);
buf_size += (size_t)linesize;
tmp = TREALLOC(char, buf, buf_size);
NO_SPACE(tmp);
buf = tmp;
}
NO_SPACE(buf);
if (curly)
{
if ((state == 2) && (c == L_CURL))
@ -1203,13 +1215,21 @@ copy_param(int k)
if (parms[i] == ']')
{
int level = 1;
while (i >= 0 && level > 0 && parms[i] != '[')
while (i >= 0)
{
if (parms[i] == ']')
char ch = parms[i--];
if (ch == ']')
{
++level;
else if (parms[i] == '[')
--level;
i--;
}
else if (ch == '[')
{
if (--level <= 1)
{
++i;
break;
}
}
}
if (i <= 0)
unexpected_EOF();
@ -1433,8 +1453,6 @@ get_literal(void)
static int
is_reserved(char *name)
{
char *s;
if (strcmp(name, ".") == 0 ||
strcmp(name, "$accept") == 0 ||
strcmp(name, "$end") == 0)
@ -1442,7 +1460,8 @@ is_reserved(char *name)
if (name[0] == '$' && name[1] == '$' && isdigit(UCH(name[2])))
{
s = name + 3;
char *s = name + 3;
while (isdigit(UCH(*s)))
++s;
if (*s == NUL)
@ -1554,7 +1573,7 @@ get_tag(void)
FREE(t_line);
havetags = 1;
return cache_tag(cache, (size_t) cinc);
return cache_tag(cache, (size_t)cinc);
}
#if defined(YYBTYACC)
@ -1565,7 +1584,7 @@ scan_id(void)
while (IS_NAME2(UCH(*cptr)))
cptr++;
return cache_tag(b, (size_t) (cptr - b));
return cache_tag(b, (size_t)(cptr - b));
}
#endif
@ -1690,14 +1709,14 @@ static void
declare_argtypes(bucket *bp)
{
char *tags[MAXARGS];
int args = 0, c;
int args = 0;
if (bp->args >= 0)
retyped_warning(bp->name);
cptr++; /* skip open paren */
for (;;)
{
c = nextc();
int c = nextc();
if (c == EOF)
unexpected_EOF();
if (c != '<')
@ -1792,15 +1811,15 @@ declare_start(void)
static void
read_declarations(void)
{
int c, k;
cache_size = CACHE_SIZE;
cache = TMALLOC(char, cache_size);
NO_SPACE(cache);
for (;;)
{
c = nextc();
int k;
int c = nextc();
if (c == EOF)
unexpected_EOF();
if (c != '%')
@ -1877,8 +1896,8 @@ read_declarations(void)
break;
#endif
case XXXDEBUG:
/* XXX: FIXME */
case NONPOSIX_DEBUG:
tflag = 1;
break;
case POSIX_YACC:
@ -2029,7 +2048,7 @@ parse_id(char *p, char **save)
p++;
if (save)
{
*save = cache_tag(b, (size_t) (p - b));
*save = cache_tag(b, (size_t)(p - b));
}
return p;
}
@ -2127,7 +2146,7 @@ compile_arg(char **theptr, char *yyvaltag)
{
char *p = *theptr;
struct mstring *c = msnew();
int i, j, n;
int i, n;
Value_t *offsets = NULL, maxoffset;
bucket **rhs;
@ -2141,7 +2160,9 @@ compile_arg(char **theptr, char *yyvaltag)
}
if (maxoffset > 0)
{
offsets = TMALLOC(Value_t, maxoffset + 1);
int j;
offsets = TCMALLOC(Value_t, maxoffset + 1);
NO_SPACE(offsets);
for (j = 0, i++; i < nitems; i++)
@ -2230,7 +2251,7 @@ can_elide_arg(char **theptr, char *yyvaltag)
{
char *p = *theptr;
int rv = 0;
int i, j, n = 0;
int i, n = 0;
Value_t *offsets = NULL, maxoffset = 0;
bucket **rhs;
char *tag = 0;
@ -2250,7 +2271,9 @@ can_elide_arg(char **theptr, char *yyvaltag)
}
if (maxoffset > 0)
{
offsets = TMALLOC(Value_t, maxoffset + 1);
int j;
offsets = TCMALLOC(Value_t, maxoffset + 1);
NO_SPACE(offsets);
for (j = 0, i++; i < nitems; i++)
@ -2370,7 +2393,6 @@ advance_to_start(void)
{
int c;
bucket *bp;
char *s_cptr;
int s_lineno;
#if defined(YYBTYACC)
char *args = NULL;
@ -2379,6 +2401,8 @@ advance_to_start(void)
for (;;)
{
char *s_cptr;
c = nextc();
if (c != '%')
break;
@ -2457,12 +2481,12 @@ start_rule(bucket *bp, int s_lineno)
static void
end_rule(void)
{
int i;
if (!last_was_action && plhs[nrules]->tag)
{
if (pitem[nitems - 1])
{
int i;
for (i = nitems - 1; (i > 0) && pitem[i]; --i)
continue;
if (pitem[i + 1] == 0 || pitem[i + 1]->tag != plhs[nrules]->tag)
@ -2529,11 +2553,10 @@ insert_arg_rule(char *arg, char *tag)
rule = nrules;
insert_arg_cache(code, rule);
trialaction = 1; /* arg rules always run in trial mode */
fprintf(f, "case %d:\n", rule - 2);
if (!lflag)
fprintf(f, line_format, line_number, input_file_name);
fprintf(f, "%s;\n", code);
fprintf(f, "break;\n");
begin_case(f, rule - 2);
fprintf_lineno(f, line_number, input_file_name);
fprintf(f, "%s;", code);
end_case(f);
insert_empty_rule();
plhs[rule]->tag = cache_tag(tag, strlen(tag));
plhs[rule]->class = ARGUMENT;
@ -2669,7 +2692,7 @@ copy_action(void)
trialaction = (*cptr == L_BRAC);
#endif
fprintf(f, "case %d:\n", nrules - 2);
begin_case(f, nrules - 2);
#if defined(YYBTYACC)
if (backtrack)
{
@ -2677,8 +2700,7 @@ copy_action(void)
fprintf(f, " if (!yytrial)\n");
}
#endif
if (!lflag)
fprintf(f, line_format, lineno, input_file_name);
fprintf_lineno(f, lineno, input_file_name);
if (*cptr == '=')
++cptr;
@ -2741,10 +2763,12 @@ copy_action(void)
else if (i > maxoffset)
{
dollar_warning(d_lineno, i);
fprintf(f, "yystack.l_mark[%d].%s", i - maxoffset, tag);
fprintf(f, "yystack.l_mark[%ld].%s",
(long)(i - maxoffset), tag);
}
else if (offsets)
fprintf(f, "yystack.l_mark[%d].%s", offsets[i], tag);
fprintf(f, "yystack.l_mark[%ld].%s",
(long)offsets[i], tag);
FREE(d_line);
goto loop;
}
@ -2802,7 +2826,7 @@ copy_action(void)
tag = rhs[offsets[i]]->tag;
if (tag == 0)
untyped_rhs(i, rhs[offsets[i]]->name);
fprintf(f, "yystack.l_mark[%d].%s", offsets[i], tag);
fprintf(f, "yystack.l_mark[%ld].%s", (long)offsets[i], tag);
}
else
{
@ -2811,10 +2835,10 @@ copy_action(void)
else if (i > maxoffset)
{
dollar_warning(lineno, i);
fprintf(f, "yystack.l_mark[%d]", i - maxoffset);
fprintf(f, "yystack.l_mark[%ld]", (long)(i - maxoffset));
}
else if (offsets)
fprintf(f, "yystack.l_mark[%d]", offsets[i]);
fprintf(f, "yystack.l_mark[%ld]", (long)offsets[i]);
}
goto loop;
}
@ -2920,12 +2944,11 @@ copy_action(void)
if (c == L_CURL && !haveyyval)
{
fprintf(f, " if (!yytrial)\n");
if (!lflag)
fprintf(f, line_format, lineno, input_file_name);
fprintf_lineno(f, lineno, input_file_name);
trialaction = 0;
goto loop;
}
fprintf(f, "\nbreak;\n");
end_case(f);
FREE(a.a_line);
if (maxoffset > 0)
FREE(offsets);
@ -2945,7 +2968,7 @@ copy_action(void)
case ';':
if (depth > 0)
goto loop;
fprintf(f, "\nbreak;\n");
end_case(f);
free(a.a_line);
if (maxoffset > 0)
FREE(offsets);
@ -2982,13 +3005,12 @@ copy_action(void)
if (c == L_CURL && !haveyyval)
{
fprintf(f, " if (!yytrial)\n");
if (!lflag)
fprintf(f, line_format, lineno, input_file_name);
fprintf_lineno(f, lineno, input_file_name);
goto loop;
}
}
#endif
fprintf(f, "\nbreak;\n");
end_case(f);
free(a.a_line);
if (maxoffset > 0)
FREE(offsets);
@ -3150,7 +3172,6 @@ static void
copy_destructor(void)
{
char *code_text;
int c;
struct ainfo a;
bucket *bp;
@ -3158,7 +3179,7 @@ copy_destructor(void)
for (;;)
{
c = nextc();
int c = nextc();
if (c == EOF)
unexpected_EOF();
if (c == '<')
@ -3337,6 +3358,16 @@ mark_symbol(void)
((c = cptr[4]) == 'c' || c == 'C') &&
((c = cptr[5], !IS_IDENT(c))))
cptr += 5;
else if ((c == 'e' || c == 'E') &&
((c = cptr[2]) == 'm' || c == 'M') &&
((c = cptr[3]) == 'p' || c == 'P') &&
((c = cptr[4]) == 't' || c == 'T') &&
((c = cptr[5]) == 'y' || c == 'Y') &&
((c = cptr[6], !IS_IDENT(c))))
{
cptr += 6;
return (1);
}
else
syntax_error(lineno, line, cptr);
@ -3362,14 +3393,13 @@ mark_symbol(void)
static void
read_grammar(void)
{
int c;
initialize_grammar();
advance_to_start();
for (;;)
{
c = nextc();
int c = nextc();
if (c == EOF)
break;
if (isalpha(UCH(c))
@ -3378,13 +3408,17 @@ read_grammar(void)
|| c == '$'
|| c == '\''
|| c == '"')
{
add_symbol();
}
else if (c == L_CURL || c == '='
#if defined(YYBTYACC)
else if (c == L_CURL || c == '=' || (backtrack && c == L_BRAC))
#else
else if (c == L_CURL || c == '=')
|| (backtrack && c == L_BRAC)
#endif
)
{
copy_action();
}
else if (c == '|')
{
end_rule();
@ -3426,7 +3460,8 @@ static void
pack_names(void)
{
bucket *bp;
char *p, *s, *t;
char *p;
char *t;
name_pool_size = 13; /* 13 == sizeof("$end") + sizeof("$accept") */
for (bp = first_symbol; bp; bp = bp->next)
@ -3440,8 +3475,9 @@ pack_names(void)
t = name_pool + 13;
for (bp = first_symbol; bp; bp = bp->next)
{
char *s = bp->name;
p = t;
s = bp->name;
while ((*t++ = *s++) != 0)
continue;
FREE(bp->name);
@ -3470,14 +3506,14 @@ check_symbols(void)
static void
protect_string(char *src, char **des)
{
unsigned len;
char *s;
char *d;
*des = src;
if (src)
{
len = 1;
char *s;
char *d;
unsigned len = 1;
s = src;
while (*s)
{
@ -3688,8 +3724,6 @@ pack_grammar(void)
{
int i;
Value_t j;
Assoc_t assoc;
Value_t prec2;
ritem = TMALLOC(Value_t, nitems);
NO_SPACE(ritem);
@ -3720,6 +3754,9 @@ pack_grammar(void)
j = 4;
for (i = 3; i < nrules; ++i)
{
Assoc_t assoc;
Value_t prec2;
#if defined(YYBTYACC)
if (plhs[i]->args > 0)
{
@ -3811,11 +3848,11 @@ finalize_destructors(void)
{
int i;
bucket *bp;
char *tag;
for (i = 2; i < nsyms; ++i)
{
tag = symbol_type_tag[i];
char *tag = symbol_type_tag[i];
if (symbol_destructor[i] == NULL)
{
if (tag == NULL)
@ -3849,8 +3886,10 @@ finalize_destructors(void)
}
else
{ /* replace "$$" with "(*val)[.tag]" in destructor code */
char *destructor_source = symbol_destructor[i];
symbol_destructor[i]
= process_destructor_XX(symbol_destructor[i], tag);
= process_destructor_XX(destructor_source, tag);
FREE(destructor_source);
}
}
/* 'symbol_type_tag[]' elements are freed by 'free_tags()' */

View File

@ -4,6 +4,7 @@ Options:
-b file_prefix set filename prefix (default "y.")
-B create a backtracking parser
-d write definitions (.tab.h)
-h print this help-message
-H defines_file write definitions to defines_file
-i write interface (y.tab.i)
-g write a graphical description
@ -17,3 +18,13 @@ Options:
-t add debugging support
-v write description (y.output)
-V show version information and exit
Long options:
--defines -H
--file-prefix -b
--graph -g
--help -h
--name-prefix -p
--no-lines -l
--output -o
--version -V

View File

@ -4,6 +4,7 @@ Options:
-b file_prefix set filename prefix (default "y.")
-B create a backtracking parser
-d write definitions (.tab.h)
-h print this help-message
-H defines_file write definitions to defines_file
-i write interface (y.tab.i)
-g write a graphical description
@ -17,3 +18,13 @@ Options:
-t add debugging support
-v write description (y.output)
-V show version information and exit
Long options:
--defines -H
--file-prefix -b
--graph -g
--help -h
--name-prefix -p
--no-lines -l
--output -o
--version -V

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -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;
@ -839,7 +839,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1350,6 +1350,7 @@ YYPARSE_DECL()
case 2:
#line 51 "btyacc_calc1.y"
{YYVALID;}
#line 1354 "btyacc_calc1.tab.c"
break;
case 3:
#line 52 "btyacc_calc1.y"
@ -1358,6 +1359,7 @@ case 3:
{
yyerrok;
}
#line 1363 "btyacc_calc1.tab.c"
break;
case 4:
if (!yytrial)
@ -1365,6 +1367,7 @@ case 4:
{
(void) printf("%15.8f\n", yystack.l_mark[0].dval);
}
#line 1371 "btyacc_calc1.tab.c"
break;
case 5:
if (!yytrial)
@ -1372,6 +1375,7 @@ case 5:
{
(void) printf("(%15.8f, %15.8f)\n", yystack.l_mark[0].vval.lo, yystack.l_mark[0].vval.hi);
}
#line 1379 "btyacc_calc1.tab.c"
break;
case 6:
if (!yytrial)
@ -1379,6 +1383,7 @@ case 6:
{
dreg[yystack.l_mark[-2].ival] = yystack.l_mark[0].dval;
}
#line 1387 "btyacc_calc1.tab.c"
break;
case 7:
if (!yytrial)
@ -1386,6 +1391,7 @@ case 7:
{
vreg[yystack.l_mark[-2].ival] = yystack.l_mark[0].vval;
}
#line 1395 "btyacc_calc1.tab.c"
break;
case 9:
if (!yytrial)
@ -1393,6 +1399,7 @@ case 9:
{
yyval.dval = dreg[yystack.l_mark[0].ival];
}
#line 1403 "btyacc_calc1.tab.c"
break;
case 10:
if (!yytrial)
@ -1400,6 +1407,7 @@ case 10:
{
yyval.dval = yystack.l_mark[-2].dval + yystack.l_mark[0].dval;
}
#line 1411 "btyacc_calc1.tab.c"
break;
case 11:
if (!yytrial)
@ -1407,6 +1415,7 @@ case 11:
{
yyval.dval = yystack.l_mark[-2].dval - yystack.l_mark[0].dval;
}
#line 1419 "btyacc_calc1.tab.c"
break;
case 12:
if (!yytrial)
@ -1414,6 +1423,7 @@ case 12:
{
yyval.dval = yystack.l_mark[-2].dval * yystack.l_mark[0].dval;
}
#line 1427 "btyacc_calc1.tab.c"
break;
case 13:
if (!yytrial)
@ -1421,6 +1431,7 @@ case 13:
{
yyval.dval = yystack.l_mark[-2].dval / yystack.l_mark[0].dval;
}
#line 1435 "btyacc_calc1.tab.c"
break;
case 14:
if (!yytrial)
@ -1428,6 +1439,7 @@ case 14:
{
yyval.dval = -yystack.l_mark[0].dval;
}
#line 1443 "btyacc_calc1.tab.c"
break;
case 15:
if (!yytrial)
@ -1435,6 +1447,7 @@ case 15:
{
yyval.dval = yystack.l_mark[-1].dval;
}
#line 1451 "btyacc_calc1.tab.c"
break;
case 16:
if (!yytrial)
@ -1442,6 +1455,7 @@ case 16:
{
yyval.vval.hi = yyval.vval.lo = yystack.l_mark[0].dval;
}
#line 1459 "btyacc_calc1.tab.c"
break;
case 17:
if (!yytrial)
@ -1455,6 +1469,7 @@ case 17:
YYERROR;
}
}
#line 1473 "btyacc_calc1.tab.c"
break;
case 18:
if (!yytrial)
@ -1462,6 +1477,7 @@ case 18:
{
yyval.vval = vreg[yystack.l_mark[0].ival];
}
#line 1481 "btyacc_calc1.tab.c"
break;
case 19:
if (!yytrial)
@ -1470,6 +1486,7 @@ case 19:
yyval.vval.hi = yystack.l_mark[-2].vval.hi + yystack.l_mark[0].vval.hi;
yyval.vval.lo = yystack.l_mark[-2].vval.lo + yystack.l_mark[0].vval.lo;
}
#line 1490 "btyacc_calc1.tab.c"
break;
case 20:
if (!yytrial)
@ -1478,6 +1495,7 @@ case 20:
yyval.vval.hi = yystack.l_mark[-2].dval + yystack.l_mark[0].vval.hi;
yyval.vval.lo = yystack.l_mark[-2].dval + yystack.l_mark[0].vval.lo;
}
#line 1499 "btyacc_calc1.tab.c"
break;
case 21:
if (!yytrial)
@ -1486,6 +1504,7 @@ case 21:
yyval.vval.hi = yystack.l_mark[-2].vval.hi - yystack.l_mark[0].vval.lo;
yyval.vval.lo = yystack.l_mark[-2].vval.lo - yystack.l_mark[0].vval.hi;
}
#line 1508 "btyacc_calc1.tab.c"
break;
case 22:
if (!yytrial)
@ -1494,6 +1513,7 @@ case 22:
yyval.vval.hi = yystack.l_mark[-2].dval - yystack.l_mark[0].vval.lo;
yyval.vval.lo = yystack.l_mark[-2].dval - yystack.l_mark[0].vval.hi;
}
#line 1517 "btyacc_calc1.tab.c"
break;
case 23:
if (!yytrial)
@ -1501,6 +1521,7 @@ case 23:
{
yyval.vval = vmul( yystack.l_mark[-2].vval.lo, yystack.l_mark[-2].vval.hi, yystack.l_mark[0].vval );
}
#line 1525 "btyacc_calc1.tab.c"
break;
case 24:
if (!yytrial)
@ -1508,6 +1529,7 @@ case 24:
{
yyval.vval = vmul (yystack.l_mark[-2].dval, yystack.l_mark[-2].dval, yystack.l_mark[0].vval );
}
#line 1533 "btyacc_calc1.tab.c"
break;
case 25:
if (!yytrial)
@ -1516,6 +1538,7 @@ case 25:
if (dcheck(yystack.l_mark[0].vval)) YYERROR;
yyval.vval = vdiv ( yystack.l_mark[-2].vval.lo, yystack.l_mark[-2].vval.hi, yystack.l_mark[0].vval );
}
#line 1542 "btyacc_calc1.tab.c"
break;
case 26:
if (!yytrial)
@ -1524,6 +1547,7 @@ case 26:
if (dcheck ( yystack.l_mark[0].vval )) YYERROR;
yyval.vval = vdiv (yystack.l_mark[-2].dval, yystack.l_mark[-2].dval, yystack.l_mark[0].vval );
}
#line 1551 "btyacc_calc1.tab.c"
break;
case 27:
if (!yytrial)
@ -1532,6 +1556,7 @@ case 27:
yyval.vval.hi = -yystack.l_mark[0].vval.lo;
yyval.vval.lo = -yystack.l_mark[0].vval.hi;
}
#line 1560 "btyacc_calc1.tab.c"
break;
case 28:
if (!yytrial)
@ -1539,8 +1564,9 @@ case 28:
{
yyval.vval = yystack.l_mark[-1].vval;
}
#line 1568 "btyacc_calc1.tab.c"
break;
#line 1544 "btyacc_calc1.tab.c"
#line 1570 "btyacc_calc1.tab.c"
default:
break;
}

View File

@ -11,7 +11,7 @@
#endif
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
typedef union
typedef union YYSTYPE
{
int ival;
double dval;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -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;
@ -679,8 +679,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 683 "btyacc_demo.tab.c"
break;
#line 684 "btyacc_demo.tab.c"
case 45:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -688,8 +688,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 692 "btyacc_demo.tab.c"
break;
#line 693 "btyacc_demo.tab.c"
case 42:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -697,8 +697,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 701 "btyacc_demo.tab.c"
break;
#line 702 "btyacc_demo.tab.c"
case 47:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -706,8 +706,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 710 "btyacc_demo.tab.c"
break;
#line 711 "btyacc_demo.tab.c"
case 37:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -715,8 +715,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 719 "btyacc_demo.tab.c"
break;
#line 720 "btyacc_demo.tab.c"
case 257:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -724,8 +724,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 728 "btyacc_demo.tab.c"
break;
#line 729 "btyacc_demo.tab.c"
case 258:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -733,8 +733,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 737 "btyacc_demo.tab.c"
break;
#line 738 "btyacc_demo.tab.c"
case 40:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -742,8 +742,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 746 "btyacc_demo.tab.c"
break;
#line 747 "btyacc_demo.tab.c"
case 91:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -751,8 +751,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 755 "btyacc_demo.tab.c"
break;
#line 756 "btyacc_demo.tab.c"
case 46:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -760,8 +760,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 764 "btyacc_demo.tab.c"
break;
#line 765 "btyacc_demo.tab.c"
case 259:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -769,8 +769,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).id); }
#line 773 "btyacc_demo.tab.c"
break;
#line 774 "btyacc_demo.tab.c"
case 260:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -778,8 +778,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).expr); }
#line 782 "btyacc_demo.tab.c"
break;
#line 783 "btyacc_demo.tab.c"
case 261:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -787,8 +787,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 791 "btyacc_demo.tab.c"
break;
#line 792 "btyacc_demo.tab.c"
case 262:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -796,8 +796,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 800 "btyacc_demo.tab.c"
break;
#line 801 "btyacc_demo.tab.c"
case 263:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -805,8 +805,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 809 "btyacc_demo.tab.c"
break;
#line 810 "btyacc_demo.tab.c"
case 264:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -814,8 +814,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 818 "btyacc_demo.tab.c"
break;
#line 819 "btyacc_demo.tab.c"
case 265:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -823,8 +823,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 827 "btyacc_demo.tab.c"
break;
#line 828 "btyacc_demo.tab.c"
case 266:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -832,8 +832,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 836 "btyacc_demo.tab.c"
break;
#line 837 "btyacc_demo.tab.c"
case 267:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -841,8 +841,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 845 "btyacc_demo.tab.c"
break;
#line 846 "btyacc_demo.tab.c"
case 268:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -850,8 +850,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 854 "btyacc_demo.tab.c"
break;
#line 855 "btyacc_demo.tab.c"
case 269:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -859,8 +859,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 863 "btyacc_demo.tab.c"
break;
#line 864 "btyacc_demo.tab.c"
case 59:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -868,8 +868,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 872 "btyacc_demo.tab.c"
break;
#line 873 "btyacc_demo.tab.c"
case 44:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -877,8 +877,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 881 "btyacc_demo.tab.c"
break;
#line 882 "btyacc_demo.tab.c"
case 41:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -886,8 +886,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 890 "btyacc_demo.tab.c"
break;
#line 891 "btyacc_demo.tab.c"
case 93:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -895,8 +895,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 899 "btyacc_demo.tab.c"
break;
#line 900 "btyacc_demo.tab.c"
case 123:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -904,8 +904,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 908 "btyacc_demo.tab.c"
break;
#line 909 "btyacc_demo.tab.c"
case 125:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -913,8 +913,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 917 "btyacc_demo.tab.c"
break;
#line 918 "btyacc_demo.tab.c"
case 270:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -922,8 +922,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 926 "btyacc_demo.tab.c"
break;
#line 927 "btyacc_demo.tab.c"
case 271:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -931,8 +931,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 935 "btyacc_demo.tab.c"
break;
#line 936 "btyacc_demo.tab.c"
case 272:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -940,8 +940,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).expr); }
#line 944 "btyacc_demo.tab.c"
break;
#line 945 "btyacc_demo.tab.c"
case 273:
#line 67 "btyacc_demo.y"
{ /* 'msg' is a 'char *' indicating the context of destructor invocation*/
@ -950,8 +950,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).decl->scope); free((*val).decl->type); }
#line 954 "btyacc_demo.tab.c"
break;
#line 955 "btyacc_demo.tab.c"
case 274:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -959,8 +959,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 963 "btyacc_demo.tab.c"
break;
#line 964 "btyacc_demo.tab.c"
case 275:
#line 83 "btyacc_demo.y"
{ printf("%s accessed by symbol with no type @ position[%d,%d..%d,%d]\n",
@ -968,8 +968,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
#line 972 "btyacc_demo.tab.c"
break;
#line 973 "btyacc_demo.tab.c"
case 276:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -977,8 +977,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).code); }
#line 981 "btyacc_demo.tab.c"
break;
#line 982 "btyacc_demo.tab.c"
case 277:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -986,8 +986,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).code); }
#line 990 "btyacc_demo.tab.c"
break;
#line 991 "btyacc_demo.tab.c"
case 278:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -995,8 +995,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).code); }
#line 999 "btyacc_demo.tab.c"
break;
#line 1000 "btyacc_demo.tab.c"
case 279:
#line 73 "btyacc_demo.y"
{ printf("%s accessed by symbol with type <decl> (case s.b. 279 & 280) @ position[%d,%d..%d,%d]\n",
@ -1004,8 +1004,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).decl); }
#line 1008 "btyacc_demo.tab.c"
break;
#line 1009 "btyacc_demo.tab.c"
case 280:
#line 73 "btyacc_demo.y"
{ printf("%s accessed by symbol with type <decl> (case s.b. 279 & 280) @ position[%d,%d..%d,%d]\n",
@ -1013,8 +1013,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).decl); }
#line 1017 "btyacc_demo.tab.c"
break;
#line 1018 "btyacc_demo.tab.c"
case 281:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1022,8 +1022,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).type); }
#line 1026 "btyacc_demo.tab.c"
break;
#line 1027 "btyacc_demo.tab.c"
case 282:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1031,8 +1031,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).type); }
#line 1035 "btyacc_demo.tab.c"
break;
#line 1036 "btyacc_demo.tab.c"
case 283:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1040,8 +1040,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).type); }
#line 1044 "btyacc_demo.tab.c"
break;
#line 1045 "btyacc_demo.tab.c"
case 284:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1049,8 +1049,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).type); }
#line 1053 "btyacc_demo.tab.c"
break;
#line 1054 "btyacc_demo.tab.c"
case 285:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1058,8 +1058,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).type); }
#line 1062 "btyacc_demo.tab.c"
break;
#line 1063 "btyacc_demo.tab.c"
case 286:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1067,8 +1067,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
#line 1071 "btyacc_demo.tab.c"
break;
#line 1072 "btyacc_demo.tab.c"
case 287:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1076,8 +1076,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).dlist); }
#line 1080 "btyacc_demo.tab.c"
break;
#line 1081 "btyacc_demo.tab.c"
case 288:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1085,8 +1085,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).dlist); }
#line 1089 "btyacc_demo.tab.c"
break;
#line 1090 "btyacc_demo.tab.c"
case 289:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1094,8 +1094,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
#line 1098 "btyacc_demo.tab.c"
break;
#line 1099 "btyacc_demo.tab.c"
case 290:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1103,8 +1103,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
#line 1107 "btyacc_demo.tab.c"
break;
#line 1108 "btyacc_demo.tab.c"
case 291:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1112,8 +1112,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
#line 1116 "btyacc_demo.tab.c"
break;
#line 1117 "btyacc_demo.tab.c"
case 292:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1121,8 +1121,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
#line 1125 "btyacc_demo.tab.c"
break;
#line 1126 "btyacc_demo.tab.c"
case 293:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1130,8 +1130,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).type); }
#line 1134 "btyacc_demo.tab.c"
break;
#line 1135 "btyacc_demo.tab.c"
case 294:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1139,8 +1139,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
#line 1143 "btyacc_demo.tab.c"
break;
#line 1144 "btyacc_demo.tab.c"
case 295:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1148,8 +1148,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).type); }
#line 1152 "btyacc_demo.tab.c"
break;
#line 1153 "btyacc_demo.tab.c"
case 296:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1157,8 +1157,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
#line 1161 "btyacc_demo.tab.c"
break;
#line 1162 "btyacc_demo.tab.c"
case 297:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1166,8 +1166,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
#line 1170 "btyacc_demo.tab.c"
break;
#line 1171 "btyacc_demo.tab.c"
case 298:
#line 78 "btyacc_demo.y"
{ printf("%s accessed by symbol of any type other than <decl> @ position[%d,%d..%d,%d]\n",
@ -1175,8 +1175,8 @@ YYDESTRUCT_DECL()
(*loc).first_line, (*loc).first_column,
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
#line 1179 "btyacc_demo.tab.c"
break;
#line 1180 "btyacc_demo.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -1342,7 +1342,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1853,38 +1853,46 @@ YYPARSE_DECL()
case 1:
#line 93 "btyacc_demo.y"
{ yyval.scope = yystack.l_mark[0].scope; }
#line 1857 "btyacc_demo.tab.c"
break;
case 2:
#line 94 "btyacc_demo.y"
{ yyval.scope = global_scope; }
#line 1862 "btyacc_demo.tab.c"
break;
case 3:
#line 95 "btyacc_demo.y"
{ Decl *d = lookup(yystack.l_mark[-2].scope, yystack.l_mark[-1].id);
if (!d || !d->scope) YYERROR;
yyval.scope = d->scope; }
#line 1869 "btyacc_demo.tab.c"
break;
case 4:
#line 101 "btyacc_demo.y"
{ Decl *d = lookup(yystack.l_mark[-1].scope, yystack.l_mark[0].id);
if (d == NULL || d->istype() == 0) YYERROR;
yyval.type = d->type; }
#line 1876 "btyacc_demo.tab.c"
break;
case 5:
#line 106 "btyacc_demo.y"
yyval.scope = global_scope = new_scope(0);
#line 1881 "btyacc_demo.tab.c"
break;
case 8:
#line 107 "btyacc_demo.y"
yyval.scope = yystack.l_mark[-1].scope;
#line 1886 "btyacc_demo.tab.c"
break;
case 10:
#line 109 "btyacc_demo.y"
{YYVALID;}
#line 1891 "btyacc_demo.tab.c"
break;
case 11:
#line 110 "btyacc_demo.y"
yyval.scope = start_fn_def(yystack.l_mark[-2].scope, yystack.l_mark[0].decl);
#line 1896 "btyacc_demo.tab.c"
break;
case 12:
if (!yytrial)
@ -1896,220 +1904,266 @@ case 12:
yyloc.last_line = yystack.p_mark[0].last_line;
yyloc.last_column = yystack.p_mark[0].last_column;
finish_fn_def(yystack.l_mark[-2].decl, yystack.l_mark[0].code); }
#line 1908 "btyacc_demo.tab.c"
break;
case 13:
#line 121 "btyacc_demo.y"
{ yyval.type = yystack.l_mark[0].type; }
#line 1913 "btyacc_demo.tab.c"
break;
case 14:
#line 122 "btyacc_demo.y"
{ yyval.type = type_combine(yystack.l_mark[-2].type, yystack.l_mark[0].type); }
#line 1918 "btyacc_demo.tab.c"
break;
case 15:
#line 125 "btyacc_demo.y"
{ yyval.type = 0; }
#line 1923 "btyacc_demo.tab.c"
break;
case 16:
#line 126 "btyacc_demo.y"
{ yyval.type = type_combine(yystack.l_mark[-1].type, yystack.l_mark[0].type); }
#line 1928 "btyacc_demo.tab.c"
break;
case 17:
#line 130 "btyacc_demo.y"
{ yyval.type = yystack.l_mark[0].type; }
#line 1933 "btyacc_demo.tab.c"
break;
case 18:
#line 131 "btyacc_demo.y"
{ yyval.type = yystack.l_mark[0].type; }
#line 1938 "btyacc_demo.tab.c"
break;
case 19:
#line 132 "btyacc_demo.y"
{ yyval.type = bare_extern(); }
#line 1943 "btyacc_demo.tab.c"
break;
case 20:
#line 133 "btyacc_demo.y"
{ yyval.type = bare_register(); }
#line 1948 "btyacc_demo.tab.c"
break;
case 21:
#line 134 "btyacc_demo.y"
{ yyval.type = bare_static(); }
#line 1953 "btyacc_demo.tab.c"
break;
case 22:
#line 138 "btyacc_demo.y"
{ yyval.type = bare_const(); }
#line 1958 "btyacc_demo.tab.c"
break;
case 23:
#line 139 "btyacc_demo.y"
{ yyval.type = bare_volatile(); }
#line 1963 "btyacc_demo.tab.c"
break;
case 24:
#line 143 "btyacc_demo.y"
yyval.scope = yystack.l_mark[-3].scope;
#line 1968 "btyacc_demo.tab.c"
break;
case 25:
#line 143 "btyacc_demo.y"
yyval.type = yystack.l_mark[-3].type;
#line 1973 "btyacc_demo.tab.c"
break;
case 28:
#line 148 "btyacc_demo.y"
{ if (!yystack.l_mark[0].type) YYERROR; } if (!yytrial)
#line 149 "btyacc_demo.y"
{ yyval.decl = declare(yystack.l_mark[-1].scope, 0, yystack.l_mark[0].type); }
#line 1980 "btyacc_demo.tab.c"
break;
case 29:
if (!yytrial)
#line 150 "btyacc_demo.y"
{ yyval.decl = declare(yystack.l_mark[-2].scope, yystack.l_mark[0].id, yystack.l_mark[-1].type); }
#line 1986 "btyacc_demo.tab.c"
break;
case 30:
#line 151 "btyacc_demo.y"
yyval.scope = yystack.l_mark[-2].scope;
#line 1991 "btyacc_demo.tab.c"
break;
case 31:
#line 151 "btyacc_demo.y"
yyval.type = yystack.l_mark[-2].type;
#line 1996 "btyacc_demo.tab.c"
break;
case 32:
if (!yytrial)
#line 151 "btyacc_demo.y"
{ yyval.decl = yystack.l_mark[-1].decl; }
#line 2002 "btyacc_demo.tab.c"
break;
case 33:
if (!yytrial)
#line 153 "btyacc_demo.y"
{ yyval.decl = make_pointer(yystack.l_mark[0].decl, yystack.l_mark[-3].type); }
#line 2008 "btyacc_demo.tab.c"
break;
case 34:
if (!yytrial)
#line 155 "btyacc_demo.y"
{ yyval.decl = make_array(yystack.l_mark[-4].decl->type, yystack.l_mark[-1].expr); }
#line 2014 "btyacc_demo.tab.c"
break;
case 35:
if (!yytrial)
#line 157 "btyacc_demo.y"
{ yyval.decl = build_function(yystack.l_mark[-5].decl, yystack.l_mark[-2].dlist, yystack.l_mark[0].type); }
#line 2020 "btyacc_demo.tab.c"
break;
case 36:
if (!yytrial)
#line 160 "btyacc_demo.y"
{ yyval.dlist = 0; }
#line 2026 "btyacc_demo.tab.c"
break;
case 37:
if (!yytrial)
#line 161 "btyacc_demo.y"
{ yyval.dlist = yystack.l_mark[0].dlist; }
#line 2032 "btyacc_demo.tab.c"
break;
case 38:
if (!yytrial)
#line 164 "btyacc_demo.y"
{ yyval.dlist = append_dlist(yystack.l_mark[-3].dlist, yystack.l_mark[0].decl); }
#line 2038 "btyacc_demo.tab.c"
break;
case 39:
if (!yytrial)
#line 165 "btyacc_demo.y"
{ yyval.dlist = build_dlist(yystack.l_mark[0].decl); }
#line 2044 "btyacc_demo.tab.c"
break;
case 40:
if (!yytrial)
#line 168 "btyacc_demo.y"
{ yyval.decl = yystack.l_mark[0].decl; }
#line 2050 "btyacc_demo.tab.c"
break;
case 41:
if (!yytrial)
#line 172 "btyacc_demo.y"
{ yyval.expr = build_expr(yystack.l_mark[-3].expr, ADD, yystack.l_mark[0].expr); }
#line 2056 "btyacc_demo.tab.c"
break;
case 42:
if (!yytrial)
#line 173 "btyacc_demo.y"
{ yyval.expr = build_expr(yystack.l_mark[-3].expr, SUB, yystack.l_mark[0].expr); }
#line 2062 "btyacc_demo.tab.c"
break;
case 43:
if (!yytrial)
#line 174 "btyacc_demo.y"
{ yyval.expr = build_expr(yystack.l_mark[-3].expr, MUL, yystack.l_mark[0].expr); }
#line 2068 "btyacc_demo.tab.c"
break;
case 44:
if (!yytrial)
#line 175 "btyacc_demo.y"
{ yyval.expr = build_expr(yystack.l_mark[-3].expr, MOD, yystack.l_mark[0].expr); }
#line 2074 "btyacc_demo.tab.c"
break;
case 45:
if (!yytrial)
#line 176 "btyacc_demo.y"
{ yyval.expr = build_expr(yystack.l_mark[-3].expr, DIV, yystack.l_mark[0].expr); }
#line 2080 "btyacc_demo.tab.c"
break;
case 46:
if (!yytrial)
#line 177 "btyacc_demo.y"
{ yyval.expr = build_expr(0, DEREF, yystack.l_mark[0].expr); }
#line 2086 "btyacc_demo.tab.c"
break;
case 47:
if (!yytrial)
#line 178 "btyacc_demo.y"
{ yyval.expr = var_expr(yystack.l_mark[-1].scope, yystack.l_mark[0].id); }
#line 2092 "btyacc_demo.tab.c"
break;
case 48:
if (!yytrial)
#line 179 "btyacc_demo.y"
{ yyval.expr = yystack.l_mark[0].expr; }
#line 2098 "btyacc_demo.tab.c"
break;
case 49:
if (!yytrial)
#line 183 "btyacc_demo.y"
{ yyval.code = 0; }
#line 2104 "btyacc_demo.tab.c"
break;
case 50:
#line 184 "btyacc_demo.y"
{YYVALID;} if (!yytrial)
#line 184 "btyacc_demo.y"
{ yyval.code = build_expr_code(yystack.l_mark[-1].expr); }
#line 2111 "btyacc_demo.tab.c"
break;
case 51:
#line 185 "btyacc_demo.y"
yyval.scope = yystack.l_mark[-6].scope;
#line 2116 "btyacc_demo.tab.c"
break;
case 52:
#line 185 "btyacc_demo.y"
yyval.scope = yystack.l_mark[-9].scope;
#line 2121 "btyacc_demo.tab.c"
break;
case 53:
#line 185 "btyacc_demo.y"
{YYVALID;} if (!yytrial)
#line 186 "btyacc_demo.y"
{ yyval.code = build_if(yystack.l_mark[-7].expr, yystack.l_mark[-3].code, yystack.l_mark[0].code); }
#line 2128 "btyacc_demo.tab.c"
break;
case 54:
#line 187 "btyacc_demo.y"
{YYVALID;} if (!yytrial)
#line 188 "btyacc_demo.y"
{ yyval.code = build_if(yystack.l_mark[-4].expr, yystack.l_mark[0].code, 0); }
#line 2135 "btyacc_demo.tab.c"
break;
case 55:
#line 189 "btyacc_demo.y"
yyval.scope = new_scope(yystack.l_mark[0].scope);
#line 2140 "btyacc_demo.tab.c"
break;
case 56:
#line 189 "btyacc_demo.y"
{YYVALID;} if (!yytrial)
#line 189 "btyacc_demo.y"
{ yyval.code = yystack.l_mark[0].code; }
#line 2147 "btyacc_demo.tab.c"
break;
case 57:
if (!yytrial)
#line 192 "btyacc_demo.y"
{ yyval.code = 0; }
#line 2153 "btyacc_demo.tab.c"
break;
case 58:
if (!yytrial)
#line 193 "btyacc_demo.y"
{ yyval.code = code_append(yystack.l_mark[-2].code, yystack.l_mark[0].code); }
#line 2159 "btyacc_demo.tab.c"
break;
case 59:
if (!yytrial)
#line 197 "btyacc_demo.y"
{ yyval.code = yystack.l_mark[-1].code; }
#line 2165 "btyacc_demo.tab.c"
break;
#line 2113 "btyacc_demo.tab.c"
#line 2167 "btyacc_demo.tab.c"
default:
break;
}

View File

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

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -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_destroy1.y"
typedef union
typedef union YYSTYPE
{
class cval;
type tval;
@ -507,8 +507,8 @@ YYDESTRUCT_DECL()
free(pp->s); free(pp);
}
}
#line 511 "btyacc_destroy1.tab.c"
break;
#line 512 "btyacc_destroy1.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -674,7 +674,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1186,31 +1186,37 @@ case 1:
if (!yytrial)
#line 62 "btyacc_destroy1.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
#line 1190 "btyacc_destroy1.tab.c"
break;
case 2:
if (!yytrial)
#line 64 "btyacc_destroy1.y"
{ yyval.nlist = yystack.l_mark[-3].nlist; }
#line 1196 "btyacc_destroy1.tab.c"
break;
case 3:
if (!yytrial)
#line 67 "btyacc_destroy1.y"
{ yyval.cval = cGLOBAL; }
#line 1202 "btyacc_destroy1.tab.c"
break;
case 4:
if (!yytrial)
#line 68 "btyacc_destroy1.y"
{ yyval.cval = cLOCAL; }
#line 1208 "btyacc_destroy1.tab.c"
break;
case 5:
if (!yytrial)
#line 71 "btyacc_destroy1.y"
{ yyval.tval = tREAL; }
#line 1214 "btyacc_destroy1.tab.c"
break;
case 6:
if (!yytrial)
#line 72 "btyacc_destroy1.y"
{ yyval.tval = tINTEGER; }
#line 1220 "btyacc_destroy1.tab.c"
break;
case 7:
if (!yytrial)
@ -1218,6 +1224,7 @@ case 7:
{ yyval.nlist->s = mksymbol(yystack.l_mark[-2].tval, yystack.l_mark[-2].cval, yystack.l_mark[0].id);
yyval.nlist->next = yystack.l_mark[-1].nlist;
}
#line 1228 "btyacc_destroy1.tab.c"
break;
case 8:
if (!yytrial)
@ -1225,13 +1232,15 @@ case 8:
{ yyval.nlist->s = mksymbol(0, 0, yystack.l_mark[0].id);
yyval.nlist->next = NULL;
}
#line 1236 "btyacc_destroy1.tab.c"
break;
case 9:
if (!yytrial)
#line 86 "btyacc_destroy1.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
#line 1242 "btyacc_destroy1.tab.c"
break;
#line 1235 "btyacc_destroy1.tab.c"
#line 1244 "btyacc_destroy1.tab.c"
default:
break;
}

View File

@ -12,7 +12,7 @@
#endif
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
typedef union
typedef union YYSTYPE
{
class cval;
type tval;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -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;
@ -507,8 +507,8 @@ YYDESTRUCT_DECL()
free(pp->s); free(pp);
}
}
#line 511 "btyacc_destroy2.tab.c"
break;
#line 512 "btyacc_destroy2.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -674,7 +674,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1186,31 +1186,37 @@ case 1:
if (!yytrial)
#line 62 "btyacc_destroy2.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
#line 1190 "btyacc_destroy2.tab.c"
break;
case 2:
if (!yytrial)
#line 64 "btyacc_destroy2.y"
{ yyval.nlist = yystack.l_mark[-3].nlist; }
#line 1196 "btyacc_destroy2.tab.c"
break;
case 3:
if (!yytrial)
#line 67 "btyacc_destroy2.y"
{ yyval.cval = cGLOBAL; }
#line 1202 "btyacc_destroy2.tab.c"
break;
case 4:
if (!yytrial)
#line 68 "btyacc_destroy2.y"
{ yyval.cval = cLOCAL; }
#line 1208 "btyacc_destroy2.tab.c"
break;
case 5:
if (!yytrial)
#line 71 "btyacc_destroy2.y"
{ yyval.tval = tREAL; }
#line 1214 "btyacc_destroy2.tab.c"
break;
case 6:
if (!yytrial)
#line 72 "btyacc_destroy2.y"
{ yyval.tval = tINTEGER; }
#line 1220 "btyacc_destroy2.tab.c"
break;
case 7:
if (!yytrial)
@ -1218,6 +1224,7 @@ case 7:
{ yyval.nlist->s = mksymbol(yystack.l_mark[-2].tval, yystack.l_mark[-2].cval, yystack.l_mark[0].id);
yyval.nlist->next = yystack.l_mark[-1].nlist;
}
#line 1228 "btyacc_destroy2.tab.c"
break;
case 8:
if (!yytrial)
@ -1225,13 +1232,15 @@ case 8:
{ yyval.nlist->s = mksymbol(0, 0, yystack.l_mark[0].id);
yyval.nlist->next = NULL;
}
#line 1236 "btyacc_destroy2.tab.c"
break;
case 9:
if (!yytrial)
#line 86 "btyacc_destroy2.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
#line 1242 "btyacc_destroy2.tab.c"
break;
#line 1235 "btyacc_destroy2.tab.c"
#line 1244 "btyacc_destroy2.tab.c"
default:
break;
}

View File

@ -12,7 +12,7 @@
#endif
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
typedef union
typedef union YYSTYPE
{
class cval;
type tval;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -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;
@ -507,8 +507,8 @@ YYDESTRUCT_DECL()
free(pp->s); free(pp);
}
}
#line 511 "btyacc_destroy3.tab.c"
break;
#line 512 "btyacc_destroy3.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -674,7 +674,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1186,31 +1186,37 @@ case 1:
if (!yytrial)
#line 65 "btyacc_destroy3.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
#line 1190 "btyacc_destroy3.tab.c"
break;
case 2:
if (!yytrial)
#line 67 "btyacc_destroy3.y"
{ yyval.nlist = yystack.l_mark[-3].nlist; }
#line 1196 "btyacc_destroy3.tab.c"
break;
case 3:
if (!yytrial)
#line 70 "btyacc_destroy3.y"
{ yyval.cval = cGLOBAL; }
#line 1202 "btyacc_destroy3.tab.c"
break;
case 4:
if (!yytrial)
#line 71 "btyacc_destroy3.y"
{ yyval.cval = cLOCAL; }
#line 1208 "btyacc_destroy3.tab.c"
break;
case 5:
if (!yytrial)
#line 74 "btyacc_destroy3.y"
{ yyval.tval = tREAL; }
#line 1214 "btyacc_destroy3.tab.c"
break;
case 6:
if (!yytrial)
#line 75 "btyacc_destroy3.y"
{ yyval.tval = tINTEGER; }
#line 1220 "btyacc_destroy3.tab.c"
break;
case 7:
if (!yytrial)
@ -1218,6 +1224,7 @@ case 7:
{ yyval.nlist->s = mksymbol(yystack.l_mark[-2].tval, yystack.l_mark[-2].cval, yystack.l_mark[0].id);
yyval.nlist->next = yystack.l_mark[-1].nlist;
}
#line 1228 "btyacc_destroy3.tab.c"
break;
case 8:
if (!yytrial)
@ -1225,13 +1232,15 @@ case 8:
{ yyval.nlist->s = mksymbol(0, 0, yystack.l_mark[0].id);
yyval.nlist->next = NULL;
}
#line 1236 "btyacc_destroy3.tab.c"
break;
case 9:
if (!yytrial)
#line 89 "btyacc_destroy3.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
#line 1242 "btyacc_destroy3.tab.c"
break;
#line 1235 "btyacc_destroy3.tab.c"
#line 1244 "btyacc_destroy3.tab.c"
default:
break;
}

View File

@ -12,7 +12,7 @@
#endif
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
typedef union
typedef union YYSTYPE
{
class cval;
type tval;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -669,7 +669,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1180,64 +1180,79 @@ YYPARSE_DECL()
case 3:
#line 28 "calc.y"
{ yyerrok ; }
#line 1184 "calc.tab.c"
break;
case 4:
#line 32 "calc.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1189 "calc.tab.c"
break;
case 5:
#line 34 "calc.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1194 "calc.tab.c"
break;
case 6:
#line 38 "calc.y"
{ yyval = yystack.l_mark[-1]; }
#line 1199 "calc.tab.c"
break;
case 7:
#line 40 "calc.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1204 "calc.tab.c"
break;
case 8:
#line 42 "calc.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1209 "calc.tab.c"
break;
case 9:
#line 44 "calc.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1214 "calc.tab.c"
break;
case 10:
#line 46 "calc.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1219 "calc.tab.c"
break;
case 11:
#line 48 "calc.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1224 "calc.tab.c"
break;
case 12:
#line 50 "calc.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1229 "calc.tab.c"
break;
case 13:
#line 52 "calc.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1234 "calc.tab.c"
break;
case 14:
#line 54 "calc.y"
{ yyval = - yystack.l_mark[0]; }
#line 1239 "calc.tab.c"
break;
case 15:
#line 56 "calc.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1244 "calc.tab.c"
break;
case 17:
#line 61 "calc.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1249 "calc.tab.c"
break;
case 18:
#line 63 "calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1254 "calc.tab.c"
break;
#line 1241 "calc.tab.c"
#line 1256 "calc.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -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;
@ -813,7 +813,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1326,78 +1326,91 @@ case 3:
{
(void) printf("%15.8f\n", yystack.l_mark[-1].dval);
}
#line 1330 "calc1.tab.c"
break;
case 4:
#line 61 "calc1.y"
{
(void) printf("(%15.8f, %15.8f)\n", yystack.l_mark[-1].vval.lo, yystack.l_mark[-1].vval.hi);
}
#line 1337 "calc1.tab.c"
break;
case 5:
#line 65 "calc1.y"
{
dreg[yystack.l_mark[-3].ival] = yystack.l_mark[-1].dval;
}
#line 1344 "calc1.tab.c"
break;
case 6:
#line 69 "calc1.y"
{
vreg[yystack.l_mark[-3].ival] = yystack.l_mark[-1].vval;
}
#line 1351 "calc1.tab.c"
break;
case 7:
#line 73 "calc1.y"
{
yyerrok;
}
#line 1358 "calc1.tab.c"
break;
case 9:
#line 80 "calc1.y"
{
yyval.dval = dreg[yystack.l_mark[0].ival];
}
#line 1365 "calc1.tab.c"
break;
case 10:
#line 84 "calc1.y"
{
yyval.dval = yystack.l_mark[-2].dval + yystack.l_mark[0].dval;
}
#line 1372 "calc1.tab.c"
break;
case 11:
#line 88 "calc1.y"
{
yyval.dval = yystack.l_mark[-2].dval - yystack.l_mark[0].dval;
}
#line 1379 "calc1.tab.c"
break;
case 12:
#line 92 "calc1.y"
{
yyval.dval = yystack.l_mark[-2].dval * yystack.l_mark[0].dval;
}
#line 1386 "calc1.tab.c"
break;
case 13:
#line 96 "calc1.y"
{
yyval.dval = yystack.l_mark[-2].dval / yystack.l_mark[0].dval;
}
#line 1393 "calc1.tab.c"
break;
case 14:
#line 100 "calc1.y"
{
yyval.dval = -yystack.l_mark[0].dval;
}
#line 1400 "calc1.tab.c"
break;
case 15:
#line 104 "calc1.y"
{
yyval.dval = yystack.l_mark[-1].dval;
}
#line 1407 "calc1.tab.c"
break;
case 16:
#line 110 "calc1.y"
{
yyval.vval.hi = yyval.vval.lo = yystack.l_mark[0].dval;
}
#line 1414 "calc1.tab.c"
break;
case 17:
#line 114 "calc1.y"
@ -1410,12 +1423,14 @@ case 17:
YYERROR;
}
}
#line 1427 "calc1.tab.c"
break;
case 18:
#line 124 "calc1.y"
{
yyval.vval = vreg[yystack.l_mark[0].ival];
}
#line 1434 "calc1.tab.c"
break;
case 19:
#line 128 "calc1.y"
@ -1423,6 +1438,7 @@ case 19:
yyval.vval.hi = yystack.l_mark[-2].vval.hi + yystack.l_mark[0].vval.hi;
yyval.vval.lo = yystack.l_mark[-2].vval.lo + yystack.l_mark[0].vval.lo;
}
#line 1442 "calc1.tab.c"
break;
case 20:
#line 133 "calc1.y"
@ -1430,6 +1446,7 @@ case 20:
yyval.vval.hi = yystack.l_mark[-2].dval + yystack.l_mark[0].vval.hi;
yyval.vval.lo = yystack.l_mark[-2].dval + yystack.l_mark[0].vval.lo;
}
#line 1450 "calc1.tab.c"
break;
case 21:
#line 138 "calc1.y"
@ -1437,6 +1454,7 @@ case 21:
yyval.vval.hi = yystack.l_mark[-2].vval.hi - yystack.l_mark[0].vval.lo;
yyval.vval.lo = yystack.l_mark[-2].vval.lo - yystack.l_mark[0].vval.hi;
}
#line 1458 "calc1.tab.c"
break;
case 22:
#line 143 "calc1.y"
@ -1444,18 +1462,21 @@ case 22:
yyval.vval.hi = yystack.l_mark[-2].dval - yystack.l_mark[0].vval.lo;
yyval.vval.lo = yystack.l_mark[-2].dval - yystack.l_mark[0].vval.hi;
}
#line 1466 "calc1.tab.c"
break;
case 23:
#line 148 "calc1.y"
{
yyval.vval = vmul( yystack.l_mark[-2].vval.lo, yystack.l_mark[-2].vval.hi, yystack.l_mark[0].vval );
}
#line 1473 "calc1.tab.c"
break;
case 24:
#line 152 "calc1.y"
{
yyval.vval = vmul (yystack.l_mark[-2].dval, yystack.l_mark[-2].dval, yystack.l_mark[0].vval );
}
#line 1480 "calc1.tab.c"
break;
case 25:
#line 156 "calc1.y"
@ -1463,6 +1484,7 @@ case 25:
if (dcheck(yystack.l_mark[0].vval)) YYERROR;
yyval.vval = vdiv ( yystack.l_mark[-2].vval.lo, yystack.l_mark[-2].vval.hi, yystack.l_mark[0].vval );
}
#line 1488 "calc1.tab.c"
break;
case 26:
#line 161 "calc1.y"
@ -1470,6 +1492,7 @@ case 26:
if (dcheck ( yystack.l_mark[0].vval )) YYERROR;
yyval.vval = vdiv (yystack.l_mark[-2].dval, yystack.l_mark[-2].dval, yystack.l_mark[0].vval );
}
#line 1496 "calc1.tab.c"
break;
case 27:
#line 166 "calc1.y"
@ -1477,14 +1500,16 @@ case 27:
yyval.vval.hi = -yystack.l_mark[0].vval.lo;
yyval.vval.lo = -yystack.l_mark[0].vval.hi;
}
#line 1504 "calc1.tab.c"
break;
case 28:
#line 171 "calc1.y"
{
yyval.vval = yystack.l_mark[-1].vval;
}
#line 1511 "calc1.tab.c"
break;
#line 1488 "calc1.tab.c"
#line 1513 "calc1.tab.c"
default:
break;
}

View File

@ -11,7 +11,7 @@
#endif
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
typedef union
typedef union YYSTYPE
{
int ival;
double dval;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -682,7 +682,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1193,64 +1193,79 @@ YYPARSE_DECL()
case 3:
#line 35 "calc2.y"
{ yyerrok ; }
#line 1197 "calc2.tab.c"
break;
case 4:
#line 39 "calc2.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1202 "calc2.tab.c"
break;
case 5:
#line 41 "calc2.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1207 "calc2.tab.c"
break;
case 6:
#line 45 "calc2.y"
{ yyval = yystack.l_mark[-1]; }
#line 1212 "calc2.tab.c"
break;
case 7:
#line 47 "calc2.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1217 "calc2.tab.c"
break;
case 8:
#line 49 "calc2.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1222 "calc2.tab.c"
break;
case 9:
#line 51 "calc2.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1227 "calc2.tab.c"
break;
case 10:
#line 53 "calc2.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1232 "calc2.tab.c"
break;
case 11:
#line 55 "calc2.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1237 "calc2.tab.c"
break;
case 12:
#line 57 "calc2.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1242 "calc2.tab.c"
break;
case 13:
#line 59 "calc2.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1247 "calc2.tab.c"
break;
case 14:
#line 61 "calc2.y"
{ yyval = - yystack.l_mark[0]; }
#line 1252 "calc2.tab.c"
break;
case 15:
#line 63 "calc2.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1257 "calc2.tab.c"
break;
case 17:
#line 68 "calc2.y"
{ yyval = yystack.l_mark[0]; (*base) = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1262 "calc2.tab.c"
break;
case 18:
#line 70 "calc2.y"
{ yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1267 "calc2.tab.c"
break;
#line 1254 "calc2.tab.c"
#line 1269 "calc2.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -696,7 +696,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1207,64 +1207,79 @@ YYPARSE_DECL()
case 3:
#line 38 "calc3.y"
{ yyerrok ; }
#line 1211 "calc3.tab.c"
break;
case 4:
#line 42 "calc3.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1216 "calc3.tab.c"
break;
case 5:
#line 44 "calc3.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1221 "calc3.tab.c"
break;
case 6:
#line 48 "calc3.y"
{ yyval = yystack.l_mark[-1]; }
#line 1226 "calc3.tab.c"
break;
case 7:
#line 50 "calc3.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1231 "calc3.tab.c"
break;
case 8:
#line 52 "calc3.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1236 "calc3.tab.c"
break;
case 9:
#line 54 "calc3.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1241 "calc3.tab.c"
break;
case 10:
#line 56 "calc3.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1246 "calc3.tab.c"
break;
case 11:
#line 58 "calc3.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1251 "calc3.tab.c"
break;
case 12:
#line 60 "calc3.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1256 "calc3.tab.c"
break;
case 13:
#line 62 "calc3.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1261 "calc3.tab.c"
break;
case 14:
#line 64 "calc3.y"
{ yyval = - yystack.l_mark[0]; }
#line 1266 "calc3.tab.c"
break;
case 15:
#line 66 "calc3.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1271 "calc3.tab.c"
break;
case 17:
#line 71 "calc3.y"
{ yyval = yystack.l_mark[0]; (*base) = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1276 "calc3.tab.c"
break;
case 18:
#line 73 "calc3.y"
{ yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1281 "calc3.tab.c"
break;
#line 1268 "calc3.tab.c"
#line 1283 "calc3.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -697,7 +697,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1208,64 +1208,79 @@ YYPARSE_DECL()
case 3:
#line 35 "calc_code_all.y"
{ yyerrok ; }
#line 1212 "calc_code_all.tab.c"
break;
case 4:
#line 39 "calc_code_all.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1217 "calc_code_all.tab.c"
break;
case 5:
#line 41 "calc_code_all.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1222 "calc_code_all.tab.c"
break;
case 6:
#line 45 "calc_code_all.y"
{ yyval = yystack.l_mark[-1]; }
#line 1227 "calc_code_all.tab.c"
break;
case 7:
#line 47 "calc_code_all.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1232 "calc_code_all.tab.c"
break;
case 8:
#line 49 "calc_code_all.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1237 "calc_code_all.tab.c"
break;
case 9:
#line 51 "calc_code_all.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1242 "calc_code_all.tab.c"
break;
case 10:
#line 53 "calc_code_all.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1247 "calc_code_all.tab.c"
break;
case 11:
#line 55 "calc_code_all.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1252 "calc_code_all.tab.c"
break;
case 12:
#line 57 "calc_code_all.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1257 "calc_code_all.tab.c"
break;
case 13:
#line 59 "calc_code_all.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1262 "calc_code_all.tab.c"
break;
case 14:
#line 61 "calc_code_all.y"
{ yyval = - yystack.l_mark[0]; }
#line 1267 "calc_code_all.tab.c"
break;
case 15:
#line 63 "calc_code_all.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1272 "calc_code_all.tab.c"
break;
case 17:
#line 68 "calc_code_all.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1277 "calc_code_all.tab.c"
break;
case 18:
#line 70 "calc_code_all.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1282 "calc_code_all.tab.c"
break;
#line 1269 "calc_code_all.tab.c"
#line 1284 "calc_code_all.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -677,7 +677,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1188,64 +1188,79 @@ YYPARSE_DECL()
case 3:
#line 31 "calc_code_default.y"
{ yyerrok ; }
#line 1192 "calc_code_default.tab.c"
break;
case 4:
#line 35 "calc_code_default.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1197 "calc_code_default.tab.c"
break;
case 5:
#line 37 "calc_code_default.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1202 "calc_code_default.tab.c"
break;
case 6:
#line 41 "calc_code_default.y"
{ yyval = yystack.l_mark[-1]; }
#line 1207 "calc_code_default.tab.c"
break;
case 7:
#line 43 "calc_code_default.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1212 "calc_code_default.tab.c"
break;
case 8:
#line 45 "calc_code_default.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1217 "calc_code_default.tab.c"
break;
case 9:
#line 47 "calc_code_default.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1222 "calc_code_default.tab.c"
break;
case 10:
#line 49 "calc_code_default.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1227 "calc_code_default.tab.c"
break;
case 11:
#line 51 "calc_code_default.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1232 "calc_code_default.tab.c"
break;
case 12:
#line 53 "calc_code_default.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1237 "calc_code_default.tab.c"
break;
case 13:
#line 55 "calc_code_default.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1242 "calc_code_default.tab.c"
break;
case 14:
#line 57 "calc_code_default.y"
{ yyval = - yystack.l_mark[0]; }
#line 1247 "calc_code_default.tab.c"
break;
case 15:
#line 59 "calc_code_default.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1252 "calc_code_default.tab.c"
break;
case 17:
#line 64 "calc_code_default.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1257 "calc_code_default.tab.c"
break;
case 18:
#line 66 "calc_code_default.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1262 "calc_code_default.tab.c"
break;
#line 1249 "calc_code_default.tab.c"
#line 1264 "calc_code_default.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -669,7 +669,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1180,64 +1180,79 @@ YYPARSE_DECL()
case 3:
#line 31 "calc_code_imports.y"
{ yyerrok ; }
#line 1184 "calc_code_imports.tab.c"
break;
case 4:
#line 35 "calc_code_imports.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1189 "calc_code_imports.tab.c"
break;
case 5:
#line 37 "calc_code_imports.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1194 "calc_code_imports.tab.c"
break;
case 6:
#line 41 "calc_code_imports.y"
{ yyval = yystack.l_mark[-1]; }
#line 1199 "calc_code_imports.tab.c"
break;
case 7:
#line 43 "calc_code_imports.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1204 "calc_code_imports.tab.c"
break;
case 8:
#line 45 "calc_code_imports.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1209 "calc_code_imports.tab.c"
break;
case 9:
#line 47 "calc_code_imports.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1214 "calc_code_imports.tab.c"
break;
case 10:
#line 49 "calc_code_imports.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1219 "calc_code_imports.tab.c"
break;
case 11:
#line 51 "calc_code_imports.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1224 "calc_code_imports.tab.c"
break;
case 12:
#line 53 "calc_code_imports.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1229 "calc_code_imports.tab.c"
break;
case 13:
#line 55 "calc_code_imports.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1234 "calc_code_imports.tab.c"
break;
case 14:
#line 57 "calc_code_imports.y"
{ yyval = - yystack.l_mark[0]; }
#line 1239 "calc_code_imports.tab.c"
break;
case 15:
#line 59 "calc_code_imports.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1244 "calc_code_imports.tab.c"
break;
case 17:
#line 64 "calc_code_imports.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1249 "calc_code_imports.tab.c"
break;
case 18:
#line 66 "calc_code_imports.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1254 "calc_code_imports.tab.c"
break;
#line 1241 "calc_code_imports.tab.c"
#line 1256 "calc_code_imports.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -677,7 +677,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1188,64 +1188,79 @@ YYPARSE_DECL()
case 3:
#line 31 "calc_code_provides.y"
{ yyerrok ; }
#line 1192 "calc_code_provides.tab.c"
break;
case 4:
#line 35 "calc_code_provides.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1197 "calc_code_provides.tab.c"
break;
case 5:
#line 37 "calc_code_provides.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1202 "calc_code_provides.tab.c"
break;
case 6:
#line 41 "calc_code_provides.y"
{ yyval = yystack.l_mark[-1]; }
#line 1207 "calc_code_provides.tab.c"
break;
case 7:
#line 43 "calc_code_provides.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1212 "calc_code_provides.tab.c"
break;
case 8:
#line 45 "calc_code_provides.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1217 "calc_code_provides.tab.c"
break;
case 9:
#line 47 "calc_code_provides.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1222 "calc_code_provides.tab.c"
break;
case 10:
#line 49 "calc_code_provides.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1227 "calc_code_provides.tab.c"
break;
case 11:
#line 51 "calc_code_provides.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1232 "calc_code_provides.tab.c"
break;
case 12:
#line 53 "calc_code_provides.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1237 "calc_code_provides.tab.c"
break;
case 13:
#line 55 "calc_code_provides.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1242 "calc_code_provides.tab.c"
break;
case 14:
#line 57 "calc_code_provides.y"
{ yyval = - yystack.l_mark[0]; }
#line 1247 "calc_code_provides.tab.c"
break;
case 15:
#line 59 "calc_code_provides.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1252 "calc_code_provides.tab.c"
break;
case 17:
#line 64 "calc_code_provides.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1257 "calc_code_provides.tab.c"
break;
case 18:
#line 66 "calc_code_provides.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1262 "calc_code_provides.tab.c"
break;
#line 1249 "calc_code_provides.tab.c"
#line 1264 "calc_code_provides.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -677,7 +677,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1188,64 +1188,79 @@ YYPARSE_DECL()
case 3:
#line 31 "calc_code_requires.y"
{ yyerrok ; }
#line 1192 "calc_code_requires.tab.c"
break;
case 4:
#line 35 "calc_code_requires.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1197 "calc_code_requires.tab.c"
break;
case 5:
#line 37 "calc_code_requires.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1202 "calc_code_requires.tab.c"
break;
case 6:
#line 41 "calc_code_requires.y"
{ yyval = yystack.l_mark[-1]; }
#line 1207 "calc_code_requires.tab.c"
break;
case 7:
#line 43 "calc_code_requires.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1212 "calc_code_requires.tab.c"
break;
case 8:
#line 45 "calc_code_requires.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1217 "calc_code_requires.tab.c"
break;
case 9:
#line 47 "calc_code_requires.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1222 "calc_code_requires.tab.c"
break;
case 10:
#line 49 "calc_code_requires.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1227 "calc_code_requires.tab.c"
break;
case 11:
#line 51 "calc_code_requires.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1232 "calc_code_requires.tab.c"
break;
case 12:
#line 53 "calc_code_requires.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1237 "calc_code_requires.tab.c"
break;
case 13:
#line 55 "calc_code_requires.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1242 "calc_code_requires.tab.c"
break;
case 14:
#line 57 "calc_code_requires.y"
{ yyval = - yystack.l_mark[0]; }
#line 1247 "calc_code_requires.tab.c"
break;
case 15:
#line 59 "calc_code_requires.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1252 "calc_code_requires.tab.c"
break;
case 17:
#line 64 "calc_code_requires.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1257 "calc_code_requires.tab.c"
break;
case 18:
#line 66 "calc_code_requires.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1262 "calc_code_requires.tab.c"
break;
#line 1249 "calc_code_requires.tab.c"
#line 1264 "calc_code_requires.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -677,7 +677,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1188,64 +1188,79 @@ YYPARSE_DECL()
case 3:
#line 31 "calc_code_top.y"
{ yyerrok ; }
#line 1192 "calc_code_top.tab.c"
break;
case 4:
#line 35 "calc_code_top.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1197 "calc_code_top.tab.c"
break;
case 5:
#line 37 "calc_code_top.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1202 "calc_code_top.tab.c"
break;
case 6:
#line 41 "calc_code_top.y"
{ yyval = yystack.l_mark[-1]; }
#line 1207 "calc_code_top.tab.c"
break;
case 7:
#line 43 "calc_code_top.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1212 "calc_code_top.tab.c"
break;
case 8:
#line 45 "calc_code_top.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1217 "calc_code_top.tab.c"
break;
case 9:
#line 47 "calc_code_top.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1222 "calc_code_top.tab.c"
break;
case 10:
#line 49 "calc_code_top.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1227 "calc_code_top.tab.c"
break;
case 11:
#line 51 "calc_code_top.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1232 "calc_code_top.tab.c"
break;
case 12:
#line 53 "calc_code_top.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1237 "calc_code_top.tab.c"
break;
case 13:
#line 55 "calc_code_top.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1242 "calc_code_top.tab.c"
break;
case 14:
#line 57 "calc_code_top.y"
{ yyval = - yystack.l_mark[0]; }
#line 1247 "calc_code_top.tab.c"
break;
case 15:
#line 59 "calc_code_top.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1252 "calc_code_top.tab.c"
break;
case 17:
#line 64 "calc_code_top.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1257 "calc_code_top.tab.c"
break;
case 18:
#line 66 "calc_code_top.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1262 "calc_code_top.tab.c"
break;
#line 1249 "calc_code_top.tab.c"
#line 1264 "calc_code_top.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -542,7 +542,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1053,64 +1053,79 @@ YYPARSE_DECL()
case 3:
#line 32 "code_calc.y"
{ yyerrok ; }
#line 1057 "code_calc.code.c"
break;
case 4:
#line 36 "code_calc.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1062 "code_calc.code.c"
break;
case 5:
#line 38 "code_calc.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1067 "code_calc.code.c"
break;
case 6:
#line 42 "code_calc.y"
{ yyval = yystack.l_mark[-1]; }
#line 1072 "code_calc.code.c"
break;
case 7:
#line 44 "code_calc.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1077 "code_calc.code.c"
break;
case 8:
#line 46 "code_calc.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1082 "code_calc.code.c"
break;
case 9:
#line 48 "code_calc.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1087 "code_calc.code.c"
break;
case 10:
#line 50 "code_calc.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1092 "code_calc.code.c"
break;
case 11:
#line 52 "code_calc.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1097 "code_calc.code.c"
break;
case 12:
#line 54 "code_calc.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1102 "code_calc.code.c"
break;
case 13:
#line 56 "code_calc.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1107 "code_calc.code.c"
break;
case 14:
#line 58 "code_calc.y"
{ yyval = - yystack.l_mark[0]; }
#line 1112 "code_calc.code.c"
break;
case 15:
#line 60 "code_calc.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1117 "code_calc.code.c"
break;
case 17:
#line 65 "code_calc.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1122 "code_calc.code.c"
break;
case 18:
#line 67 "code_calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1127 "code_calc.code.c"
break;
#line 1114 "code_calc.code.c"
#line 1129 "code_calc.code.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -512,7 +512,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -576,7 +576,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1087,64 +1087,79 @@ YYPARSE_DECL()
case 3:
#line 28 "calc.y"
{ yyerrok ; }
#line 1091 "y.tab.c"
break;
case 4:
#line 32 "calc.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1096 "y.tab.c"
break;
case 5:
#line 34 "calc.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1101 "y.tab.c"
break;
case 6:
#line 38 "calc.y"
{ yyval = yystack.l_mark[-1]; }
#line 1106 "y.tab.c"
break;
case 7:
#line 40 "calc.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1111 "y.tab.c"
break;
case 8:
#line 42 "calc.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1116 "y.tab.c"
break;
case 9:
#line 44 "calc.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1121 "y.tab.c"
break;
case 10:
#line 46 "calc.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1126 "y.tab.c"
break;
case 11:
#line 48 "calc.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1131 "y.tab.c"
break;
case 12:
#line 50 "calc.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1136 "y.tab.c"
break;
case 13:
#line 52 "calc.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1141 "y.tab.c"
break;
case 14:
#line 54 "calc.y"
{ yyval = - yystack.l_mark[0]; }
#line 1146 "y.tab.c"
break;
case 15:
#line 56 "calc.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1151 "y.tab.c"
break;
case 17:
#line 61 "calc.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1156 "y.tab.c"
break;
case 18:
#line 63 "calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1161 "y.tab.c"
break;
#line 1148 "y.tab.c"
#line 1163 "y.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -576,7 +576,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1087,64 +1087,79 @@ YYPARSE_DECL()
case 3:
#line 28 "calc.y"
{ yyerrok ; }
#line 1091 "y.tab.c"
break;
case 4:
#line 32 "calc.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1096 "y.tab.c"
break;
case 5:
#line 34 "calc.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1101 "y.tab.c"
break;
case 6:
#line 38 "calc.y"
{ yyval = yystack.l_mark[-1]; }
#line 1106 "y.tab.c"
break;
case 7:
#line 40 "calc.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1111 "y.tab.c"
break;
case 8:
#line 42 "calc.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1116 "y.tab.c"
break;
case 9:
#line 44 "calc.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1121 "y.tab.c"
break;
case 10:
#line 46 "calc.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1126 "y.tab.c"
break;
case 11:
#line 48 "calc.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1131 "y.tab.c"
break;
case 12:
#line 50 "calc.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1136 "y.tab.c"
break;
case 13:
#line 52 "calc.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1141 "y.tab.c"
break;
case 14:
#line 54 "calc.y"
{ yyval = - yystack.l_mark[0]; }
#line 1146 "y.tab.c"
break;
case 15:
#line 56 "calc.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1151 "y.tab.c"
break;
case 17:
#line 61 "calc.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1156 "y.tab.c"
break;
case 18:
#line 63 "calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1161 "y.tab.c"
break;
#line 1148 "y.tab.c"
#line 1163 "y.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -576,7 +576,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1087,64 +1087,79 @@ YYPARSE_DECL()
case 3:
#line 28 "calc.y"
{ yyerrok ; }
#line 1091 "prefix.tab.c"
break;
case 4:
#line 32 "calc.y"
{ printf("%d\n",yystack.l_mark[0]);}
#line 1096 "prefix.tab.c"
break;
case 5:
#line 34 "calc.y"
{ regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
#line 1101 "prefix.tab.c"
break;
case 6:
#line 38 "calc.y"
{ yyval = yystack.l_mark[-1]; }
#line 1106 "prefix.tab.c"
break;
case 7:
#line 40 "calc.y"
{ yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
#line 1111 "prefix.tab.c"
break;
case 8:
#line 42 "calc.y"
{ yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
#line 1116 "prefix.tab.c"
break;
case 9:
#line 44 "calc.y"
{ yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
#line 1121 "prefix.tab.c"
break;
case 10:
#line 46 "calc.y"
{ yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
#line 1126 "prefix.tab.c"
break;
case 11:
#line 48 "calc.y"
{ yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
#line 1131 "prefix.tab.c"
break;
case 12:
#line 50 "calc.y"
{ yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
#line 1136 "prefix.tab.c"
break;
case 13:
#line 52 "calc.y"
{ yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
#line 1141 "prefix.tab.c"
break;
case 14:
#line 54 "calc.y"
{ yyval = - yystack.l_mark[0]; }
#line 1146 "prefix.tab.c"
break;
case 15:
#line 56 "calc.y"
{ yyval = regs[yystack.l_mark[0]]; }
#line 1151 "prefix.tab.c"
break;
case 17:
#line 61 "calc.y"
{ yyval = yystack.l_mark[0]; base = (yystack.l_mark[0]==0) ? 8 : 10; }
#line 1156 "prefix.tab.c"
break;
case 18:
#line 63 "calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
#line 1161 "prefix.tab.c"
break;
#line 1148 "prefix.tab.c"
#line 1163 "prefix.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -531,7 +531,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -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;
@ -440,8 +440,8 @@ YYDESTRUCT_DECL()
free(pp->s); free(pp);
}
}
#line 444 "err_inherit3.tab.c"
break;
#line 445 "err_inherit3.tab.c"
case 264:
#line 30 "err_inherit3.y"
{
@ -452,8 +452,8 @@ YYDESTRUCT_DECL()
free(pp->s); free(pp);
}
}
#line 456 "err_inherit3.tab.c"
break;
#line 457 "err_inherit3.tab.c"
case 265:
#line 30 "err_inherit3.y"
{
@ -464,8 +464,8 @@ YYDESTRUCT_DECL()
free(pp->s); free(pp);
}
}
#line 468 "err_inherit3.tab.c"
break;
#line 469 "err_inherit3.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -631,7 +631,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1142,60 +1142,73 @@ YYPARSE_DECL()
case 1:
#line 50 "err_inherit3.y"
yyval.cval = yystack.l_mark[-1].cval;
#line 1146 "err_inherit3.tab.c"
break;
case 2:
#line 50 "err_inherit3.y"
yyval.tval = yystack.l_mark[-1].tval;
#line 1151 "err_inherit3.tab.c"
break;
case 3:
#line 51 "err_inherit3.y"
{ yyval.nlist = yystack.l_mark[0].nlist; }
#line 1156 "err_inherit3.tab.c"
break;
case 4:
#line 53 "err_inherit3.y"
{ yyval.nlist = yystack.l_mark[0].nlist; }
#line 1161 "err_inherit3.tab.c"
break;
case 5:
#line 56 "err_inherit3.y"
{ yyval.cval = cGLOBAL; }
#line 1166 "err_inherit3.tab.c"
break;
case 6:
#line 57 "err_inherit3.y"
{ yyval.cval = cLOCAL; }
#line 1171 "err_inherit3.tab.c"
break;
case 7:
#line 60 "err_inherit3.y"
{ yyval.tval = tREAL; }
#line 1176 "err_inherit3.tab.c"
break;
case 8:
#line 61 "err_inherit3.y"
{ yyval.tval = tINTEGER; }
#line 1181 "err_inherit3.tab.c"
break;
case 9:
#line 64 "err_inherit3.y"
yyval.cval = yystack.l_mark[-2];
#line 1186 "err_inherit3.tab.c"
break;
case 10:
#line 65 "err_inherit3.y"
{ yyval.nlist->s = mksymbol(yystack.l_mark[-5].tval, yystack.l_mark[-5].cval, yystack.l_mark[0].id);
yyval.nlist->next = yystack.l_mark[-1].nlist;
}
#line 1193 "err_inherit3.tab.c"
break;
case 11:
#line 69 "err_inherit3.y"
{ yyval.nlist->s = mksymbol(yystack.l_mark[-3], yystack.l_mark[-3], yystack.l_mark[0].id);
yyval.nlist->next = NULL;
}
#line 1200 "err_inherit3.tab.c"
break;
case 12:
#line 74 "err_inherit3.y"
yyval.cval = cLOCAL;
#line 1205 "err_inherit3.tab.c"
break;
case 13:
#line 75 "err_inherit3.y"
{ yyval.nlist = yystack.l_mark[0].nlist; }
#line 1210 "err_inherit3.tab.c"
break;
#line 1199 "err_inherit3.tab.c"
#line 1212 "err_inherit3.tab.c"
default:
break;
}

View File

@ -12,7 +12,7 @@
#endif
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
typedef union
typedef union YYSTYPE
{
class cval;
type tval;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -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;
@ -452,18 +452,18 @@ YYDESTRUCT_DECL()
case 263:
#line 28 "err_inherit4.y"
{ }
#line 456 "err_inherit4.tab.c"
break;
#line 457 "err_inherit4.tab.c"
case 264:
#line 28 "err_inherit4.y"
{ }
#line 461 "err_inherit4.tab.c"
break;
#line 462 "err_inherit4.tab.c"
case 265:
#line 28 "err_inherit4.y"
{ }
#line 466 "err_inherit4.tab.c"
break;
#line 467 "err_inherit4.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -629,7 +629,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1140,52 +1140,63 @@ YYPARSE_DECL()
case 1:
#line 52 "err_inherit4.y"
yyval.cval = yystack.l_mark[-1].cval;
#line 1144 "err_inherit4.tab.c"
break;
case 2:
#line 52 "err_inherit4.y"
yyval.tval = yystack.l_mark[-1].tval;
#line 1149 "err_inherit4.tab.c"
break;
case 3:
#line 53 "err_inherit4.y"
{ yyval.nlist = yystack.l_mark[0].nlist; yyloc = yystack.p_mark[0]; }
#line 1154 "err_inherit4.tab.c"
break;
case 4:
#line 55 "err_inherit4.y"
{ yyval.nlist = yystack.l_mark[0].nlist; yyloc = yystack.p_mark[-3]; }
#line 1159 "err_inherit4.tab.c"
break;
case 5:
#line 58 "err_inherit4.y"
{ yyval.cval = cGLOBAL; }
#line 1164 "err_inherit4.tab.c"
break;
case 6:
#line 59 "err_inherit4.y"
{ yyval.cval = cLOCAL; }
#line 1169 "err_inherit4.tab.c"
break;
case 7:
#line 62 "err_inherit4.y"
{ yyval.tval = tREAL; }
#line 1174 "err_inherit4.tab.c"
break;
case 8:
#line 63 "err_inherit4.y"
{ yyval.tval = tINTEGER; }
#line 1179 "err_inherit4.tab.c"
break;
case 9:
#line 67 "err_inherit4.y"
{ yyval.nlist->s = mksymbol(yystack.l_mark[-2].tval, yystack.l_mark[-3].cval, yystack.l_mark[0].id);
yyval.nlist->next = yystack.l_mark[-1].nlist;
}
#line 1186 "err_inherit4.tab.c"
break;
case 10:
#line 71 "err_inherit4.y"
{ yyval.nlist->s = mksymbol(yystack.l_mark[-1].tval, yystack.l_mark[-2].cval, yystack.l_mark[0].id);
yyval.nlist->next = NULL;
}
#line 1193 "err_inherit4.tab.c"
break;
case 11:
#line 77 "err_inherit4.y"
{ yyval.nlist = yystack.l_mark[0].nlist; yyloc = yystack.p_mark[1]; }
#line 1198 "err_inherit4.tab.c"
break;
#line 1189 "err_inherit4.tab.c"
#line 1200 "err_inherit4.tab.c"
default:
break;
}

View File

@ -12,7 +12,7 @@
#endif
#ifndef YYSTYPE_IS_DECLARED
#define YYSTYPE_IS_DECLARED 1
typedef union
typedef union YYSTYPE
{
class cval;
type tval;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -530,7 +530,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -536,7 +536,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -542,7 +542,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -539,7 +539,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1050,8 +1050,9 @@ YYPARSE_DECL()
case 1:
#line 9 "err_syntax18.y"
{ yyval = yystack.l_mark[1]; }
#line 1054 "err_syntax18.tab.c"
break;
#line 1055 "err_syntax18.tab.c"
#line 1056 "err_syntax18.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)
@ -534,7 +534,7 @@ YYPARSE_DECL()
yyps->save = 0;
#endif /* YYBTYACC */
yym = 0;
yyn = 0;
/* yyn is set below */
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@ -1045,8 +1045,9 @@ YYPARSE_DECL()
case 1:
#line 12 "err_syntax20.y"
{ yystack.l_mark[-1].rechk = 3; }
#line 1049 "err_syntax20.tab.c"
break;
#line 1050 "err_syntax20.tab.c"
#line 1051 "err_syntax20.tab.c"
default:
break;
}

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

View File

@ -3,8 +3,8 @@
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYMAJOR 2
#define YYMINOR 0
#define YYCHECK "yyyymmdd"
#define YYEMPTY (-1)

Some files were not shown because too many files have changed in this diff Show More