Merge ^/head r309817 through r310168.

This commit is contained in:
Dimitry Andric 2016-12-16 18:38:31 +00:00
commit 3ffd353070
323 changed files with 8393 additions and 3888 deletions

View File

@ -591,7 +591,7 @@ XCFLAGS+= -B${WORLDTMP}/usr/lib
# XXX: This should be checking MK_GNUCXX == no
.if ${X_COMPILER_VERSION} >= 40800
XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \
-nostdinc++ -L${WORLDTMP}/../lib/libc++
-nostdinc++
.endif
.elif ${WANT_COMPILER_TYPE} == clang || \
(defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == clang)

View File

@ -3048,7 +3048,6 @@ OLD_FILES+=usr/lib32/libftpio_p.a
OLD_FILES+=usr/include/ftpio.h
OLD_FILES+=usr/share/man/man3/ftpio.3.gz
# 20110915: rename congestion control manpages
OLD_FILES+=usr/share/man/man4/cc.4.gz
OLD_FILES+=usr/share/man/man9/cc.9.gz
# 20110831: atomic page flags operations
OLD_FILES+=usr/share/man/man9/vm_page_flag.9.gz

View File

@ -142,8 +142,6 @@ setup(void)
in.fd = open(in.name, O_RDONLY, 0);
if (in.fd == -1)
err(1, "%s", in.name);
if (caph_limit_stdin() == -1)
err(1, "unable to limit capability rights");
}
getfdtype(&in);
@ -176,8 +174,6 @@ setup(void)
}
if (out.fd == -1)
err(1, "%s", out.name);
if (caph_limit_stdout() == -1)
err(1, "unable to limit capability rights");
}
getfdtype(&out);
@ -188,6 +184,16 @@ setup(void)
errno != ENOSYS)
err(1, "unable to limit capability rights");
if (in.fd != STDIN_FILENO && out.fd != STDIN_FILENO) {
if (caph_limit_stdin() == -1)
err(1, "unable to limit capability rights");
}
if (in.fd != STDOUT_FILENO && out.fd != STDOUT_FILENO) {
if (caph_limit_stdout() == -1)
err(1, "unable to limit capability rights");
}
if (in.fd != STDERR_FILENO && out.fd != STDERR_FILENO) {
if (caph_limit_stderr() == -1)
err(1, "unable to limit capability rights");

View File

@ -10,6 +10,9 @@ SRCS= df.c vfslist.c
CFLAGS+= -I${MOUNT}
CFLAGS+= -DMOUNT_CHAR_DEVS
SRCS+= getmntopts.c
LIBADD= xo util
.include <bsd.prog.mk>

View File

@ -50,10 +50,15 @@ __FBSDID("$FreeBSD$");
#include <sys/stat.h>
#include <sys/mount.h>
#include <sys/sysctl.h>
#ifdef MOUNT_CHAR_DEVS
#include <ufs/ufs/ufsmount.h>
#endif
#include <err.h>
#include <libutil.h>
#include <locale.h>
#ifdef MOUNT_CHAR_DEVS
#include <mntopts.h>
#endif
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@ -98,7 +103,9 @@ imax(int a, int b)
static int aflag = 0, cflag, hflag, iflag, kflag, lflag = 0, nflag, Tflag;
static int thousands;
#ifdef MOUNT_CHAR_DEVS
static struct ufs_args mdev;
#endif
int
main(int argc, char *argv[])
@ -107,11 +114,21 @@ main(int argc, char *argv[])
struct statfs statfsbuf, totalbuf;
struct maxwidths maxwidths;
struct statfs *mntbuf;
#ifdef MOUNT_CHAR_DEVS
struct iovec *iov = NULL;
#endif
const char *fstype;
char *mntpath, *mntpt;
#ifdef MOUNT_CHAR_DEVS
char *mntpath;
char errmsg[255] = {0};
#endif
char *mntpt;
const char **vfslist;
int i, mntsize;
int ch, rv;
#ifdef MOUNT_CHAR_DEVS
int iovlen = 0;
#endif
fstype = "ufs";
(void)setlocale(LC_ALL, "");
@ -227,6 +244,7 @@ main(int argc, char *argv[])
rv = 1;
continue;
}
#ifdef MOUNT_CHAR_DEVS
} else if (S_ISCHR(stbuf.st_mode)) {
if ((mntpt = getmntpt(*argv)) == NULL) {
mdev.fspec = *argv;
@ -243,9 +261,23 @@ main(int argc, char *argv[])
free(mntpath);
continue;
}
if (mount(fstype, mntpt, MNT_RDONLY,
&mdev) != 0) {
xo_warn("%s", *argv);
if (iov != NULL)
free_iovec(&iov, &iovlen);
build_iovec_argf(&iov, &iovlen, "fstype", "%s",
fstype);
build_iovec_argf(&iov, &iovlen, "fspath", "%s",
mntpath);
build_iovec_argf(&iov, &iovlen, "from", "%s",
*argv);
build_iovec(&iov, &iovlen, "errmsg", errmsg,
sizeof(errmsg));
if (nmount(iov, iovlen,
MNT_RDONLY|MNT_NOEXEC) < 0) {
if (errmsg[0])
xo_warn("%s: %s", *argv,
errmsg);
else
xo_warn("%s", *argv);
rv = 1;
(void)rmdir(mntpt);
free(mntpath);
@ -264,6 +296,7 @@ main(int argc, char *argv[])
free(mntpath);
continue;
}
#endif
} else
mntpt = *argv;

View File

@ -46,9 +46,9 @@ char *
get_sbuf_line(line_t *lp)
{
static char *sfbuf = NULL; /* buffer */
static int sfbufsz = 0; /* buffer size */
static size_t sfbufsz; /* buffer size */
int len, ct;
size_t len;
if (lp == &buffer_head)
return NULL;
@ -64,7 +64,7 @@ get_sbuf_line(line_t *lp)
}
len = lp->len;
REALLOC(sfbuf, sfbufsz, len + 1, NULL);
if ((ct = fread(sfbuf, sizeof(char), len, sfp)) < 0 || ct != len) {
if (fread(sfbuf, sizeof(char), len, sfp) != len) {
fprintf(stderr, "%s\n", strerror(errno));
errmsg = "cannot read temp file";
return NULL;
@ -81,7 +81,7 @@ const char *
put_sbuf_line(const char *cs)
{
line_t *lp;
int len, ct;
size_t len;
const char *s;
if ((lp = (line_t *) malloc(sizeof(line_t))) == NULL) {
@ -110,7 +110,7 @@ put_sbuf_line(const char *cs)
seek_write = 0;
}
/* assert: SPL1() */
if ((ct = fwrite(cs, sizeof(char), len, sfp)) < 0 || ct != len) {
if (fwrite(cs, sizeof(char), len, sfp) != len) {
sfseek = -1;
fprintf(stderr, "%s\n", strerror(errno));
errmsg = "cannot write temp file";

View File

@ -115,7 +115,7 @@ if (--mutex == 0) { \
/* REALLOC: assure at least a minimum size for buffer b */
#define REALLOC(b,n,i,err) \
if ((i) > (n)) { \
int ti = (n); \
size_t ti = (n); \
char *ts; \
SPL1(); \
if ((b) != NULL) { \
@ -141,7 +141,7 @@ if ((i) > (n)) { \
/* REALLOC: assure at least a minimum size for buffer b */
#define REALLOC(b,n,i,err) \
if ((i) > (n)) { \
int ti = (n); \
size_t ti = (n); \
char *ts; \
SPL1(); \
if ((ts = (char *) realloc((b), ti += max((i), MINBUFSZ))) == NULL) { \

View File

@ -146,7 +146,7 @@ int
set_active_node(line_t *lp)
{
if (active_last + 1 > active_size) {
int ti = active_size;
size_t ti = active_size;
line_t **ts;
SPL1();
#if defined(sun) || defined(NO_REALLOC_NULL)

View File

@ -1356,7 +1356,7 @@ handle_hup(int signo)
char *hup = NULL; /* hup filename */
char *s;
char ed_hup[] = "ed.hup";
int n;
size_t n;
if (!sigactive)
quit(1);

View File

@ -697,7 +697,6 @@ atf_test_case o_flag
o_flag_head()
{
atf_set "descr" "Verify that the output from ls -o prints out the chflag values or '-' if none are set"
atf_set "require.user" "root"
}
o_flag_body()
@ -711,6 +710,7 @@ o_flag_body()
atf_check -e ignore -o empty -s exit:0 dd if=/dev/zero of=b.file \
bs=$size count=1
atf_check -e empty -o empty -s exit:0 chflags uarch a.file
atf_check -e empty -o empty -s exit:0 chflags 0 b.file
atf_check -e empty -o match:"[[:space:]]+uarch[[:space:]]$size+.+a\\.file" \
-s exit:0 ls -lo a.file

View File

@ -188,3 +188,6 @@ exclude EXFAIL common/usdt/tst.static2.ksh
# Uses the Solaris-specific ppriv(1).
exclude EXFAIL common/usdt/tst.user.ksh
# Triggers a lock assertion by using the raise() action from a profile probe.
exclude SKIP common/ustack/tst.spin.ksh

View File

@ -8826,7 +8826,7 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd,
count = relplt->size / hdr->sh_entsize;
size = count * sizeof (asymbol);
p = relplt->relocation;
for (i = 0; i < count; i++, s++, p++)
for (i = 0; i < count; i++, p++)
size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt");
s = *ret = bfd_malloc (size);

View File

@ -11487,7 +11487,7 @@ _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section *sec,
abfd, sec);
else if (sec->size != 0)
{
bfd_byte *sec_contents, *l_sec_contents;
bfd_byte *sec_contents, *l_sec_contents = NULL;
if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
(*_bfd_error_handler)

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
MANIFEST for byacc-20160606, version t20160606
MANIFEST for byacc-20161202, version t20161202
--------------------------------------------------------------------------------
MANIFEST this file
ACKNOWLEDGEMENTS original version of byacc - 1993

View File

@ -1 +1 @@
20160606
20161202

View File

@ -1,4 +1,4 @@
dnl $Id: aclocal.m4,v 1.40 2016/06/07 00:48:07 tom Exp $
dnl $Id: aclocal.m4,v 1.41 2016/12/02 13:03:06 tom Exp $
dnl Macros for byacc configure script (Thomas E. Dickey)
dnl ---------------------------------------------------------------------------
dnl Copyright 2004-2015,2016 Thomas E. Dickey
@ -171,11 +171,14 @@ ifelse([$3],,[ :]dnl
])dnl
])])dnl
dnl ---------------------------------------------------------------------------
dnl CF_CC_ENV_FLAGS version: 3 updated: 2016/05/21 18:10:17
dnl CF_CC_ENV_FLAGS version: 6 updated: 2016/08/29 20:57:00
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 with
dnl options, but eliminates a more common category of user confusion.
dnl into CC. This will not help with broken scripts that wrap the compiler
dnl with options, but eliminates a more common category of user confusion.
dnl
dnl In particular, it addresses the problem of being able to run the C
dnl preprocessor in a consistent manner.
dnl
dnl Caveat: this also disallows blanks in the pathname for the compiler, but
dnl the nuisance of having inconsistent settings for compiler and preprocessor
@ -191,9 +194,19 @@ case "$CC" in
AC_MSG_RESULT(broken)
AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
# humor him...
cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]][[ ]]*//'`
CC=`echo "$CC" | sed -e 's/[[ ]].*//'`
CF_ADD_CFLAGS($cf_flags)
cf_flags=`echo "$CC" | sed -e 's/^.*[[ ]]\(-[[^ ]]\)/\1/'`
CC=`echo "$CC " | sed -e 's/[[ ]]-[[^ ]].*$//' -e 's/[[ ]]*$//'`
for cf_arg in $cf_flags
do
case "x$cf_arg" in
(x-[[IUDfgOW]]*)
CF_ADD_CFLAGS($cf_flags)
;;
(*)
CC="$CC $cf_arg"
;;
esac
done
CF_VERBOSE(resulting CC: '$CC')
CF_VERBOSE(resulting CFLAGS: '$CFLAGS')
CF_VERBOSE(resulting CPPFLAGS: '$CPPFLAGS')
@ -577,7 +590,7 @@ rm -rf conftest*
AC_SUBST(EXTRA_CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07
dnl CF_GNU_SOURCE version: 7 updated: 2016/08/05 05:15:37
dnl -------------
dnl Check if we must define _GNU_SOURCE to get a reasonable value for
dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect
@ -604,7 +617,20 @@ make an error
CPPFLAGS="$cf_save"
])
])
test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
if test "$cf_cv_gnu_source" = yes
then
AC_CACHE_CHECK(if we should also define _DEFAULT_SOURCE,cf_cv_default_source,[
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
AC_TRY_COMPILE([#include <sys/types.h>],[
#ifdef _DEFAULT_SOURCE
make an error
#endif],
[cf_cv_default_source=no],
[cf_cv_default_source=yes])
])
test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_INTEL_COMPILER version: 7 updated: 2015/04/12 15:39:00
@ -1294,7 +1320,7 @@ fi
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_XOPEN_SOURCE version: 50 updated: 2015/10/17 19:03:33
dnl CF_XOPEN_SOURCE version: 52 updated: 2016/08/27 12:21:42
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,
@ -1314,7 +1340,7 @@ case $host_os in
(aix[[4-7]]*)
cf_xopen_source="-D_ALL_SOURCE"
;;
(cygwin|msys)
(msys)
cf_XOPEN_SOURCE=600
;;
(darwin[[0-8]].*)
@ -1342,7 +1368,7 @@ case $host_os in
cf_xopen_source="-D_SGI_SOURCE"
cf_XOPEN_SOURCE=
;;
(linux*|gnu*|mint*|k*bsd*-gnu)
(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
CF_GNU_SOURCE
;;
(minix*)
@ -1364,9 +1390,6 @@ case $host_os in
(openbsd*)
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
;;
(os2*)
cf_XOPEN_SOURCE=
;;
(osf[[45]]*)
cf_xopen_source="-D_OSF_SOURCE"
;;

View File

@ -1,8 +1,8 @@
/* This file generated automatically using
* @Id: skel2c,v 1.3 2014/04/06 19:48:04 tom Exp @
* @Id: skel2c,v 1.4 2016/06/07 00:26:09 tom Exp @
*/
/* @Id: btyaccpar.skel,v 1.3 2016/06/06 23:35:55 Tom.Shields Exp @ */
/* @Id: btyaccpar.skel,v 1.5 2016/12/02 22:02:28 tom Exp @ */
#include "defs.h"
@ -218,9 +218,9 @@ const char *const hdr_vars[] =
"#endif",
"",
"/* Current position at lexical token queue */",
"static short *yylexp = 0;",
"static YYINT *yylexp = 0;",
"",
"static short *yylexemes = 0;",
"static YYINT *yylexemes = 0;",
"#endif /* YYBTYACC */",
#endif /* defined(YYBTYACC) */
0
@ -275,9 +275,9 @@ const char *const body_vars[] =
"#endif",
"",
" /* Current position at lexical token queue */",
" static short *yylexp = 0;",
" static YYINT *yylexp = 0;",
"",
" static short *yylexemes = 0;",
" static YYINT *yylexemes = 0;",
"#endif /* YYBTYACC */",
#endif /* defined(YYBTYACC) */
0
@ -451,6 +451,11 @@ const char *const body_2[] =
" fprintf(stderr, \"%sdebug[<# of symbols on state stack>]\\n\", YYPREFIX);",
"#endif",
"",
0
};
const char *const body_3[] =
{
#if defined(YYBTYACC)
"#if YYBTYACC",
" yyps = yyNewState(0); if (yyps == 0) goto yyenomem;",
@ -503,10 +508,10 @@ const char *const body_2[] =
" size_t s = (size_t) (yylvlim - yylvals);",
"",
" s += YYLVQUEUEGROWTH;",
" if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;",
" if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;",
" if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;",
" if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;",
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
" if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;",
" if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;",
"#endif",
" yylvp = yylve = yylvals + p;",
" yylvlim = yylvals + s;",
@ -516,7 +521,7 @@ const char *const body_2[] =
"#endif",
" yylexp = yylexemes + p;",
" }",
" *yylexp = (short) YYLEX;",
" *yylexp = (YYINT) YYLEX;",
" *yylvp++ = yylval;",
" yylve++;",
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
@ -623,7 +628,7 @@ const char *const body_2[] =
" /* If this is a first conflict in the stack, start saving lexemes */",
" if (!yylexemes)",
" {",
" yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));",
" yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));",
" if (yylexemes == NULL) goto yyenomem;",
" yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));",
" if (yylvals == NULL) goto yyenomem;",
@ -647,7 +652,7 @@ const char *const body_2[] =
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
" *yylpe++ = yylloc;",
"#endif",
" *yylexp = (short) yychar;",
" *yylexp = (YYINT) yychar;",
" yychar = YYEMPTY;",
" }",
" }",
@ -1046,12 +1051,12 @@ const char *const trailer[] =
" size_t s = (size_t) (yylvlim - yylvals);",
"",
" s += YYLVQUEUEGROWTH;",
" if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)",
" if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)",
" goto yyenomem;",
" if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)",
" if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)",
" goto yyenomem;",
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
" if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)",
" if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)",
" goto yyenomem;",
"#endif",
" yylvp = yylve = yylvals + p;",
@ -1062,7 +1067,7 @@ const char *const trailer[] =
"#endif",
" yylexp = yylexemes + p;",
" }",
" *yylexp = (short) YYLEX;",
" *yylexp = (YYINT) YYLEX;",
" *yylvp++ = yylval;",
" yylve++;",
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",

View File

@ -1,4 +1,4 @@
/* $Id: btyaccpar.skel,v 1.3 2016/06/06 23:35:55 Tom.Shields Exp $ */
/* $Id: btyaccpar.skel,v 1.5 2016/12/02 22:02:28 tom Exp $ */
#include "defs.h"
@ -176,9 +176,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
%%endif YYBTYACC
%% body_vars
int yyerrflag;
@ -227,9 +227,9 @@ static short *yylexemes = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
%%endif YYBTYACC
%% body_1
@ -386,6 +386,7 @@ YYPARSE_DECL()
fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX);
#endif
%% body_3
%%ifdef YYBTYACC
yyps = yyNewState(0); if (yyps == 0) goto yyenomem;
yyps->save = 0;
@ -435,10 +436,10 @@ yyloop:
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -448,7 +449,7 @@ yyloop:
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -549,7 +550,7 @@ yyloop:
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -573,7 +574,7 @@ yyloop:
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -954,12 +955,12 @@ yyreduce:
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -970,7 +971,7 @@ yyreduce:
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2016-01-01'
timestamp='2016-10-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -186,9 +186,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
# to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
earm*)
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
@ -237,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
@ -268,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
UNAME_MACHINE=alpha ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
@ -376,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
SUN_ARCH=x86_64
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@ -410,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
@ -635,13 +642,13 @@ EOF
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
32) HP_ARCH=hppa2.0n ;;
64) HP_ARCH=hppa2.0w ;;
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
@ -680,11 +687,11 @@ EOF
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
(CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
if [ ${HP_ARCH} = hppa2.0w ]
then
eval $set_cc_for_build
@ -697,12 +704,12 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH="hppa2.0w"
HP_ARCH=hppa2.0w
else
HP_ARCH="hppa64"
HP_ARCH=hppa64
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@ -807,14 +814,14 @@ EOF
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@ -896,7 +903,7 @@ EOF
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
@ -919,7 +926,7 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
@ -993,6 +1000,9 @@ EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64el:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
@ -1025,6 +1035,9 @@ EOF
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
@ -1272,6 +1285,9 @@ EOF
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
SX-ACE:SUPER-UX:*:*)
echo sxace-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@ -1285,9 +1301,9 @@ EOF
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
@ -1309,7 +1325,7 @@ EOF
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
@ -1340,7 +1356,7 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
if test "$cputype" = "386"; then
if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
@ -1382,7 +1398,7 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
@ -1401,18 +1417,17 @@ esac
cat >&2 <<EOF
$0: unable to guess system type
This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
This script (version $timestamp), has failed to recognize the
operating system you are using. If your script is old, overwrite
config.guess and config.sub with the latest versions from:
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
provide the necessary information to handle your system.
config.guess timestamp = $timestamp

View File

@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2016-01-01'
timestamp='2016-11-19'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -117,7 +117,7 @@ case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \
kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@ -301,6 +301,7 @@ case $basic_machine in
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
@ -428,6 +429,7 @@ case $basic_machine in
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pru-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
@ -643,6 +645,14 @@ case $basic_machine in
basic_machine=m68k-bull
os=-sysv3
;;
e500v[12])
basic_machine=powerpc-unknown
os=$os"spe"
;;
e500v[12]-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
os=$os"spe"
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@ -1022,7 +1032,7 @@ case $basic_machine in
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
@ -1032,7 +1042,7 @@ case $basic_machine in
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
@ -1382,14 +1392,14 @@ case $os in
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* \
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
@ -1399,7 +1409,7 @@ case $os in
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos*)
| -onefs* | -tirtos* | -phoenix* | -fuchsia*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1531,6 +1541,8 @@ case $os in
;;
-nacl*)
;;
-ios)
;;
-none)
;;
*)

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* $Id: defs.h,v 1.52 2016/06/01 22:56:37 Tom.Shields Exp $ */
/* $Id: defs.h,v 1.54 2016/12/02 19:27:56 tom Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@ -118,10 +118,13 @@
#define LEX_PARAM 14
#define POSIX_YACC 15
#define TOKEN_TABLE 16
#define ERROR_VERBOSE 17
#define XXXDEBUG 18
#if defined(YYBTYACC)
#define LOCATIONS 17
#define DESTRUCTOR 18
#define LOCATIONS 19
#define DESTRUCTOR 20
#define INITIAL_ACTION 21
#endif
/* symbol classes */
@ -198,7 +201,7 @@ struct bucket
#if defined(YYBTYACC)
char **argnames;
char **argtags;
int args;
int args;
char *destructor;
#endif
Value_t value;
@ -287,10 +290,12 @@ extern int outline;
extern int exit_code;
extern int pure_parser;
extern int token_table;
extern int error_verbose;
#if defined(YYBTYACC)
extern int locations;
extern int backtrack;
extern int destructor;
extern char *initial_action;
#endif
extern const char *const banner[];
@ -303,6 +308,7 @@ extern const char *const hdr_vars[];
extern const char *const body_1[];
extern const char *const body_vars[];
extern const char *const body_2[];
extern const char *const body_3[];
extern const char *const trailer[];
extern char *code_file_name;
@ -412,22 +418,29 @@ extern param *parse_param;
#endif
#ifndef GCC_PRINTFLIKE
#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
#define GCC_PRINTFLIKE(fmt,var) /*nothing */
#endif
/* closure.c */
extern void closure(Value_t * nucleus, int n);
extern void closure(Value_t *nucleus, int n);
extern void finalize_closure(void);
extern void set_first_derives(void);
/* error.c */
struct ainfo
{
int a_lineno;
char *a_line;
char *a_cptr;
};
extern void arg_number_disagree_warning(int a_lineno, char *a_name);
extern void arg_type_disagree_warning(int a_lineno, int i, char *a_name);
extern void at_error(int a_lineno, char *a_line, char *a_cptr) GCC_NORETURN;
extern void at_warning(int a_lineno, int i);
extern void bad_formals(void) GCC_NORETURN;
extern void default_action_warning(char *s);
extern void destructor_redeclared_warning(int a_lineno, char *a_line, char *a_cptr);
extern void destructor_redeclared_warning(const struct ainfo *);
extern void dollar_error(int a_lineno, char *a_line, char *a_cptr) GCC_NORETURN;
extern void dollar_warning(int a_lineno, int i);
extern void fatal(const char *msg) GCC_NORETURN;
@ -454,16 +467,16 @@ extern void unexpected_EOF(void) GCC_NORETURN;
extern void unknown_arg_warning(int d_lineno, const char *dlr_opt, const char *d_arg, const char *d_line, const char *d_cptr);
extern void unknown_rhs(int i) GCC_NORETURN;
extern void unsupported_flag_warning(const char *flag, const char *details);
extern void unterminated_action(int a_lineno, char *a_line, char *a_cptr) GCC_NORETURN;
extern void unterminated_comment(int c_lineno, char *c_line, char *c_cptr) GCC_NORETURN;
extern void unterminated_string(int s_lineno, char *s_line, char *s_cptr) GCC_NORETURN;
extern void unterminated_text(int t_lineno, char *t_line, char *t_cptr) GCC_NORETURN;
extern void unterminated_union(int u_lineno, char *u_line, char *u_cptr) GCC_NORETURN;
extern void unterminated_action(const struct ainfo *) GCC_NORETURN;
extern void unterminated_comment(const struct ainfo *) GCC_NORETURN;
extern void unterminated_string(const struct ainfo *) GCC_NORETURN;
extern void unterminated_text(const struct ainfo *) GCC_NORETURN;
extern void unterminated_union(const struct ainfo *) GCC_NORETURN;
extern void untyped_arg_warning(int a_lineno, const char *dlr_opt, const char *a_name);
extern void untyped_lhs(void) GCC_NORETURN;
extern void untyped_rhs(int i, char *s) GCC_NORETURN;
extern void used_reserved(char *s) GCC_NORETURN;
extern void unterminated_arglist(int a_lineno, char *a_line, char *a_cptr) GCC_NORETURN;
extern void unterminated_arglist(const struct ainfo *) GCC_NORETURN;
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);

View File

@ -1,4 +1,4 @@
/* $Id: error.c,v 1.13 2016/06/07 00:15:16 tom Exp $ */
/* $Id: error.c,v 1.14 2016/12/02 18:35:55 tom Exp $ */
/* routines for printing error messages */
@ -77,38 +77,38 @@ syntax_error(int st_lineno, char *st_line, char *st_cptr)
}
void
unterminated_comment(int c_lineno, char *c_line, char *c_cptr)
unterminated_comment(const struct ainfo *a)
{
fprintf(stderr, "%s: e - line %d of \"%s\", unmatched /*\n",
myname, c_lineno, input_file_name);
print_pos(c_line, c_cptr);
myname, a->a_lineno, input_file_name);
print_pos(a->a_line, a->a_cptr);
done(1);
}
void
unterminated_string(int s_lineno, char *s_line, char *s_cptr)
unterminated_string(const struct ainfo *a)
{
fprintf(stderr, "%s: e - line %d of \"%s\", unterminated string\n",
myname, s_lineno, input_file_name);
print_pos(s_line, s_cptr);
myname, a->a_lineno, input_file_name);
print_pos(a->a_line, a->a_cptr);
done(1);
}
void
unterminated_text(int t_lineno, char *t_line, char *t_cptr)
unterminated_text(const struct ainfo *a)
{
fprintf(stderr, "%s: e - line %d of \"%s\", unmatched %%{\n",
myname, t_lineno, input_file_name);
print_pos(t_line, t_cptr);
myname, a->a_lineno, input_file_name);
print_pos(a->a_line, a->a_cptr);
done(1);
}
void
unterminated_union(int u_lineno, char *u_line, char *u_cptr)
unterminated_union(const struct ainfo *a)
{
fprintf(stderr, "%s: e - line %d of \"%s\", unterminated %%union \
declaration\n", myname, u_lineno, input_file_name);
print_pos(u_line, u_cptr);
declaration\n", myname, a->a_lineno, input_file_name);
print_pos(a->a_line, a->a_cptr);
done(1);
}
@ -218,11 +218,11 @@ specifiers\n", myname, lineno, input_file_name);
}
void
unterminated_action(int a_lineno, char *a_line, char *a_cptr)
unterminated_action(const struct ainfo *a)
{
fprintf(stderr, "%s: e - line %d of \"%s\", unterminated action\n",
myname, a_lineno, input_file_name);
print_pos(a_line, a_cptr);
myname, a->a_lineno, input_file_name);
print_pos(a->a_line, a->a_cptr);
done(1);
}
@ -316,12 +316,12 @@ at_error(int a_lineno, char *a_line, char *a_cptr)
}
void
unterminated_arglist(int a_lineno, char *a_line, char *a_cptr)
unterminated_arglist(const struct ainfo *a)
{
fprintf(stderr,
"%s: e - line %d of \"%s\", unterminated argument list\n",
myname, a_lineno, input_file_name);
print_pos(a_line, a_cptr);
myname, a->a_lineno, input_file_name);
print_pos(a->a_line, a->a_cptr);
done(1);
}
@ -394,10 +394,10 @@ start_requires_args(char *a_name)
}
void
destructor_redeclared_warning(int a_lineno, char *a_line, char *a_cptr)
destructor_redeclared_warning(const struct ainfo *a)
{
fprintf(stderr, "%s: w - line %d of \"%s\", destructor redeclared\n",
myname, a_lineno, input_file_name);
print_pos(a_line, a_cptr);
myname, a->a_lineno, input_file_name);
print_pos(a->a_line, a->a_cptr);
}
#endif

View File

@ -1,4 +1,4 @@
/* $Id: main.c,v 1.56 2016/03/25 00:16:28 Jung-uk.Kim Exp $ */
/* $Id: main.c,v 1.57 2016/12/02 18:44:44 tom Exp $ */
#include <signal.h>
#ifndef _WIN32
@ -92,6 +92,7 @@ char *symbol_assoc;
int pure_parser;
int token_table;
int error_verbose;
#if defined(YYBTYACC)
Value_t *symbol_pval;
@ -99,6 +100,7 @@ char **symbol_destructor;
char **symbol_type_tag;
int locations = 0; /* default to no position processing */
int backtrack = 0; /* default is no backtracking */
char *initial_action = NULL;
#endif
int exit_code;

View File

@ -1,4 +1,4 @@
/* $Id: mstring.c,v 1.6 2014/04/22 23:36:31 tom Exp $ */
/* $Id: mstring.c,v 1.7 2016/12/02 17:57:21 tom Exp $ */
#include <stdlib.h>
#include <stdio.h>
@ -157,20 +157,20 @@ strnscmp(const char *a, const char *b)
{
while (1)
{
while (isspace(*a))
while (isspace(UCH(*a)))
a++;
while (isspace(*b))
while (isspace(UCH(*b)))
b++;
while (*a && *a == *b)
a++, b++;
if (isspace(*a))
if (isspace(UCH(*a)))
{
if (isalnum(a[-1]) && isalnum(*b))
if (isalnum(UCH(a[-1])) && isalnum(UCH(*b)))
break;
}
else if (isspace(*b))
else if (isspace(UCH(*b)))
{
if (isalnum(b[-1]) && isalnum(*a))
if (isalnum(UCH(b[-1])) && isalnum(UCH(*a)))
break;
}
else
@ -186,7 +186,7 @@ strnshash(const char *s)
while (*s)
{
if (!isspace(*s))
if (!isspace(UCH(*s)))
h = (h << 5) - h + (unsigned char)*s;
s++;
}

View File

@ -1,4 +1,4 @@
/* $Id: output.c,v 1.76 2016/06/07 00:14:34 tom Exp $ */
/* $Id: output.c,v 1.79 2016/12/02 20:42:38 tom Exp $ */
#include "defs.h"
@ -234,6 +234,43 @@ end_table(void)
output_line("};");
}
static void
output_stype(FILE * fp)
{
if (!unionized && ntags == 0)
{
putc_code(fp, '\n');
putl_code(fp, "#if "
"! defined(YYSTYPE) && "
"! defined(YYSTYPE_IS_DECLARED)\n");
putl_code(fp, "/* Default: YYSTYPE is the semantic value type. */\n");
putl_code(fp, "typedef int YYSTYPE;\n");
putl_code(fp, "# define YYSTYPE_IS_DECLARED 1\n");
putl_code(fp, "#endif\n");
}
}
#if defined(YYBTYACC)
static void
output_ltype(FILE * fp)
{
putc_code(fp, '\n');
putl_code(fp, "#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED\n");
putl_code(fp, "/* Default: YYLTYPE is the text position type. */\n");
putl_code(fp, "typedef struct YYLTYPE\n");
putl_code(fp, "{\n");
putl_code(fp, " int first_line;\n");
putl_code(fp, " int first_column;\n");
putl_code(fp, " int last_line;\n");
putl_code(fp, " int last_column;\n");
putl_code(fp, " unsigned source;\n");
putl_code(fp, "} YYLTYPE;\n");
putl_code(fp, "#define YYLTYPE_IS_DECLARED 1\n");
putl_code(fp, "#endif\n");
putl_code(fp, "#define YYRHSLOC(rhs, k) ((rhs)[k])\n");
}
#endif
static void
output_YYINT_typedef(FILE * fp)
{
@ -329,6 +366,8 @@ output_accessing_symbols(void)
translate[i] = symbol_pval[gsymb];
}
putl_code(output_file,
"#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)\n");
/* yystos[] may be unused, depending on compile-time defines */
start_int_table("stos", translate[0]);
@ -348,6 +387,8 @@ output_accessing_symbols(void)
end_table();
FREE(translate);
putl_code(output_file,
"#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */\n");
}
}
@ -1220,6 +1261,10 @@ output_defines(FILE * fp)
}
fprintf(fp, "extern YYSTYPE %slval;\n", symbol_prefix);
}
#if defined(YYBTYACC)
if (locations)
output_ltype(fp);
#endif
}
}
@ -1539,41 +1584,6 @@ output_pure_parser(FILE * fp)
putc_code(fp, '\n');
}
static void
output_stype(FILE * fp)
{
if (!unionized && ntags == 0)
{
putc_code(fp, '\n');
putl_code(fp, "#if "
"! defined(YYSTYPE) && "
"! defined(YYSTYPE_IS_DECLARED)\n");
putl_code(fp, "/* Default: YYSTYPE is the semantic value type. */\n");
putl_code(fp, "typedef int YYSTYPE;\n");
putl_code(fp, "# define YYSTYPE_IS_DECLARED 1\n");
putl_code(fp, "#endif\n");
}
}
#if defined(YYBTYACC)
static void
output_ltype(FILE * fp)
{
putc_code(fp, '\n');
putl_code(fp, "#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED\n");
putl_code(fp, "/* Default: YYLTYPE is the text position type. */\n");
putl_code(fp, "typedef struct YYLTYPE\n");
putl_code(fp, "{\n");
putl_code(fp, " int first_line;\n");
putl_code(fp, " int first_column;\n");
putl_code(fp, " int last_line;\n");
putl_code(fp, " int last_column;\n");
putl_code(fp, "} YYLTYPE;\n");
putl_code(fp, "#define YYLTYPE_IS_DECLARED 1\n");
putl_code(fp, "#endif\n");
}
#endif
static void
output_trailing_text(void)
{
@ -1781,7 +1791,7 @@ output_error_decl(FILE * fp)
puts_code(fp, "#define YYERROR_DECL() yyerror(");
#if defined(YYBTYACC)
if (locations)
puts_code(fp, "YYLTYPE loc, ");
puts_code(fp, "YYLTYPE *loc, ");
#endif
puts_param_types(fp, parse_param, 1);
putl_code(fp, "const char *s)\n");
@ -1792,7 +1802,7 @@ output_error_decl(FILE * fp)
puts_code(fp, "#define YYERROR_CALL(msg) yyerror(");
#if defined(YYBTYACC)
if (locations)
puts_code(fp, "yylloc, ");
puts_code(fp, "&yylloc, ");
#endif
puts_param_names(fp, parse_param, 1);
putl_code(fp, "msg)\n");
@ -1845,6 +1855,13 @@ output_yydestruct_decl(FILE * fp)
putl_code(fp, "#endif\n");
}
static void
output_initial_action(void)
{
if (initial_action)
fprintf(code_file, "%s\n", initial_action);
}
static void
output_yydestruct_impl(void)
{
@ -2051,6 +2068,11 @@ output(void)
write_section(code_file, body_vars);
}
write_section(code_file, body_2);
#if defined(YYBTYACC)
if (initial_action)
output_initial_action();
#endif
write_section(code_file, body_3);
output_semantic_actions();
write_section(code_file, trailer);
}

View File

@ -1,8 +1,8 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
%define AppVersion 20160606
%define AppVersion 20161202
%define UseProgram yacc
# $XTermId: byacc.spec,v 1.31 2016/06/07 00:44:26 tom Exp $
# $XTermId: byacc.spec,v 1.32 2016/12/02 12:58:46 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1

View File

@ -1,3 +1,9 @@
byacc (20161202) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 02 Dec 2016 07:58:46 -0500
byacc (20160606) unstable; urgency=low
* maintenance updates

View File

@ -1,8 +1,8 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
%define AppVersion 20160606
%define AppVersion 20161202
%define UseProgram yacc
# $XTermId: mingw-byacc.spec,v 1.13 2016/06/07 00:44:26 tom Exp $
# $XTermId: mingw-byacc.spec,v 1.14 2016/12/02 12:58:46 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1

View File

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $
#
DISTNAME= byacc-20160606
DISTNAME= byacc-20161202
PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ftp://invisible-island.net/byacc/

View File

@ -1,4 +1,4 @@
/* $Id: reader.c,v 1.63 2016/06/07 00:17:51 tom Exp $ */
/* $Id: reader.c,v 1.66 2016/12/02 20:14:34 tom Exp $ */
#include "defs.h"
@ -22,6 +22,7 @@
static void start_rule(bucket *bp, int s_lineno);
#if defined(YYBTYACC)
static void copy_initial_action(void);
static void copy_destructor(void);
static char *process_destructor_XX(char *code, char *tag);
#endif
@ -185,10 +186,10 @@ static void
skip_comment(void)
{
char *s;
int st_lineno = lineno;
char *st_line = dup_line();
char *st_cptr = st_line + (cptr - line);
struct ainfo a;
a.a_lineno = lineno;
a.a_line = dup_line();
a.a_cptr = a.a_line + (cptr - line);
s = cptr + 2;
for (;;)
@ -196,14 +197,14 @@ skip_comment(void)
if (*s == '*' && s[1] == '/')
{
cptr = s + 2;
FREE(st_line);
FREE(a.a_line);
return;
}
if (*s == '\n')
{
get_line();
if (line == NULL)
unterminated_comment(st_lineno, st_line, st_cptr);
unterminated_comment(&a);
s = cptr;
}
else
@ -290,17 +291,22 @@ nextc(void)
/* *INDENT-OFF* */
static struct keyword
{
char name[13];
char name[14];
int token;
}
keywords[] = {
{ "binary", NONASSOC },
{ "debug", XXXDEBUG },
#if defined(YYBTYACC)
{ "destructor", DESTRUCTOR },
#endif
{ "error-verbose",ERROR_VERBOSE },
{ "expect", EXPECT },
{ "expect-rr", EXPECT_RR },
{ "ident", IDENT },
#if defined(YYBTYACC)
{ "initial-action", INITIAL_ACTION },
#endif
{ "left", LEFT },
{ "lex-param", LEX_PARAM },
#if defined(YYBTYACC)
@ -428,9 +434,10 @@ copy_string(int quote)
{
struct mstring *temp = msnew();
int c;
int s_lineno = lineno;
char *s_line = dup_line();
char *s_cptr = s_line + (cptr - line - 1);
struct ainfo a;
a.a_lineno = lineno;
a.a_line = dup_line();
a.a_cptr = a.a_line + (cptr - line - 1);
for (;;)
{
@ -438,11 +445,11 @@ copy_string(int quote)
mputc(temp, c);
if (c == quote)
{
FREE(s_line);
FREE(a.a_line);
return msdone(temp);
}
if (c == '\n')
unterminated_string(s_lineno, s_line, s_cptr);
unterminated_string(&a);
if (c == '\\')
{
c = *cptr++;
@ -451,7 +458,7 @@ copy_string(int quote)
{
get_line();
if (line == NULL)
unterminated_string(s_lineno, s_line, s_cptr);
unterminated_string(&a);
}
}
}
@ -478,9 +485,10 @@ copy_comment(void)
}
else if (c == '*')
{
int c_lineno = lineno;
char *c_line = dup_line();
char *c_cptr = c_line + (cptr - line - 1);
struct ainfo a;
a.a_lineno = lineno;
a.a_line = dup_line();
a.a_cptr = a.a_line + (cptr - line - 1);
mputc(temp, c);
++cptr;
@ -492,14 +500,14 @@ copy_comment(void)
{
mputc(temp, '/');
++cptr;
FREE(c_line);
FREE(a.a_line);
return msdone(temp);
}
if (c == '\n')
{
get_line();
if (line == NULL)
unterminated_comment(c_lineno, c_line, c_cptr);
unterminated_comment(&a);
}
}
}
@ -512,15 +520,16 @@ copy_text(void)
int c;
FILE *f = text_file;
int need_newline = 0;
int t_lineno = lineno;
char *t_line = dup_line();
char *t_cptr = t_line + (cptr - line - 2);
struct ainfo a;
a.a_lineno = lineno;
a.a_line = dup_line();
a.a_cptr = a.a_line + (cptr - line - 2);
if (*cptr == '\n')
{
get_line();
if (line == NULL)
unterminated_text(t_lineno, t_line, t_cptr);
unterminated_text(&a);
}
if (!lflag)
fprintf(f, line_format, lineno, input_file_name);
@ -535,7 +544,7 @@ copy_text(void)
get_line();
if (line)
goto loop;
unterminated_text(t_lineno, t_line, t_cptr);
unterminated_text(&a);
case '\'':
case '"':
@ -565,7 +574,7 @@ copy_text(void)
if (need_newline)
putc('\n', f);
++cptr;
FREE(t_line);
FREE(a.a_line);
return;
}
/* FALLTHRU */
@ -598,9 +607,10 @@ copy_union(void)
{
int c;
int depth;
int u_lineno = lineno;
char *u_line = dup_line();
char *u_cptr = u_line + (cptr - line - 6);
struct ainfo a;
a.a_lineno = lineno;
a.a_line = dup_line();
a.a_cptr = a.a_line + (cptr - line - 6);
if (unionized)
over_unionized(cptr - 6);
@ -626,7 +636,7 @@ copy_union(void)
case '\n':
get_line();
if (line == NULL)
unterminated_union(u_lineno, u_line, u_cptr);
unterminated_union(&a);
goto loop;
case L_CURL:
@ -638,7 +648,7 @@ copy_union(void)
{
puts_both(" YYSTYPE;\n");
puts_both("#endif /* !YYSTYPE_IS_DECLARED */\n");
FREE(u_line);
FREE(a.a_line);
return;
}
goto loop;
@ -897,7 +907,7 @@ copy_param(int k)
goto oops;
}
buf[i--] = '\0';
buf[++i] = '\0';
(void)trim_blanks(buf);
comma = buf - 1;
@ -974,9 +984,10 @@ get_literal(void)
int n;
char *s;
bucket *bp;
int s_lineno = lineno;
char *s_line = dup_line();
char *s_cptr = s_line + (cptr - line);
struct ainfo a;
a.a_lineno = lineno;
a.a_line = dup_line();
a.a_cptr = a.a_line + (cptr - line);
quote = *cptr++;
cinc = 0;
@ -986,7 +997,7 @@ get_literal(void)
if (c == quote)
break;
if (c == '\n')
unterminated_string(s_lineno, s_line, s_cptr);
unterminated_string(&a);
if (c == '\\')
{
char *c_cptr = cptr - 1;
@ -997,7 +1008,7 @@ get_literal(void)
case '\n':
get_line();
if (line == NULL)
unterminated_string(s_lineno, s_line, s_cptr);
unterminated_string(&a);
continue;
case '0':
@ -1069,7 +1080,7 @@ get_literal(void)
}
cachec(c);
}
FREE(s_line);
FREE(a.a_line);
n = cinc;
s = TMALLOC(char, n);
@ -1269,7 +1280,7 @@ scan_id(void)
{
char *b = cptr;
while (isalnum(*cptr) || *cptr == '_' || *cptr == '$')
while (isalnum(UCH(*cptr)) || *cptr == '_' || *cptr == '$')
cptr++;
return cache_tag(b, (size_t) (cptr - b));
}
@ -1562,6 +1573,10 @@ read_declarations(void)
token_table = 1;
break;
case ERROR_VERBOSE:
error_verbose = 1;
break;
#if defined(YYBTYACC)
case LOCATIONS:
locations = 1;
@ -1571,8 +1586,15 @@ read_declarations(void)
destructor = 1;
copy_destructor();
break;
case INITIAL_ACTION:
copy_initial_action();
break;
#endif
case XXXDEBUG:
/* XXX: FIXME */
break;
case POSIX_YACC:
/* noop for bison compatibility. byacc is already designed to be posix
* yacc compatible. */
@ -1654,9 +1676,11 @@ copy_args(int *alen)
struct mstring *s = msnew();
int depth = 0, len = 1;
char c, quote = 0;
int a_lineno = lineno;
char *a_line = dup_line();
char *a_cptr = a_line + (cptr - line - 1);
struct ainfo a;
a.a_lineno = lineno;
a.a_line = dup_line();
a.a_cptr = a.a_line + (cptr - line - 1);
while ((c = *cptr++) != R_PAREN || depth || quote)
{
@ -1673,9 +1697,9 @@ copy_args(int *alen)
if (!line)
{
if (quote)
unterminated_string(a_lineno, a_line, a_cptr);
unterminated_string(&a);
else
unterminated_arglist(a_lineno, a_line, a_cptr);
unterminated_arglist(&a);
}
}
else if (quote)
@ -1700,7 +1724,7 @@ copy_args(int *alen)
}
if (alen)
*alen = len;
FREE(a_line);
FREE(a.a_line);
return msdone(s);
}
@ -1709,13 +1733,13 @@ parse_id(char *p, char **save)
{
char *b;
while (isspace(*p))
while (isspace(UCH(*p)))
if (*p++ == '\n')
rescan_lineno++;
if (!isalpha(*p) && *p != '_')
if (!isalpha(UCH(*p)) && *p != '_')
return NULL;
b = p;
while (isalnum(*p) || *p == '_' || *p == '$')
while (isalnum(UCH(*p)) || *p == '_' || *p == '$')
p++;
if (save)
{
@ -1729,7 +1753,7 @@ parse_int(char *p, int *save)
{
int neg = 0, val = 0;
while (isspace(*p))
while (isspace(UCH(*p)))
if (*p++ == '\n')
rescan_lineno++;
if (*p == '-')
@ -1737,9 +1761,9 @@ parse_int(char *p, int *save)
neg = 1;
p++;
}
if (!isdigit(*p))
if (!isdigit(UCH(*p)))
return NULL;
while (isdigit(*p))
while (isdigit(UCH(*p)))
val = val * 10 + *p++ - '0';
if (neg)
val = -val;
@ -1773,12 +1797,12 @@ parse_arginfo(bucket *a, char *args, int argslen)
return;
for (i = 0; i < argslen; i++)
{
while (isspace(*p))
while (isspace(UCH(*p)))
if (*p++ == '\n')
rescan_lineno++;
if (*p++ != '$')
bad_formals();
while (isspace(*p))
while (isspace(UCH(*p)))
if (*p++ == '\n')
rescan_lineno++;
if (*p == '<')
@ -1786,7 +1810,7 @@ parse_arginfo(bucket *a, char *args, int argslen)
havetags = 1;
if (!(p = parse_id(p + 1, &tmp)))
bad_formals();
while (isspace(*p))
while (isspace(UCH(*p)))
if (*p++ == '\n')
rescan_lineno++;
if (*p++ != '>')
@ -1803,7 +1827,7 @@ parse_arginfo(bucket *a, char *args, int argslen)
a->argtags[i] = NULL;
if (!(p = parse_id(p, &a->argnames[i])))
bad_formals();
while (isspace(*p))
while (isspace(UCH(*p)))
if (*p++ == '\n')
rescan_lineno++;
if (*p++)
@ -1852,7 +1876,7 @@ compile_arg(char **theptr, char *yyvaltag)
if (*++p == '<')
if (!(p = parse_id(++p, &tag)) || *p++ != '>')
illegal_tag(rescan_lineno, NULL, NULL);
if (isdigit(*p) || *p == '-')
if (isdigit(UCH(*p)) || *p == '-')
{
int val;
if (!(p = parse_int(p, &val)))
@ -1876,7 +1900,7 @@ compile_arg(char **theptr, char *yyvaltag)
else if (havetags)
unknown_rhs(val);
}
else if (isalpha(*p) || *p == '_')
else if (isalpha(UCH(*p)) || *p == '_')
{
char *arg;
if (!(p = parse_id(p, &arg)))
@ -1949,7 +1973,7 @@ can_elide_arg(char **theptr, char *yyvaltag)
}
rhs = pitem + nitems - 1;
if (isdigit(*p) || *p == '-')
if (isdigit(UCH(*p)) || *p == '-')
{
int val;
if (!(p = parse_int(p, &val)))
@ -1969,7 +1993,7 @@ can_elide_arg(char **theptr, char *yyvaltag)
}
}
}
else if (isalpha(*p) || *p == '_')
else if (isalpha(UCH(*p)) || *p == '_')
{
char *arg;
if (!(p = parse_id(p, &arg)))
@ -2337,12 +2361,14 @@ copy_action(void)
#endif
char *tag;
FILE *f = action_file;
int a_lineno = lineno;
char *a_line = dup_line();
char *a_cptr = a_line + (cptr - line);
struct ainfo a;
Value_t *offsets = NULL, maxoffset;
bucket **rhs;
a.a_lineno = lineno;
a.a_line = dup_line();
a.a_cptr = a.a_line + (cptr - line);
if (last_was_action)
insert_empty_rule();
last_was_action = 1;
@ -2509,7 +2535,7 @@ copy_action(void)
goto loop;
}
#if defined(YYBTYACC)
else if (isalpha(cptr[1]) || cptr[1] == '_')
else if (isalpha(UCH(cptr[1])) || cptr[1] == '_')
{
char *arg;
++cptr;
@ -2607,7 +2633,7 @@ copy_action(void)
goto loop;
}
fprintf(f, "\nbreak;\n");
FREE(a_line);
FREE(a.a_line);
if (maxoffset > 0)
FREE(offsets);
return;
@ -2621,13 +2647,13 @@ copy_action(void)
get_line();
if (line)
goto loop;
unterminated_action(a_lineno, a_line, a_cptr);
unterminated_action(&a);
case ';':
if (depth > 0)
goto loop;
fprintf(f, "\nbreak;\n");
FREE(a_line);
free(a.a_line);
if (maxoffset > 0)
FREE(offsets);
return;
@ -2670,7 +2696,7 @@ copy_action(void)
}
#endif
fprintf(f, "\nbreak;\n");
FREE(a_line);
free(a.a_line);
if (maxoffset > 0)
FREE(offsets);
return;
@ -2698,32 +2724,27 @@ copy_action(void)
}
#if defined(YYBTYACC)
static void
copy_destructor(void)
static char *
get_code(struct ainfo *a, const char *loc)
{
int c;
int depth;
char *tag;
bucket *bp;
struct mstring *destructor_text = msnew();
char *code_text;
int a_lineno;
char *a_line;
char *a_cptr;
struct mstring *code_mstr = msnew();
if (!lflag)
msprintf(destructor_text, line_format, lineno, input_file_name);
msprintf(code_mstr, line_format, lineno, input_file_name);
cptr = after_blanks(cptr);
if (*cptr == L_CURL)
/* avoid putting curly-braces in first column, to ease editing */
mputc(destructor_text, '\t');
mputc(code_mstr, '\t');
else
syntax_error(lineno, line, cptr);
a_lineno = lineno;
a_line = dup_line();
a_cptr = a_line + (cptr - line);
a->a_lineno = lineno;
a->a_line = dup_line();
a->a_cptr = a->a_line + (cptr - line);
depth = 0;
loop:
@ -2741,7 +2762,7 @@ copy_destructor(void)
c = *cptr;
if (c == '$')
{
msprintf(destructor_text, "(*val).%s", tag);
msprintf(code_mstr, "(*val).%s", tag);
++cptr;
FREE(d_line);
goto loop;
@ -2752,7 +2773,7 @@ copy_destructor(void)
else if (cptr[1] == '$')
{
/* process '$$' later; replacement is context dependent */
msprintf(destructor_text, "$$");
msprintf(code_mstr, "$$");
cptr += 2;
goto loop;
}
@ -2766,7 +2787,7 @@ copy_destructor(void)
char *l_cptr = l_line + (cptr - line);
syntax_error(l_lineno, l_line, l_cptr);
}
msprintf(destructor_text, "(*loc)");
msprintf(code_mstr, "%s", loc);
cptr += 2;
goto loop;
}
@ -2774,21 +2795,21 @@ copy_destructor(void)
{
do
{
mputc(destructor_text, c);
mputc(code_mstr, c);
c = *++cptr;
}
while (isalnum(c) || c == '_' || c == '$');
goto loop;
}
++cptr;
mputc(destructor_text, c);
mputc(code_mstr, c);
switch (c)
{
case '\n':
get_line();
if (line)
goto loop;
unterminated_action(a_lineno, a_line, a_cptr);
unterminated_action(a);
case L_CURL:
++depth;
@ -2797,13 +2818,13 @@ copy_destructor(void)
case R_CURL:
if (--depth > 0)
goto loop;
goto process_symbols;
goto out;
case '\'':
case '"':
{
char *s = copy_string(c);
msprintf(destructor_text, "%s", s);
msprintf(code_mstr, "%s", s);
free(s);
}
goto loop;
@ -2811,7 +2832,7 @@ copy_destructor(void)
case '/':
{
char *s = copy_comment();
msprintf(destructor_text, "%s", s);
msprintf(code_mstr, "%s", s);
free(s);
}
goto loop;
@ -2819,8 +2840,29 @@ copy_destructor(void)
default:
goto loop;
}
process_symbols:
code_text = msdone(destructor_text);
out:
return msdone(code_mstr);
}
static void
copy_initial_action(void)
{
struct ainfo a;
initial_action = get_code(&a, "yyloc");
free(a.a_line);
}
static void
copy_destructor(void)
{
char *code_text;
int c;
struct ainfo a;
bucket *bp;
code_text = get_code(&a, "(*loc)");
for (;;)
{
c = nextc();
@ -2839,7 +2881,7 @@ copy_destructor(void)
default_destructor[UNTYPED_DEFAULT] = bp;
}
if (bp->destructor != NULL)
destructor_redeclared_warning(a_lineno, a_line, a_cptr);
destructor_redeclared_warning(&a);
else
/* replace "$$" with "(*val)" in destructor code */
bp->destructor = process_destructor_XX(code_text, NULL);
@ -2855,7 +2897,7 @@ copy_destructor(void)
default_destructor[TYPED_DEFAULT] = bp;
}
if (bp->destructor != NULL)
destructor_redeclared_warning(a_lineno, a_line, a_cptr);
destructor_redeclared_warning(&a);
else
{
/* postpone re-processing destructor $$s until end of grammar spec */
@ -2866,10 +2908,10 @@ copy_destructor(void)
}
else
{ /* "semantic type" default destructor */
tag = get_tag();
char *tag = get_tag();
bp = lookup_type_destructor(tag);
if (bp->destructor != NULL)
destructor_redeclared_warning(a_lineno, a_line, a_cptr);
destructor_redeclared_warning(&a);
else
/* replace "$$" with "(*val).tag" in destructor code */
bp->destructor = process_destructor_XX(code_text, tag);
@ -2879,7 +2921,7 @@ copy_destructor(void)
{ /* "symbol" destructor */
bp = get_name();
if (bp->destructor != NULL)
destructor_redeclared_warning(a_lineno, a_line, a_cptr);
destructor_redeclared_warning(&a);
else
{
/* postpone re-processing destructor $$s until end of grammar spec */
@ -2891,7 +2933,7 @@ copy_destructor(void)
else
break;
}
free(a_line);
free(a.a_line);
free(code_text);
}

View File

@ -215,6 +215,7 @@ static const YYINT calc1_defred[] = { 1,
0, 24, 0, 26, 0, 0, 23, 25, 14, 0,
0, 0, 0, 0, 0, 0, 0, 12, 13, 17,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT calc1_stos[] = { 0,
262, 256, 257, 258, 259, 45, 40, 263, 264, 265,
10, 61, 61, 257, 258, 263, 264, 263, 264, 43,
@ -223,6 +224,7 @@ static const YYINT calc1_stos[] = { 0,
263, 264, 263, 264, 264, 264, 264, 264, 263, 263,
43, 45, 42, 47, 263, 263, 263, 263, 263, 41,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT calc1_dgoto[] = { 1,
32, 9, 10,
};
@ -613,7 +615,7 @@ vdiv(double a, double b, INTERVAL v)
{
return (hilo(a / v.hi, a / v.lo, b / v.hi, b / v.lo));
}
#line 617 "btyacc_calc1.tab.c"
#line 619 "btyacc_calc1.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -792,9 +794,9 @@ YYPARSE_DECL()
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
int yym, yyn, yystate, yyresult;
#if YYBTYACC
@ -866,10 +868,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -879,7 +881,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -980,7 +982,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -1004,7 +1006,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1523,7 +1525,7 @@ case 28:
yyval.vval = yystack.l_mark[-1].vval;
}
break;
#line 1527 "btyacc_calc1.tab.c"
#line 1529 "btyacc_calc1.tab.c"
default:
break;
}
@ -1578,12 +1580,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1594,7 +1596,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -173,9 +173,11 @@ typedef struct YYLTYPE
int first_column;
int last_line;
int last_column;
unsigned source;
} YYLTYPE;
#define YYLTYPE_IS_DECLARED 1
#endif
#define YYRHSLOC(rhs, k) ((rhs)[k])
/* compatibility with bison */
#ifdef YYPARSE_PARAM
@ -200,10 +202,10 @@ typedef struct YYLTYPE
/* Parameters sent to yyerror. */
#ifndef YYERROR_DECL
#define YYERROR_DECL() yyerror(YYLTYPE loc, const char *s)
#define YYERROR_DECL() yyerror(YYLTYPE *loc, const char *s)
#endif
#ifndef YYERROR_CALL
#define YYERROR_CALL(msg) yyerror(yylloc, msg)
#define YYERROR_CALL(msg) yyerror(&yylloc, msg)
#endif
#ifndef YYDESTRUCT_DECL
@ -258,6 +260,7 @@ static const YYINT demo_defred[] = { 5,
45, 44, 0, 0, 49, 58, 0, 30, 50, 56,
0, 0, 0, 51, 0, 0, 52, 0, 53,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT demo_stos[] = { 0,
271, 289, 275, 290, 261, 262, 263, 264, 265, 269,
273, 281, 282, 283, 285, 286, 42, 40, 259, 274,
@ -270,6 +273,7 @@ static const YYINT demo_stos[] = { 0,
272, 272, 266, 272, 273, 276, 298, 40, 59, 278,
294, 272, 41, 267, 296, 276, 268, 297, 276,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT demo_dgoto[] = { 1,
84, 85, 20, 3, 86, 66, 40, 21, 44, 12,
13, 14, 24, 15, 16, 46, 47, 2, 22, 30,
@ -624,9 +628,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 200 "btyacc_demo.y"
@ -656,7 +660,7 @@ extern Expr * var_expr(Scope *scope, char *id);
extern Code * build_expr_code(Expr *expr);
extern Code * build_if(Expr *cond_expr, Code *then_stmt, Code *else_stmt);
extern Code * code_append(Code *stmt_list, Code *stmt);
#line 660 "btyacc_demo.tab.c"
#line 664 "btyacc_demo.tab.c"
/* Release memory associated with symbol. */
#if ! defined YYDESTRUCT_IS_DECLARED
@ -673,7 +677,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 677 "btyacc_demo.tab.c"
#line 681 "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",
@ -682,7 +686,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 686 "btyacc_demo.tab.c"
#line 690 "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",
@ -691,7 +695,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 695 "btyacc_demo.tab.c"
#line 699 "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",
@ -700,7 +704,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 704 "btyacc_demo.tab.c"
#line 708 "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",
@ -709,7 +713,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 713 "btyacc_demo.tab.c"
#line 717 "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",
@ -718,7 +722,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 722 "btyacc_demo.tab.c"
#line 726 "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",
@ -727,7 +731,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 731 "btyacc_demo.tab.c"
#line 735 "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",
@ -736,7 +740,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 740 "btyacc_demo.tab.c"
#line 744 "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",
@ -745,7 +749,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 749 "btyacc_demo.tab.c"
#line 753 "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",
@ -754,7 +758,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 758 "btyacc_demo.tab.c"
#line 762 "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",
@ -763,7 +767,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).id); }
break;
#line 767 "btyacc_demo.tab.c"
#line 771 "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",
@ -772,7 +776,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).expr); }
break;
#line 776 "btyacc_demo.tab.c"
#line 780 "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",
@ -781,7 +785,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 785 "btyacc_demo.tab.c"
#line 789 "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",
@ -790,7 +794,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 794 "btyacc_demo.tab.c"
#line 798 "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",
@ -799,7 +803,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 803 "btyacc_demo.tab.c"
#line 807 "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",
@ -808,7 +812,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 812 "btyacc_demo.tab.c"
#line 816 "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",
@ -817,7 +821,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 821 "btyacc_demo.tab.c"
#line 825 "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",
@ -826,7 +830,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 830 "btyacc_demo.tab.c"
#line 834 "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",
@ -835,7 +839,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 839 "btyacc_demo.tab.c"
#line 843 "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",
@ -844,7 +848,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 848 "btyacc_demo.tab.c"
#line 852 "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",
@ -853,7 +857,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 857 "btyacc_demo.tab.c"
#line 861 "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",
@ -862,7 +866,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 866 "btyacc_demo.tab.c"
#line 870 "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",
@ -871,7 +875,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 875 "btyacc_demo.tab.c"
#line 879 "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",
@ -880,7 +884,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 884 "btyacc_demo.tab.c"
#line 888 "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",
@ -889,7 +893,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 893 "btyacc_demo.tab.c"
#line 897 "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",
@ -898,7 +902,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 902 "btyacc_demo.tab.c"
#line 906 "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",
@ -907,7 +911,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 911 "btyacc_demo.tab.c"
#line 915 "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",
@ -916,7 +920,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 920 "btyacc_demo.tab.c"
#line 924 "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",
@ -925,7 +929,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 929 "btyacc_demo.tab.c"
#line 933 "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",
@ -934,7 +938,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).expr); }
break;
#line 938 "btyacc_demo.tab.c"
#line 942 "btyacc_demo.tab.c"
case 273:
#line 67 "btyacc_demo.y"
{ /* 'msg' is a 'char *' indicating the context of destructor invocation*/
@ -944,7 +948,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).decl->scope); free((*val).decl->type); }
break;
#line 948 "btyacc_demo.tab.c"
#line 952 "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",
@ -953,7 +957,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 957 "btyacc_demo.tab.c"
#line 961 "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",
@ -962,7 +966,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
/* in this example, we don't know what to do here */ }
break;
#line 966 "btyacc_demo.tab.c"
#line 970 "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",
@ -971,7 +975,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).code); }
break;
#line 975 "btyacc_demo.tab.c"
#line 979 "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",
@ -980,7 +984,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).code); }
break;
#line 984 "btyacc_demo.tab.c"
#line 988 "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",
@ -989,7 +993,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).code); }
break;
#line 993 "btyacc_demo.tab.c"
#line 997 "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",
@ -998,7 +1002,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).decl); }
break;
#line 1002 "btyacc_demo.tab.c"
#line 1006 "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",
@ -1007,7 +1011,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).decl); }
break;
#line 1011 "btyacc_demo.tab.c"
#line 1015 "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",
@ -1016,7 +1020,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).type); }
break;
#line 1020 "btyacc_demo.tab.c"
#line 1024 "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",
@ -1025,7 +1029,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).type); }
break;
#line 1029 "btyacc_demo.tab.c"
#line 1033 "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",
@ -1034,7 +1038,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).type); }
break;
#line 1038 "btyacc_demo.tab.c"
#line 1042 "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",
@ -1043,7 +1047,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).type); }
break;
#line 1047 "btyacc_demo.tab.c"
#line 1051 "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",
@ -1052,7 +1056,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).type); }
break;
#line 1056 "btyacc_demo.tab.c"
#line 1060 "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",
@ -1061,7 +1065,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
break;
#line 1065 "btyacc_demo.tab.c"
#line 1069 "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",
@ -1070,7 +1074,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).dlist); }
break;
#line 1074 "btyacc_demo.tab.c"
#line 1078 "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",
@ -1079,7 +1083,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).dlist); }
break;
#line 1083 "btyacc_demo.tab.c"
#line 1087 "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",
@ -1088,7 +1092,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
break;
#line 1092 "btyacc_demo.tab.c"
#line 1096 "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",
@ -1097,7 +1101,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
break;
#line 1101 "btyacc_demo.tab.c"
#line 1105 "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",
@ -1106,7 +1110,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
break;
#line 1110 "btyacc_demo.tab.c"
#line 1114 "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",
@ -1115,7 +1119,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
break;
#line 1119 "btyacc_demo.tab.c"
#line 1123 "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",
@ -1124,7 +1128,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).type); }
break;
#line 1128 "btyacc_demo.tab.c"
#line 1132 "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",
@ -1133,7 +1137,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
break;
#line 1137 "btyacc_demo.tab.c"
#line 1141 "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",
@ -1142,7 +1146,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).type); }
break;
#line 1146 "btyacc_demo.tab.c"
#line 1150 "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",
@ -1151,7 +1155,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
break;
#line 1155 "btyacc_demo.tab.c"
#line 1159 "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",
@ -1160,7 +1164,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
break;
#line 1164 "btyacc_demo.tab.c"
#line 1168 "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",
@ -1169,7 +1173,7 @@ YYDESTRUCT_DECL()
(*loc).last_line, (*loc).last_column);
free((*val).scope); }
break;
#line 1173 "btyacc_demo.tab.c"
#line 1177 "btyacc_demo.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -1376,10 +1380,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -1389,7 +1393,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -1490,7 +1494,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -1514,7 +1518,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -2099,7 +2103,7 @@ case 59:
#line 197 "btyacc_demo.y"
{ yyval.code = yystack.l_mark[-1].code; }
break;
#line 2103 "btyacc_demo.tab.c"
#line 2107 "btyacc_demo.tab.c"
default:
break;
}
@ -2154,12 +2158,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -2170,7 +2174,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -33,4 +33,18 @@ typedef union {
#endif /* !YYSTYPE_IS_DECLARED */
extern YYSTYPE demo_lval;
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
/* Default: YYLTYPE is the text position type. */
typedef struct YYLTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
unsigned source;
} YYLTYPE;
#define YYLTYPE_IS_DECLARED 1
#endif
#define YYRHSLOC(rhs, k) ((rhs)[k])
#endif /* _demo__defines_h_ */

View File

@ -214,11 +214,13 @@ static const YYINT destroy1_defred[] = { 0,
0, 0, 0, 7, 0, 0, 0, 0, 0, 2,
0, 0, 0, 0, 9, 1,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT destroy1_stos[] = { 0,
257, 258, 259, 260, 263, 265, 266, 266, 261, 264,
267, 267, 40, 261, 40, 40, 265, 258, 265, 41,
44, 44, 266, 266, 41, 41,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT destroy1_dgoto[] = { 5,
10, 6, 7, 11,
};
@ -475,15 +477,15 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 89 "btyacc_destroy1.y"
extern int YYLEX_DECL();
extern void YYERROR_DECL();
#line 487 "btyacc_destroy1.tab.c"
#line 489 "btyacc_destroy1.tab.c"
/* Release memory associated with symbol. */
#if ! defined YYDESTRUCT_IS_DECLARED
@ -503,7 +505,7 @@ YYDESTRUCT_DECL()
}
}
break;
#line 507 "btyacc_destroy1.tab.c"
#line 509 "btyacc_destroy1.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -710,10 +712,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -723,7 +725,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -824,7 +826,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -848,7 +850,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1223,7 +1225,7 @@ case 9:
#line 86 "btyacc_destroy1.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
break;
#line 1227 "btyacc_destroy1.tab.c"
#line 1229 "btyacc_destroy1.tab.c"
default:
break;
}
@ -1278,12 +1280,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1294,7 +1296,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -214,11 +214,13 @@ static const YYINT destroy2_defred[] = { 0,
0, 0, 0, 7, 0, 0, 0, 0, 0, 2,
0, 0, 0, 0, 9, 1,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT destroy2_stos[] = { 0,
257, 258, 259, 260, 263, 265, 266, 266, 261, 264,
267, 267, 40, 261, 40, 40, 265, 258, 265, 41,
44, 44, 266, 266, 41, 41,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT destroy2_dgoto[] = { 5,
10, 6, 7, 11,
};
@ -475,15 +477,15 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 89 "btyacc_destroy2.y"
extern int YYLEX_DECL();
extern void YYERROR_DECL();
#line 487 "btyacc_destroy2.tab.c"
#line 489 "btyacc_destroy2.tab.c"
/* Release memory associated with symbol. */
#if ! defined YYDESTRUCT_IS_DECLARED
@ -503,7 +505,7 @@ YYDESTRUCT_DECL()
}
}
break;
#line 507 "btyacc_destroy2.tab.c"
#line 509 "btyacc_destroy2.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -710,10 +712,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -723,7 +725,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -824,7 +826,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -848,7 +850,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1223,7 +1225,7 @@ case 9:
#line 86 "btyacc_destroy2.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
break;
#line 1227 "btyacc_destroy2.tab.c"
#line 1229 "btyacc_destroy2.tab.c"
default:
break;
}
@ -1278,12 +1280,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1294,7 +1296,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -214,11 +214,13 @@ static const YYINT destroy3_defred[] = { 0,
0, 0, 0, 7, 0, 0, 0, 0, 0, 2,
0, 0, 0, 0, 9, 1,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT destroy3_stos[] = { 0,
257, 258, 259, 260, 263, 265, 266, 266, 261, 264,
267, 267, 40, 261, 40, 40, 265, 258, 265, 41,
44, 44, 266, 266, 41, 41,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT destroy3_dgoto[] = { 5,
10, 6, 7, 11,
};
@ -475,15 +477,15 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 92 "btyacc_destroy3.y"
extern int YYLEX_DECL();
extern void YYERROR_DECL();
#line 487 "btyacc_destroy3.tab.c"
#line 489 "btyacc_destroy3.tab.c"
/* Release memory associated with symbol. */
#if ! defined YYDESTRUCT_IS_DECLARED
@ -503,7 +505,7 @@ YYDESTRUCT_DECL()
}
}
break;
#line 507 "btyacc_destroy3.tab.c"
#line 509 "btyacc_destroy3.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -710,10 +712,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -723,7 +725,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -824,7 +826,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -848,7 +850,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1223,7 +1225,7 @@ case 9:
#line 89 "btyacc_destroy3.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
break;
#line 1227 "btyacc_destroy3.tab.c"
#line 1229 "btyacc_destroy3.tab.c"
default:
break;
}
@ -1278,12 +1280,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1294,7 +1296,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -185,12 +185,14 @@ static const YYINT calc_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 9,
10, 11,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT calc_stos[] = { 0,
261, 256, 257, 258, 45, 40, 262, 263, 264, 10,
61, 258, 263, 263, 10, 124, 38, 43, 45, 42,
47, 37, 257, 263, 41, 263, 263, 263, 263, 263,
263, 263,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT calc_dgoto[] = { 1,
7, 8, 9,
};
@ -456,9 +458,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 66 "calc.y"
/* start of programs */
@ -502,7 +504,7 @@ yylex(void)
}
return( c );
}
#line 506 "calc.tab.c"
#line 508 "calc.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -705,10 +707,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -718,7 +720,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -819,7 +821,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -843,7 +845,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1229,7 +1231,7 @@ case 18:
#line 63 "calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1233 "calc.tab.c"
#line 1235 "calc.tab.c"
default:
break;
}
@ -1284,12 +1286,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1300,7 +1302,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -215,6 +215,7 @@ static const YYINT calc1_defred[] = { 0,
0, 0, 0, 0, 5, 6, 0, 0, 0, 12,
13, 17,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT calc1_stos[] = { 0,
256, 257, 258, 259, 45, 40, 262, 263, 264, 10,
61, 61, 257, 258, 263, 264, 263, 264, 43, 45,
@ -224,6 +225,7 @@ static const YYINT calc1_stos[] = { 0,
43, 45, 42, 47, 10, 10, 263, 263, 263, 263,
263, 41,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT calc1_dgoto[] = { 7,
32, 9, 0,
};
@ -511,9 +513,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 176 "calc1.y"
/* beginning of subroutines section */
@ -646,7 +648,7 @@ vdiv(double a, double b, INTERVAL v)
{
return (hilo(a / v.hi, a / v.lo, b / v.hi, b / v.lo));
}
#line 650 "calc1.tab.c"
#line 652 "calc1.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -849,10 +851,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -862,7 +864,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -963,7 +965,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -987,7 +989,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1476,7 +1478,7 @@ case 28:
yyval.vval = yystack.l_mark[-1].vval;
}
break;
#line 1480 "calc1.tab.c"
#line 1482 "calc1.tab.c"
default:
break;
}
@ -1531,12 +1533,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1547,7 +1549,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -187,12 +187,14 @@ static const YYINT calc2_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 9,
10, 11,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT calc2_stos[] = { 0,
261, 256, 257, 258, 45, 40, 262, 263, 264, 10,
61, 258, 263, 263, 10, 124, 38, 43, 45, 42,
47, 37, 257, 263, 41, 263, 263, 263, 263, 263,
263, 263,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT calc2_dgoto[] = { 1,
7, 8, 9,
};
@ -458,9 +460,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 73 "calc2.y"
/* start of programs */
@ -515,7 +517,7 @@ YYLEX_DECL()
}
return( c );
}
#line 519 "calc2.tab.c"
#line 521 "calc2.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -718,10 +720,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -731,7 +733,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -832,7 +834,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -856,7 +858,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1242,7 +1244,7 @@ case 18:
#line 70 "calc2.y"
{ yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1246 "calc2.tab.c"
#line 1248 "calc2.tab.c"
default:
break;
}
@ -1297,12 +1299,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1313,7 +1315,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -192,12 +192,14 @@ static const YYINT calc3_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 9,
10, 11,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT calc3_stos[] = { 0,
261, 256, 257, 258, 45, 40, 262, 263, 264, 10,
61, 258, 263, 263, 10, 124, 38, 43, 45, 42,
47, 37, 257, 263, 41, 263, 263, 263, 263, 263,
263, 263,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT calc3_dgoto[] = { 1,
7, 8, 9,
};
@ -470,7 +472,7 @@ YYLEX_DECL()
}
return( c );
}
#line 474 "calc3.tab.c"
#line 476 "calc3.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -649,9 +651,9 @@ YYPARSE_DECL()
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
int yym, yyn, yystate, yyresult;
#if YYBTYACC
@ -723,10 +725,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -736,7 +738,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -837,7 +839,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -861,7 +863,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1247,7 +1249,7 @@ case 18:
#line 73 "calc3.y"
{ yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1251 "calc3.tab.c"
#line 1253 "calc3.tab.c"
default:
break;
}
@ -1302,12 +1304,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1318,7 +1320,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -327,9 +327,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 70 "code_calc.y"
/* start of programs */
@ -580,10 +580,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -593,7 +593,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -694,7 +694,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -718,7 +718,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1159,12 +1159,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1175,7 +1175,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -16,12 +16,14 @@ const YYINT calc_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 9,
10, 11,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
const YYINT calc_stos[] = { 0,
261, 256, 257, 258, 45, 40, 262, 263, 264, 10,
61, 258, 263, 263, 10, 124, 38, 43, 45, 42,
47, 37, 257, 263, 41, 263, 263, 263, 263, 263,
263, 263,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
const YYINT calc_dgoto[] = { 1,
7, 8, 9,
};

View File

@ -317,9 +317,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 12 "code_error.y"
@ -550,10 +550,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -563,7 +563,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -664,7 +664,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -688,7 +688,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1068,12 +1068,12 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1084,7 +1084,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -11,9 +11,11 @@ const YYINT error_len[] = { 2,
const YYINT error_defred[] = { 0,
1, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
const YYINT error_stos[] = { 0,
256, 258,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
const YYINT error_dgoto[] = { 2,
};
const YYINT error_sindex[] = { -256,

View File

@ -174,9 +174,11 @@ static const YYINT empty_len[] = { 2,
static const YYINT empty_defred[] = { 1,
0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT empty_stos[] = { 0,
258,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT empty_dgoto[] = { 1,
};
static const YYINT empty_sindex[] = { 0,
@ -347,9 +349,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 13 "empty.y"
@ -364,7 +366,7 @@ static void
YYERROR_DECL() {
printf("%s\n",s);
}
#line 368 "empty.tab.c"
#line 370 "empty.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -567,10 +569,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -580,7 +582,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -681,7 +683,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -705,7 +707,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1085,12 +1087,12 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1101,7 +1103,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -210,10 +210,12 @@ static const YYINT err_inherit3_defred[] = { 0,
5, 6, 7, 8, 0, 0, 12, 1, 4, 2,
2, 0, 0, 11, 13, 0, 3, 0, 10,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT err_inherit3_stos[] = { 0,
257, 258, 259, 260, 263, 266, 267, 267, 265, 271,
268, 269, 269, 261, 264, 270, 264, 264, 261,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT err_inherit3_dgoto[] = { 5,
15, 9, 6, 7, 11, 12, 16, 10,
};
@ -408,15 +410,15 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 78 "err_inherit3.y"
extern int YYLEX_DECL();
extern void YYERROR_DECL();
#line 420 "err_inherit3.tab.c"
#line 422 "err_inherit3.tab.c"
/* Release memory associated with symbol. */
#if ! defined YYDESTRUCT_IS_DECLARED
@ -436,7 +438,7 @@ YYDESTRUCT_DECL()
}
}
break;
#line 440 "err_inherit3.tab.c"
#line 442 "err_inherit3.tab.c"
case 264:
#line 30 "err_inherit3.y"
{
@ -448,7 +450,7 @@ YYDESTRUCT_DECL()
}
}
break;
#line 452 "err_inherit3.tab.c"
#line 454 "err_inherit3.tab.c"
case 265:
#line 30 "err_inherit3.y"
{
@ -460,7 +462,7 @@ YYDESTRUCT_DECL()
}
}
break;
#line 464 "err_inherit3.tab.c"
#line 466 "err_inherit3.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -667,10 +669,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -680,7 +682,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -781,7 +783,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -805,7 +807,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1187,7 +1189,7 @@ case 13:
#line 75 "err_inherit3.y"
{ yyval.nlist = yystack.l_mark[0].nlist; }
break;
#line 1191 "err_inherit3.tab.c"
#line 1193 "err_inherit3.tab.c"
default:
break;
}
@ -1242,12 +1244,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1258,7 +1260,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -169,9 +169,11 @@ typedef struct YYLTYPE
int first_column;
int last_line;
int last_column;
unsigned source;
} YYLTYPE;
#define YYLTYPE_IS_DECLARED 1
#endif
#define YYRHSLOC(rhs, k) ((rhs)[k])
/* compatibility with bison */
#ifdef YYPARSE_PARAM
@ -196,10 +198,10 @@ typedef struct YYLTYPE
/* Parameters sent to yyerror. */
#ifndef YYERROR_DECL
#define YYERROR_DECL() yyerror(YYLTYPE loc, const char *s)
#define YYERROR_DECL() yyerror(YYLTYPE *loc, const char *s)
#endif
#ifndef YYERROR_CALL
#define YYERROR_CALL(msg) yyerror(yylloc, msg)
#define YYERROR_CALL(msg) yyerror(&yylloc, msg)
#endif
#ifndef YYDESTRUCT_DECL
@ -230,10 +232,12 @@ static const YYINT err_inherit4_defred[] = { 0,
5, 6, 7, 8, 0, 0, 0, 1, 10, 0,
4, 2, 9, 0, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT err_inherit4_stos[] = { 0,
257, 258, 259, 260, 263, 266, 267, 267, 261, 264,
265, 268, 261, 269, 264,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT err_inherit4_dgoto[] = { 5,
10, 11, 6, 7, 12, 14,
};
@ -425,15 +429,15 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 80 "err_inherit4.y"
extern int YYLEX_DECL();
extern void YYERROR_DECL();
#line 437 "err_inherit4.tab.c"
#line 441 "err_inherit4.tab.c"
/* Release memory associated with symbol. */
#if ! defined YYDESTRUCT_IS_DECLARED
@ -446,17 +450,17 @@ YYDESTRUCT_DECL()
#line 28 "err_inherit4.y"
{ }
break;
#line 450 "err_inherit4.tab.c"
#line 454 "err_inherit4.tab.c"
case 264:
#line 28 "err_inherit4.y"
{ }
break;
#line 455 "err_inherit4.tab.c"
#line 459 "err_inherit4.tab.c"
case 265:
#line 28 "err_inherit4.y"
{ }
break;
#line 460 "err_inherit4.tab.c"
#line 464 "err_inherit4.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -663,10 +667,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -676,7 +680,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -777,7 +781,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -801,7 +805,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1175,7 +1179,7 @@ case 11:
#line 77 "err_inherit4.y"
{ yyval.nlist = yystack.l_mark[0].nlist; yyloc = yystack.p_mark[1]; }
break;
#line 1179 "err_inherit4.tab.c"
#line 1183 "err_inherit4.tab.c"
default:
break;
}
@ -1230,12 +1234,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1246,7 +1250,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -22,4 +22,18 @@ typedef union
#endif /* !YYSTYPE_IS_DECLARED */
extern YYSTYPE err_inherit4_lval;
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
/* Default: YYLTYPE is the text position type. */
typedef struct YYLTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
unsigned source;
} YYLTYPE;
#define YYLTYPE_IS_DECLARED 1
#endif
#define YYRHSLOC(rhs, k) ((rhs)[k])
#endif /* _err_inherit4__defines_h_ */

View File

@ -164,9 +164,11 @@ static const YYINT err_syntax10_len[] = { 2,
static const YYINT err_syntax10_defred[] = { 0,
1, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT err_syntax10_stos[] = { 0,
256, 258,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT err_syntax10_dgoto[] = { 2,
};
static const YYINT err_syntax10_sindex[] = { -256,
@ -337,9 +339,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 12 "err_syntax10.y"
@ -363,7 +365,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
#line 367 "err_syntax10.tab.c"
#line 369 "err_syntax10.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -566,10 +568,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -579,7 +581,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -680,7 +682,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -704,7 +706,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1084,12 +1086,12 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1100,7 +1102,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -170,9 +170,11 @@ static const YYINT err_syntax11_len[] = { 2,
static const YYINT err_syntax11_defred[] = { 0,
1, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT err_syntax11_stos[] = { 0,
256, 258,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT err_syntax11_dgoto[] = { 2,
};
static const YYINT err_syntax11_sindex[] = { -256,
@ -343,9 +345,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 12 "err_syntax11.y"
@ -369,7 +371,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
#line 373 "err_syntax11.tab.c"
#line 375 "err_syntax11.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -572,10 +574,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -585,7 +587,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -686,7 +688,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -710,7 +712,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1090,12 +1092,12 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1106,7 +1108,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -171,9 +171,11 @@ static const YYINT err_syntax12_len[] = { 2,
static const YYINT err_syntax12_defred[] = { 0,
1, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT err_syntax12_stos[] = { 0,
256, 458,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT err_syntax12_dgoto[] = { 2,
};
static const YYINT err_syntax12_sindex[] = { -256,
@ -349,9 +351,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 12 "err_syntax12.y"
@ -375,7 +377,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
#line 379 "err_syntax12.tab.c"
#line 381 "err_syntax12.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -578,10 +580,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -591,7 +593,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -692,7 +694,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -716,7 +718,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1096,12 +1098,12 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1112,7 +1114,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -170,9 +170,11 @@ static const YYINT err_syntax18_len[] = { 2,
static const YYINT err_syntax18_defred[] = { 0,
0, 0, 0, 1,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT err_syntax18_stos[] = { 0,
40, 258, 258, 41,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT err_syntax18_dgoto[] = { 2,
};
static const YYINT err_syntax18_sindex[] = { -40,
@ -346,9 +348,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 13 "err_syntax18.y"
@ -372,7 +374,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
#line 376 "err_syntax18.tab.c"
#line 378 "err_syntax18.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -575,10 +577,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -588,7 +590,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -689,7 +691,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -713,7 +715,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1043,7 +1045,7 @@ case 1:
#line 9 "err_syntax18.y"
{ yyval = yystack.l_mark[1]; }
break;
#line 1047 "err_syntax18.tab.c"
#line 1049 "err_syntax18.tab.c"
default:
break;
}
@ -1098,12 +1100,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1114,7 +1116,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -165,9 +165,11 @@ static const YYINT err_syntax20_len[] = { 2,
static const YYINT err_syntax20_defred[] = { 0,
0, 0, 0, 1,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT err_syntax20_stos[] = { 0,
40, 259, 257, 41,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT err_syntax20_dgoto[] = { 2,
};
static const YYINT err_syntax20_sindex[] = { -40,
@ -341,9 +343,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 16 "err_syntax20.y"
@ -367,7 +369,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
#line 371 "err_syntax20.tab.c"
#line 373 "err_syntax20.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -570,10 +572,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -583,7 +585,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -684,7 +686,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -708,7 +710,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1038,7 +1040,7 @@ case 1:
#line 12 "err_syntax20.y"
{ yystack.l_mark[-1].rechk = 3; }
break;
#line 1042 "err_syntax20.tab.c"
#line 1044 "err_syntax20.tab.c"
default:
break;
}
@ -1093,12 +1095,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1109,7 +1111,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -170,9 +170,11 @@ static const YYINT error_len[] = { 2,
static const YYINT error_defred[] = { 0,
1, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT error_stos[] = { 0,
256, 258,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT error_dgoto[] = { 2,
};
static const YYINT error_sindex[] = { -256,
@ -342,9 +344,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 8 "error.y"
@ -368,7 +370,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
#line 372 "error.tab.c"
#line 374 "error.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -571,10 +573,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -584,7 +586,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -685,7 +687,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -709,7 +711,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1089,12 +1091,12 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1105,7 +1107,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -519,6 +519,7 @@ static const YYINT grammar_defred[] = { 0,
29, 114, 0, 0, 0, 109, 0, 93, 95, 102,
18, 0, 0, 108, 113, 112, 0, 24, 27, 111,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT grammar_stos[] = { 0,
256, 40, 42, 38, 257, 258, 259, 260, 261, 262,
263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
@ -536,6 +537,7 @@ static const YYINT grammar_stos[] = { 0,
285, 41, 305, 307, 40, 283, 306, 286, 309, 316,
59, 44, 331, 41, 41, 41, 307, 303, 285, 41,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT grammar_dgoto[] = { 33,
87, 35, 36, 37, 38, 39, 40, 69, 70, 41,
42, 119, 120, 100, 101, 102, 103, 104, 43, 44,
@ -1166,9 +1168,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 1014 "grammar.y"
@ -1341,7 +1343,7 @@ free_parser(void)
#endif
}
#endif
#line 1345 "grammar.tab.c"
#line 1347 "grammar.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -1544,10 +1546,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -1557,7 +1559,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -1658,7 +1660,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -1682,7 +1684,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -2682,7 +2684,7 @@ case 114:
yyval.declarator->func_def = FUNC_ANSI;
}
break;
#line 2686 "grammar.tab.c"
#line 2688 "grammar.tab.c"
default:
break;
}
@ -2737,12 +2739,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -2753,7 +2755,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -184,10 +184,12 @@ static const YYINT inherit0_defred[] = { 0,
3, 4, 5, 6, 0, 0, 9, 0, 2, 10,
8, 0, 0, 7, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT inherit0_stos[] = { 0,
257, 258, 259, 260, 263, 264, 265, 265, 267, 268,
261, 266, 269, 261, 266,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT inherit0_dgoto[] = { 5,
6, 7, 12, 9, 10, 13,
};
@ -379,15 +381,15 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 46 "inherit0.y"
extern int YYLEX_DECL();
extern void YYERROR_DECL();
#line 391 "inherit0.tab.c"
#line 393 "inherit0.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -590,10 +592,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -603,7 +605,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -704,7 +706,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -728,7 +730,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1098,7 +1100,7 @@ case 11:
#line 43 "inherit0.y"
{ yyval = yystack.l_mark[0]; }
break;
#line 1102 "inherit0.tab.c"
#line 1104 "inherit0.tab.c"
default:
break;
}
@ -1153,12 +1155,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1169,7 +1171,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -205,10 +205,12 @@ static const YYINT inherit1_defred[] = { 0,
3, 4, 5, 6, 0, 0, 9, 0, 2, 10,
8, 0, 0, 7, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT inherit1_stos[] = { 0,
257, 258, 259, 260, 263, 266, 267, 267, 265, 268,
261, 264, 269, 261, 264,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT inherit1_dgoto[] = { 5,
12, 9, 6, 7, 10, 13,
};
@ -400,15 +402,15 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 74 "inherit1.y"
extern int YYLEX_DECL();
extern void YYERROR_DECL();
#line 412 "inherit1.tab.c"
#line 414 "inherit1.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -611,10 +613,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -624,7 +626,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -725,7 +727,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -749,7 +751,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1123,7 +1125,7 @@ case 11:
#line 71 "inherit1.y"
{ yyval.nlist = yystack.l_mark[0].nlist; }
break;
#line 1127 "inherit1.tab.c"
#line 1129 "inherit1.tab.c"
default:
break;
}
@ -1178,12 +1180,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1194,7 +1196,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -210,10 +210,12 @@ static const YYINT inherit2_defred[] = { 0,
5, 6, 7, 8, 0, 0, 11, 1, 4, 2,
2, 0, 0, 10, 0, 0, 9,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT inherit2_stos[] = { 0,
257, 258, 259, 260, 263, 266, 267, 267, 265, 270,
268, 269, 269, 261, 264, 264, 261,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT inherit2_dgoto[] = { 5,
15, 9, 6, 7, 11, 12, 10,
};
@ -407,15 +409,15 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 78 "inherit2.y"
extern int YYLEX_DECL();
extern void YYERROR_DECL();
#line 419 "inherit2.tab.c"
#line 421 "inherit2.tab.c"
/* Release memory associated with symbol. */
#if ! defined YYDESTRUCT_IS_DECLARED
@ -435,7 +437,7 @@ YYDESTRUCT_DECL()
}
}
break;
#line 439 "inherit2.tab.c"
#line 441 "inherit2.tab.c"
case 264:
#line 30 "inherit2.y"
{
@ -447,7 +449,7 @@ YYDESTRUCT_DECL()
}
}
break;
#line 451 "inherit2.tab.c"
#line 453 "inherit2.tab.c"
case 265:
#line 30 "inherit2.y"
{
@ -459,7 +461,7 @@ YYDESTRUCT_DECL()
}
}
break;
#line 463 "inherit2.tab.c"
#line 465 "inherit2.tab.c"
}
}
#define YYDESTRUCT_IS_DECLARED 1
@ -666,10 +668,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -679,7 +681,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -780,7 +782,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -804,7 +806,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1182,7 +1184,7 @@ case 12:
#line 75 "inherit2.y"
{ yyval.nlist = yystack.l_mark[0].nlist; }
break;
#line 1186 "inherit2.tab.c"
#line 1188 "inherit2.tab.c"
default:
break;
}
@ -1237,12 +1239,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1253,7 +1255,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -213,12 +213,14 @@ static const YYINT ok_syntax1_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 9,
10, 11,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT ok_syntax1_stos[] = { 0,
275, 256, 257, 258, 45, 40, 276, 277, 278, 10,
61, 258, 277, 277, 10, 124, 38, 43, 45, 42,
47, 37, 257, 277, 41, 277, 277, 277, 277, 277,
277, 277,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT ok_syntax1_dgoto[] = { 1,
7, 8, 9,
};
@ -493,7 +495,7 @@ YYLEX_DECL()
}
return( c );
}
#line 497 "ok_syntax1.tab.c"
#line 499 "ok_syntax1.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -672,9 +674,9 @@ YYPARSE_DECL()
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
int yym, yyn, yystate, yyresult;
#if YYBTYACC
@ -746,10 +748,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -759,7 +761,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -860,7 +862,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -884,7 +886,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1270,7 +1272,7 @@ case 18:
#line 101 "ok_syntax1.y"
{ yyval.ival = (*base) * yystack.l_mark[-1].ival + yystack.l_mark[0].ival; }
break;
#line 1274 "ok_syntax1.tab.c"
#line 1276 "ok_syntax1.tab.c"
default:
break;
}
@ -1325,12 +1327,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1341,7 +1343,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -195,12 +195,14 @@ static const YYINT calc_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 9,
10, 11,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT calc_stos[] = { 0,
261, 256, 257, 258, 45, 40, 262, 263, 264, 10,
61, 258, 263, 263, 10, 124, 38, 43, 45, 42,
47, 37, 257, 263, 41, 263, 263, 263, 263, 263,
263, 263,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT calc_dgoto[] = { 1,
7, 8, 9,
};
@ -466,7 +468,7 @@ YYLEX_DECL()
}
return( c );
}
#line 470 "pure_calc.tab.c"
#line 472 "pure_calc.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -645,9 +647,9 @@ YYPARSE_DECL()
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
int yym, yyn, yystate, yyresult;
#if YYBTYACC
@ -719,10 +721,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -732,7 +734,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -833,7 +835,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -857,7 +859,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1243,7 +1245,7 @@ case 18:
#line 69 "pure_calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1247 "pure_calc.tab.c"
#line 1249 "pure_calc.tab.c"
default:
break;
}
@ -1298,12 +1300,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1314,7 +1316,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -182,9 +182,11 @@ static const YYINT error_len[] = { 2,
static const YYINT error_defred[] = { 0,
1, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT error_stos[] = { 0,
256, 258,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT error_dgoto[] = { 2,
};
static const YYINT error_sindex[] = { -256,
@ -334,7 +336,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
#line 338 "pure_error.tab.c"
#line 340 "pure_error.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -513,9 +515,9 @@ YYPARSE_DECL()
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
int yym, yyn, yystate, yyresult;
#if YYBTYACC
@ -587,10 +589,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -600,7 +602,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -701,7 +703,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -725,7 +727,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1105,12 +1107,12 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1121,7 +1123,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -191,12 +191,14 @@ static const YYINT quote_calc_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 0,
0, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT quote_calc_stos[] = { 0,
273, 256, 259, 269, 270, 40, 274, 275, 276, 10,
270, 275, 61, 275, 10, 257, 259, 261, 263, 265,
267, 124, 269, 275, 41, 275, 275, 275, 275, 275,
275, 275,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT quote_calc_dgoto[] = { 1,
7, 8, 9,
};
@ -475,9 +477,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 73 "quote_calc.y"
/* start of programs */
@ -520,7 +522,7 @@ yylex(void) {
}
return( c );
}
#line 524 "quote_calc-s.tab.c"
#line 526 "quote_calc-s.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -723,10 +725,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -736,7 +738,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -837,7 +839,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -861,7 +863,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1247,7 +1249,7 @@ case 18:
#line 70 "quote_calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1251 "quote_calc-s.tab.c"
#line 1253 "quote_calc-s.tab.c"
default:
break;
}
@ -1302,12 +1304,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1318,7 +1320,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -197,12 +197,14 @@ static const YYINT quote_calc_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 0,
0, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT quote_calc_stos[] = { 0,
273, 256, 259, 269, 270, 40, 274, 275, 276, 10,
270, 275, 61, 275, 10, 257, 259, 261, 263, 265,
267, 124, 269, 275, 41, 275, 275, 275, 275, 275,
275, 275,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT quote_calc_dgoto[] = { 1,
7, 8, 9,
};
@ -481,9 +483,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 73 "quote_calc.y"
/* start of programs */
@ -526,7 +528,7 @@ yylex(void) {
}
return( c );
}
#line 530 "quote_calc.tab.c"
#line 532 "quote_calc.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -729,10 +731,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -742,7 +744,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -843,7 +845,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -867,7 +869,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1253,7 +1255,7 @@ case 18:
#line 70 "quote_calc.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1257 "quote_calc.tab.c"
#line 1259 "quote_calc.tab.c"
default:
break;
}
@ -1308,12 +1310,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1324,7 +1326,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -191,12 +191,14 @@ static const YYINT quote_calc2_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 0,
0, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT quote_calc2_stos[] = { 0,
273, 256, 260, 269, 270, 40, 274, 275, 276, 10,
270, 275, 61, 275, 10, 258, 260, 262, 264, 266,
268, 124, 269, 275, 41, 275, 275, 275, 275, 275,
275, 275,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT quote_calc2_dgoto[] = { 1,
7, 8, 9,
};
@ -475,9 +477,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 73 "quote_calc2.y"
/* start of programs */
@ -520,7 +522,7 @@ yylex(void) {
}
return( c );
}
#line 524 "quote_calc2-s.tab.c"
#line 526 "quote_calc2-s.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -723,10 +725,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -736,7 +738,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -837,7 +839,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -861,7 +863,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1247,7 +1249,7 @@ case 18:
#line 70 "quote_calc2.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1251 "quote_calc2-s.tab.c"
#line 1253 "quote_calc2-s.tab.c"
default:
break;
}
@ -1302,12 +1304,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1318,7 +1320,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -197,12 +197,14 @@ static const YYINT quote_calc2_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 0,
0, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT quote_calc2_stos[] = { 0,
273, 256, 260, 269, 270, 40, 274, 275, 276, 10,
270, 275, 61, 275, 10, 258, 260, 262, 264, 266,
268, 124, 269, 275, 41, 275, 275, 275, 275, 275,
275, 275,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT quote_calc2_dgoto[] = { 1,
7, 8, 9,
};
@ -481,9 +483,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 73 "quote_calc2.y"
/* start of programs */
@ -526,7 +528,7 @@ yylex(void) {
}
return( c );
}
#line 530 "quote_calc2.tab.c"
#line 532 "quote_calc2.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -729,10 +731,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -742,7 +744,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -843,7 +845,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -867,7 +869,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1253,7 +1255,7 @@ case 18:
#line 70 "quote_calc2.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1257 "quote_calc2.tab.c"
#line 1259 "quote_calc2.tab.c"
default:
break;
}
@ -1308,12 +1310,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1324,7 +1326,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -191,12 +191,14 @@ static const YYINT quote_calc3_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 0,
0, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT quote_calc3_stos[] = { 0,
273, 256, 259, 269, 270, 40, 274, 275, 276, 10,
270, 275, 61, 275, 10, 257, 259, 261, 263, 265,
267, 124, 269, 275, 41, 275, 275, 275, 275, 275,
275, 275,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT quote_calc3_dgoto[] = { 1,
7, 8, 9,
};
@ -476,9 +478,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 73 "quote_calc3.y"
/* start of programs */
@ -521,7 +523,7 @@ yylex(void) {
}
return( c );
}
#line 525 "quote_calc3-s.tab.c"
#line 527 "quote_calc3-s.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -724,10 +726,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -737,7 +739,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -838,7 +840,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -862,7 +864,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1248,7 +1250,7 @@ case 18:
#line 70 "quote_calc3.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1252 "quote_calc3-s.tab.c"
#line 1254 "quote_calc3-s.tab.c"
default:
break;
}
@ -1303,12 +1305,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1319,7 +1321,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -191,12 +191,14 @@ static const YYINT quote_calc3_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 0,
0, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT quote_calc3_stos[] = { 0,
273, 256, 259, 269, 270, 40, 274, 275, 276, 10,
270, 275, 61, 275, 10, 257, 259, 261, 263, 265,
267, 124, 269, 275, 41, 275, 275, 275, 275, 275,
275, 275,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT quote_calc3_dgoto[] = { 1,
7, 8, 9,
};
@ -476,9 +478,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 73 "quote_calc3.y"
/* start of programs */
@ -521,7 +523,7 @@ yylex(void) {
}
return( c );
}
#line 525 "quote_calc3.tab.c"
#line 527 "quote_calc3.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -724,10 +726,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -737,7 +739,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -838,7 +840,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -862,7 +864,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1248,7 +1250,7 @@ case 18:
#line 70 "quote_calc3.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1252 "quote_calc3.tab.c"
#line 1254 "quote_calc3.tab.c"
default:
break;
}
@ -1303,12 +1305,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1319,7 +1321,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -191,12 +191,14 @@ static const YYINT quote_calc4_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 0,
0, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT quote_calc4_stos[] = { 0,
273, 256, 260, 269, 270, 40, 274, 275, 276, 10,
270, 275, 61, 275, 10, 258, 260, 262, 264, 266,
268, 124, 269, 275, 41, 275, 275, 275, 275, 275,
275, 275,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT quote_calc4_dgoto[] = { 1,
7, 8, 9,
};
@ -476,9 +478,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 73 "quote_calc4.y"
/* start of programs */
@ -521,7 +523,7 @@ yylex(void) {
}
return( c );
}
#line 525 "quote_calc4-s.tab.c"
#line 527 "quote_calc4-s.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -724,10 +726,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -737,7 +739,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -838,7 +840,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -862,7 +864,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1248,7 +1250,7 @@ case 18:
#line 70 "quote_calc4.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1252 "quote_calc4-s.tab.c"
#line 1254 "quote_calc4-s.tab.c"
default:
break;
}
@ -1303,12 +1305,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1319,7 +1321,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -191,12 +191,14 @@ static const YYINT quote_calc4_defred[] = { 1,
0, 0, 18, 0, 6, 0, 0, 0, 0, 0,
0, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT quote_calc4_stos[] = { 0,
273, 256, 260, 269, 270, 40, 274, 275, 276, 10,
270, 275, 61, 275, 10, 258, 260, 262, 264, 266,
268, 124, 269, 275, 41, 275, 275, 275, 275, 275,
275, 275,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT quote_calc4_dgoto[] = { 1,
7, 8, 9,
};
@ -476,9 +478,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 73 "quote_calc4.y"
/* start of programs */
@ -521,7 +523,7 @@ yylex(void) {
}
return( c );
}
#line 525 "quote_calc4.tab.c"
#line 527 "quote_calc4.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -724,10 +726,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -737,7 +739,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -838,7 +840,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -862,7 +864,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1248,7 +1250,7 @@ case 18:
#line 70 "quote_calc4.y"
{ yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 1252 "quote_calc4.tab.c"
#line 1254 "quote_calc4.tab.c"
default:
break;
}
@ -1303,12 +1305,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1319,7 +1321,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -29,9 +29,11 @@ static const YYINT yylen[] = { 2,
static const YYINT yydefred[] = { 0,
1, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT yystos[] = { 0,
256, 258,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT yydgoto[] = { 2,
};
static const YYINT yysindex[] = { -256,
@ -201,9 +203,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 12 "code_debug.y"
@ -231,7 +233,7 @@ yyerror(const char* s)
{
printf("%s\n", s);
}
#line 236 "rename_debug.c"
#line 238 "rename_debug.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -434,10 +436,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -447,7 +449,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -548,7 +550,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -572,7 +574,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -952,12 +954,12 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -968,7 +970,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -216,6 +216,7 @@ static const YYINT varsyntax_calc1_defred[] = { 0,
0, 0, 0, 0, 5, 6, 0, 0, 0, 12,
13, 17,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
static const YYINT varsyntax_calc1_stos[] = { 0,
256, 257, 258, 259, 45, 40, 262, 263, 264, 10,
61, 61, 257, 258, 263, 264, 263, 264, 43, 45,
@ -225,6 +226,7 @@ static const YYINT varsyntax_calc1_stos[] = { 0,
43, 45, 42, 47, 10, 10, 263, 263, 263, 263,
263, 41,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
static const YYINT varsyntax_calc1_dgoto[] = { 7,
32, 9, 0,
};
@ -512,9 +514,9 @@ static YYLTYPE *yylplim = 0;
#endif
/* Current position at lexical token queue */
static short *yylexp = 0;
static YYINT *yylexp = 0;
static short *yylexemes = 0;
static YYINT *yylexemes = 0;
#endif /* YYBTYACC */
#line 178 "varsyntax_calc1.y"
/* beginning of subroutines section */
@ -647,7 +649,7 @@ vdiv(double a, double b, INTERVAL v)
{
return (hilo(a / v.hi, a / v.lo, b / v.hi, b / v.lo));
}
#line 651 "varsyntax_calc1.tab.c"
#line 653 "varsyntax_calc1.tab.c"
/* For use in generated program */
#define yydepth (int)(yystack.s_mark - yystack.s_base)
@ -850,10 +852,10 @@ YYPARSE_DECL()
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL) goto yyenomem;
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
yylvlim = yylvals + s;
@ -863,7 +865,7 @@ YYPARSE_DECL()
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
@ -964,7 +966,7 @@ YYPARSE_DECL()
/* If this is a first conflict in the stack, start saving lexemes */
if (!yylexemes)
{
yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));
yylexemes = malloc((YYLVQUEUEGROWTH) * sizeof(YYINT));
if (yylexemes == NULL) goto yyenomem;
yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));
if (yylvals == NULL) goto yyenomem;
@ -988,7 +990,7 @@ YYPARSE_DECL()
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
*yylpe++ = yylloc;
#endif
*yylexp = (short) yychar;
*yylexp = (YYINT) yychar;
yychar = YYEMPTY;
}
}
@ -1477,7 +1479,7 @@ case 28:
yyval.vval = yystack.l_mark[-1].vval;
}
break;
#line 1481 "varsyntax_calc1.tab.c"
#line 1483 "varsyntax_calc1.tab.c"
default:
break;
}
@ -1532,12 +1534,12 @@ break;
size_t s = (size_t) (yylvlim - yylvals);
s += YYLVQUEUEGROWTH;
if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)
if ((yylexemes = realloc(yylexemes, s * sizeof(YYINT))) == NULL)
goto yyenomem;
if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
if ((yylvals = realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)
goto yyenomem;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
if ((yylpsns = realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)
goto yyenomem;
#endif
yylvp = yylve = yylvals + p;
@ -1548,7 +1550,7 @@ break;
#endif
yylexp = yylexemes + p;
}
*yylexp = (short) YYLEX;
*yylexp = (YYINT) YYLEX;
*yylvp++ = yylval;
yylve++;
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)

View File

@ -1,5 +1,5 @@
/* This file generated automatically using
* @Id: skel2c,v 1.3 2014/04/06 19:48:04 tom Exp @
* @Id: skel2c,v 1.4 2016/06/07 00:26:09 tom Exp @
*/
/* @Id: yaccpar.skel,v 1.7 2016/06/06 23:35:55 Tom.Shields Exp @ */
@ -211,6 +211,11 @@ const char *const body_2[] =
" }",
"#endif",
"",
0
};
const char *const body_3[] =
{
" yym = 0;",
" yyn = 0;",
" yynerrs = 0;",

View File

@ -1,4 +1,4 @@
/* $Id: yaccpar.skel,v 1.7 2016/06/06 23:35:55 Tom.Shields Exp $ */
/* $Id: yaccpar.skel,v 1.8 2016/12/02 21:44:42 tom Exp $ */
#include "defs.h"
@ -166,6 +166,7 @@ YYPARSE_DECL()
}
#endif
%% body_3
yym = 0;
yyn = 0;
yynerrs = 0;

View File

@ -38,9 +38,18 @@
* user-supplied information. Keep the root window as small as possible.
*/
#ifdef __FreeBSD__
#define USE_CAPSICUM 1
#endif
#include <sys/param.h>
#if USE_CAPSICUM
#include <sys/capsicum.h>
#endif
#include <sys/stat.h>
#include <capsicum_helpers.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
@ -84,6 +93,9 @@ logfail(int exitcode, const char *fmt, ...)
int
main(int argc, char **argv)
{
#if USE_CAPSICUM
cap_rights_t rights;
#endif
const char *user;
struct passwd *pw;
struct group *gr;
@ -91,7 +103,10 @@ main(int argc, char **argv)
gid_t mail_gid;
int f, maildirfd;
openlog("dma-mbox-create", 0, LOG_MAIL);
/*
* Open log fd now for capability sandbox.
*/
openlog("dma-mbox-create", LOG_NDELAY, LOG_MAIL);
errno = 0;
gr = getgrnam(DMA_GROUP);
@ -133,6 +148,28 @@ main(int argc, char **argv)
if (maildirfd < 0)
logfail(EX_NOINPUT, "cannot open maildir %s", _PATH_MAILDIR);
/*
* Cache NLS data, for strerror, for err(3), before entering capability
* mode.
*/
caph_cache_catpages();
/*
* Cache local time before entering Capsicum capability sandbox.
*/
caph_cache_tzdata();
#if USE_CAPSICUM
cap_rights_init(&rights, CAP_CREATE, CAP_FCHMOD, CAP_FCHOWN,
CAP_LOOKUP, CAP_READ);
if (cap_rights_limit(maildirfd, &rights) < 0 && errno != ENOSYS)
err(EX_OSERR, "can't limit maildirfd rights");
/* Enter Capsicum capability sandbox */
if (cap_enter() < 0 && errno != ENOSYS)
err(EX_OSERR, "cap_enter");
#endif
user_uid = pw->pw_uid;
f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600);

View File

@ -53,10 +53,17 @@ gelf_getphdr(Elf *e, int index, GElf_Phdr *d)
Elf64_Ehdr *eh64;
Elf32_Phdr *ep32;
Elf64_Phdr *ep64;
size_t phnum;
if (d == NULL || e == NULL ||
((ec = e->e_class) != ELFCLASS32 && ec != ELFCLASS64) ||
(e->e_kind != ELF_K_ELF) || index < 0) {
(e->e_kind != ELF_K_ELF) || index < 0 ||
elf_getphdrnum(e, &phnum) < 0) {
LIBELF_SET_ERROR(ARGUMENT, 0);
return (NULL);
}
if ((size_t)index >= phnum) {
LIBELF_SET_ERROR(ARGUMENT, 0);
return (NULL);
}
@ -66,11 +73,6 @@ gelf_getphdr(Elf *e, int index, GElf_Phdr *d)
((ep32 = _libelf_getphdr(e, ELFCLASS32)) == NULL))
return (NULL);
if (index >= eh32->e_phnum) {
LIBELF_SET_ERROR(ARGUMENT, 0);
return (NULL);
}
ep32 += index;
d->p_type = ep32->p_type;
@ -87,11 +89,6 @@ gelf_getphdr(Elf *e, int index, GElf_Phdr *d)
(ep64 = _libelf_getphdr(e, ELFCLASS64)) == NULL)
return (NULL);
if (index >= eh64->e_phnum) {
LIBELF_SET_ERROR(ARGUMENT, 0);
return (NULL);
}
ep64 += index;
*d = *ep64;
@ -125,13 +122,15 @@ gelf_newphdr(Elf *e, size_t count)
int
gelf_update_phdr(Elf *e, int ndx, GElf_Phdr *s)
{
int ec, phnum;
int ec;
size_t phnum;
void *ehdr;
Elf32_Phdr *ph32;
Elf64_Phdr *ph64;
if (s == NULL || e == NULL || e->e_kind != ELF_K_ELF ||
((ec = e->e_class) != ELFCLASS32 && ec != ELFCLASS64)) {
((ec = e->e_class) != ELFCLASS32 && ec != ELFCLASS64) ||
elf_getphdrnum(e, &phnum) < 0) {
LIBELF_SET_ERROR(ARGUMENT, 0);
return (0);
}
@ -144,12 +143,7 @@ gelf_update_phdr(Elf *e, int ndx, GElf_Phdr *s)
if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL)
return (0);
if (ec == ELFCLASS32)
phnum = ((Elf32_Ehdr *) ehdr)->e_phnum;
else
phnum = ((Elf64_Ehdr *) ehdr)->e_phnum;
if (ndx < 0 || ndx > phnum) {
if (ndx < 0 || (size_t)ndx > phnum) {
LIBELF_SET_ERROR(ARGUMENT, 0);
return (0);
}

View File

@ -170,10 +170,6 @@ _libelf_ehdr(Elf *e, int ec, int allocate)
(*xlator)((unsigned char*) ehdr, msz, e->e_rawfile, (size_t) 1,
e->e_byteorder != LIBELF_PRIVATE(byteorder));
/*
* If extended numbering is being used, read the correct
* number of sections and program header entries.
*/
if (ec == ELFCLASS32) {
phnum = ((Elf32_Ehdr *) ehdr)->e_phnum;
shnum = ((Elf32_Ehdr *) ehdr)->e_shnum;
@ -193,12 +189,19 @@ _libelf_ehdr(Elf *e, int ec, int allocate)
return (NULL);
}
if (shnum != 0 || shoff == 0LL) { /* not using extended numbering */
/*
* If extended numbering is being used, read the correct
* number of sections and program header entries.
*/
if ((shnum == 0 && shoff != 0) || phnum == PN_XNUM || strndx == SHN_XINDEX) {
if (_libelf_load_extended(e, ec, shoff, phnum, strndx) == 0)
return (NULL);
} else {
/* not using extended numbering */
e->e_u.e_elf.e_nphdr = phnum;
e->e_u.e_elf.e_nscn = shnum;
e->e_u.e_elf.e_strndx = strndx;
} else if (_libelf_load_extended(e, ec, shoff, phnum, strndx) == 0)
return (NULL);
}
return (ehdr);
}

View File

@ -47,10 +47,13 @@ DEFINE_TEST(test_option_J_upper)
}
failure("-J option is broken");
assertEqualInt(r, 0);
return;
goto done;
}
free(p);
/* Check that the archive file has an xz signature. */
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "\3757zXZ", 5);
done:
free(p);
}

View File

@ -47,10 +47,13 @@ DEFINE_TEST(test_option_Z_upper)
}
failure("-Z option is broken");
assertEqualInt(r, 0);
return;
goto done;
}
free(p);
/* Check that the archive file has a compress signature. */
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "\x1f\x9d", 2);
done:
free(p);
}

View File

@ -49,6 +49,7 @@ DEFINE_TEST(test_option_u)
p = slurpfile(&s, "copy/f");
assertEqualInt(s, 1);
assertEqualMem(p, "a", 1);
free(p);
/* Recreate the file with a single "b" */
assertMakeFile("f", 0644, "b");
@ -68,6 +69,7 @@ DEFINE_TEST(test_option_u)
p = slurpfile(&s, "copy/f");
assertEqualInt(s, 1);
assertEqualMem(p, "a", 1);
free(p);
/* Copy the file to the "copy" dir with -u (force) */
r = systemf("echo f| %s -pud copy >copy.out 2>copy.err",
@ -78,4 +80,5 @@ DEFINE_TEST(test_option_u)
p = slurpfile(&s, "copy/f");
assertEqualInt(s, 1);
assertEqualMem(p, "b", 1);
free(p);
}

View File

@ -46,11 +46,14 @@ DEFINE_TEST(test_option_y)
}
failure("-y option is broken");
assertEqualInt(r, 0);
return;
goto done;
}
assertTextFileContents("1 block\n", "archive.err");
/* Check that the archive file has a bzip2 signature. */
free(p);
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "BZh9", 4);
done:
free(p);
}

View File

@ -86,21 +86,7 @@ static int
read_open_memory_internal(struct archive *a, const void *buff,
size_t size, size_t read_size, int level)
{
struct read_memory_data *mine;
mine = (struct read_memory_data *)malloc(sizeof(*mine));
if (mine == NULL) {
archive_set_error(a, ENOMEM, "No memory");
return (ARCHIVE_FATAL);
}
memset(mine, 0, sizeof(*mine));
mine->start = mine->p = (const unsigned char *)buff;
mine->end = mine->start + size;
mine->read_size = read_size;
mine->copy_buff_offset = 32;
mine->copy_buff_size = read_size + mine->copy_buff_offset * 2;
mine->copy_buff = malloc(mine->copy_buff_size);
memset(mine->copy_buff, 0xA5, mine->copy_buff_size);
struct read_memory_data *mine = NULL;
switch (level) {
case 3:
@ -109,6 +95,20 @@ read_open_memory_internal(struct archive *a, const void *buff,
archive_read_set_open_callback(a, memory_read_open);
archive_read_set_skip_callback(a, memory_read_skip);
case 1:
mine = malloc(sizeof(*mine));
if (mine == NULL) {
archive_set_error(a, ENOMEM, "No memory");
return (ARCHIVE_FATAL);
}
memset(mine, 0, sizeof(*mine));
mine->start = mine->p = (const unsigned char *)buff;
mine->end = mine->start + size;
mine->read_size = read_size;
mine->copy_buff_offset = 32;
mine->copy_buff_size = read_size + mine->copy_buff_offset * 2;
mine->copy_buff = malloc(mine->copy_buff_size);
memset(mine->copy_buff, 0xA5, mine->copy_buff_size);
archive_read_set_read_callback(a, memory_read);
archive_read_set_close_callback(a, memory_read_close);
archive_read_set_callback_data(a, mine);
@ -213,7 +213,8 @@ memory_read_close(struct archive *a, void *client_data)
{
struct read_memory_data *mine = (struct read_memory_data *)client_data;
(void)a; /* UNUSED */
free(mine->copy_buff);
if (mine != NULL)
free(mine->copy_buff);
free(mine);
return (ARCHIVE_OK);
}

View File

@ -104,16 +104,19 @@ test_fuzz(const struct files *filesets)
}
if (!assert(size < buffsize)) {
free(rawimage);
rawimage = NULL;
continue;
}
} else {
for (i = 0; filesets[n].names[i] != NULL; ++i)
{
tmp = slurpfile(&size, filesets[n].names[i]);
char *newraw = (char *)realloc(rawimage, oldsize + size);
char *newraw = realloc(rawimage, oldsize + size);
if (!assert(newraw != NULL))
{
free(rawimage);
rawimage = NULL;
free(tmp);
continue;
}
rawimage = newraw;
@ -123,14 +126,21 @@ test_fuzz(const struct files *filesets)
free(tmp);
}
}
if (size == 0)
if (size == 0) {
free(rawimage);
rawimage = NULL;
continue;
}
image = malloc(size);
assert(image != NULL);
if (image == NULL) {
free(rawimage);
rawimage = NULL;
return;
}
assert(rawimage != NULL);
srand((unsigned)time(NULL));
for (i = 0; i < 1000; ++i) {
@ -162,6 +172,7 @@ test_fuzz(const struct files *filesets)
Sleep(100);
#endif
}
assert(f != NULL);
assertEqualInt((size_t)size, fwrite(image, 1, (size_t)size, f));
fclose(f);
@ -195,7 +206,7 @@ test_fuzz(const struct files *filesets)
archive_read_close(a);
}
archive_read_free(a);
}
}
free(image);
free(rawimage);
}

View File

@ -1327,6 +1327,7 @@ test_callbacks(void)
if (assert((m = archive_match_new()) != NULL)) {
archive_entry_free(ae);
archive_read_free(a);
archive_match_free(m);
return;
}

View File

@ -219,8 +219,8 @@ DEFINE_TEST(test_read_append_filter_wrong_program)
/* bunzip2 will write to stderr, redirect it to a file */
fflush(stderr);
fgetpos(stderr, &pos);
fd = dup(fileno(stderr));
fp = freopen("stderr1", "w", stderr);
assert((fd = dup(fileno(stderr))) != -1);
fp = freopen("stderr1", "w", stderr);
#endif
assert((a = archive_read_new()) != NULL);
@ -238,10 +238,10 @@ DEFINE_TEST(test_read_append_filter_wrong_program)
if (fp != NULL) {
fflush(stderr);
dup2(fd, fileno(stderr));
close(fd);
clearerr(stderr);
fsetpos(stderr, &pos);
(void)fsetpos(stderr, &pos);
}
close(fd);
assertTextFileContents("bunzip2: (stdin) is not a bzip2 file.\n", "stderr1");
#endif
}

View File

@ -1060,7 +1060,7 @@ assertion_file_contains_lines_any_order(const char *file, int line,
char **expected = NULL;
char *p, **actual = NULL;
char c;
int expected_failure = 0, actual_failure = 0;
int expected_failure = 0, actual_failure = 0, retval = 0;
assertion_count(file, line);
@ -1081,8 +1081,7 @@ assertion_file_contains_lines_any_order(const char *file, int line,
if (expected == NULL) {
failure_start(pathname, line, "Can't allocate memory");
failure_finish(NULL);
free(expected);
return (0);
goto done;
}
for (i = 0; lines[i] != NULL; ++i) {
expected[i] = strdup(lines[i]);
@ -1103,8 +1102,7 @@ assertion_file_contains_lines_any_order(const char *file, int line,
if (actual == NULL) {
failure_start(pathname, line, "Can't allocate memory");
failure_finish(NULL);
free(expected);
return (0);
goto done;
}
for (j = 0, p = buff; p < buff + buff_size;
p += 1 + strlen(p)) {
@ -1141,27 +1139,27 @@ assertion_file_contains_lines_any_order(const char *file, int line,
++actual_failure;
}
if (expected_failure == 0 && actual_failure == 0) {
free(buff);
free(expected);
free(actual);
return (1);
retval = 1;
goto done;
}
failure_start(file, line, "File doesn't match: %s", pathname);
for (i = 0; i < expected_count; ++i) {
if (expected[i] != NULL) {
if (expected[i] != NULL)
logprintf(" Expected but not present: %s\n", expected[i]);
free(expected[i]);
}
}
for (j = 0; j < actual_count; ++j) {
if (actual[j] != NULL)
logprintf(" Present but not expected: %s\n", actual[j]);
}
failure_finish(NULL);
free(buff);
free(expected);
done:
free(actual);
return (0);
free(buff);
for (i = 0; i < expected_count; ++i)
free(expected[i]);
free(expected);
return (retval);
}
/* Verify that a text file does not contains the specified strings */
@ -1590,7 +1588,7 @@ is_symlink(const char *file, int line,
* really not much point in bothering with this. */
return (0);
#else
char buff[300];
char buff[301];
struct stat st;
ssize_t linklen;
int r;
@ -1607,7 +1605,7 @@ is_symlink(const char *file, int line,
return (0);
if (contents == NULL)
return (1);
linklen = readlink(pathname, buff, sizeof(buff));
linklen = readlink(pathname, buff, sizeof(buff) - 1);
if (linklen < 0) {
failure_start(file, line, "Can't read symlink %s", pathname);
failure_finish(NULL);
@ -2324,7 +2322,7 @@ extract_reference_file(const char *name)
for (;;) {
if (fgets(buff, sizeof(buff), in) == NULL) {
/* TODO: This is a failure. */
return;
goto done;
}
if (memcmp(buff, "begin ", 6) == 0)
break;
@ -2365,6 +2363,7 @@ extract_reference_file(const char *name)
}
}
fclose(out);
done:
fclose(in);
}
@ -2958,8 +2957,8 @@ main(int argc, char **argv)
strftime(tmpdir_timestamp, sizeof(tmpdir_timestamp),
"%Y-%m-%dT%H.%M.%S",
localtime(&now));
sprintf(tmpdir, "%s/%s.%s-%03d", tmp, progname,
tmpdir_timestamp, i);
snprintf(tmpdir, sizeof(tmpdir), "%s/%s.%s-%03d", tmp,
progname, tmpdir_timestamp, i);
if (assertMakeDir(tmpdir,0755))
break;
if (i >= 999) {

View File

@ -44,6 +44,7 @@ DEFINE_TEST(test_leading_slash)
if (assertFileExists("test.err")) {
errfile = slurpfile(&errfile_size, "test.err");
assert(strstr(errfile, expected_errmsg) != NULL);
free(errfile);
}
}

View File

@ -43,6 +43,7 @@ DEFINE_TEST(test_option_a)
assert(s > 2);
failure("The archive should be compressed");
assertEqualMem(p, "\x1f\x9d", 2);
free(p);
/* Test2: archive it with .taZ suffix. */
assertEqualInt(0,
@ -53,6 +54,7 @@ DEFINE_TEST(test_option_a)
assert(s > 2);
failure("The archive should be compressed");
assertEqualMem(p, "\x1f\x9d", 2);
free(p);
/* Test3: archive it with .tar.Z.uu suffix. */
assertEqualInt(0,
@ -63,6 +65,7 @@ DEFINE_TEST(test_option_a)
assert(s > 12);
failure("The archive should be uuencoded");
assertEqualMem(p, "begin 644 -\n", 12);
free(p);
/* Test4: archive it with .zip suffix. */
assertEqualInt(0,
@ -73,6 +76,7 @@ DEFINE_TEST(test_option_a)
assert(s > 4);
failure("The archive should be zipped");
assertEqualMem(p, "\x50\x4b\x03\x04", 4);
free(p);
/* Test5: archive it with .tar.Z suffix and --uuencode option. */
assertEqualInt(0,
@ -84,6 +88,7 @@ DEFINE_TEST(test_option_a)
assert(s > 2);
failure("The archive should be compressed, ignoring --uuencode option");
assertEqualMem(p, "\x1f\x9d", 2);
free(p);
/* Test6: archive it with .xxx suffix(unknown suffix) and
* --uuencode option. */
@ -96,6 +101,7 @@ DEFINE_TEST(test_option_a)
assert(s > 12);
failure("The archive should be uuencoded");
assertEqualMem(p, "begin 644 -\n", 12);
free(p);
/* Test7: archive it with .tar.Z suffix using a long-name option. */
assertEqualInt(0,
@ -107,4 +113,5 @@ DEFINE_TEST(test_option_a)
assert(s > 2);
failure("The archive should be compressed");
assertEqualMem(p, "\x1f\x9d", 2);
free(p);
}

View File

@ -78,4 +78,6 @@ DEFINE_TEST(test_option_b)
* Note: It's not possible to verify at this level that blocks
* are getting written with the
*/
free(testprog_ustar);
}

View File

@ -42,6 +42,7 @@ DEFINE_TEST(test_option_b64encode)
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "begin-base64 644", 16);
free(p);
/* Archive it with uuencode only. */
assertEqualInt(0,
@ -51,4 +52,5 @@ DEFINE_TEST(test_option_b64encode)
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "begin-base64 644", 16);
free(p);
}

View File

@ -53,6 +53,7 @@ DEFINE_TEST(test_option_gid_gname)
/* Should force gid and gname fields in ustar header. */
assertEqualMem(data + 116, "000021 \0", 8);
assertEqualMem(data + 297, "foofoofoo\0", 10);
free(data);
/* Again with just --gname */
failure("Error invoking %s c", testprog);
@ -65,6 +66,8 @@ DEFINE_TEST(test_option_gid_gname)
/* Gid should be unchanged from original reference. */
assertEqualMem(data + 116, reference + 116, 8);
assertEqualMem(data + 297, "foofoofoo\0", 10);
free(data);
free(reference);
/* Again with --gid and force gname to empty. */
failure("Error invoking %s c", testprog);
@ -77,6 +80,7 @@ DEFINE_TEST(test_option_gid_gname)
assertEqualMem(data + 116, "000021 \0", 8);
/* Gname field in ustar header should be empty. */
assertEqualMem(data + 297, "\0", 1);
free(data);
/* TODO: It would be nice to verify that --gid= by itself
* will look up the associated gname and use that, but

View File

@ -45,8 +45,11 @@ DEFINE_TEST(test_option_grzip)
testprog));
p = slurpfile(&s, "archive.err");
p[s] = '\0';
free(p);
/* Check that the archive file has an grzip signature. */
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "GRZipII\x00\x02\x04:)", 12);
free(p);
}

View File

@ -42,15 +42,18 @@ DEFINE_TEST(test_option_j)
if (r != 0) {
if (!canBzip2()) {
skipping("bzip2 is not supported on this platform");
return;
goto done;
}
failure("-j option is broken");
assertEqualInt(r, 0);
return;
goto done;
}
free(p);
assertEmptyFile("archive.err");
/* Check that the archive file has a bzip2 signature. */
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "BZh9", 4);
done:
free(p);
}

View File

@ -45,8 +45,10 @@ DEFINE_TEST(test_option_lrzip)
testprog));
p = slurpfile(&s, "archive.err");
p[s] = '\0';
free(p);
/* Check that the archive file has an lzma signature. */
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "LRZI\x00", 5);
free(p);
}

View File

@ -43,7 +43,7 @@ DEFINE_TEST(test_option_lz4)
if (strstr(p, "Unsupported compression") != NULL) {
skipping("This version of bsdtar was compiled "
"without lz4 support");
return;
goto done;
}
/* POSIX permits different handling of the spawnp
* system call used to launch the subsidiary
@ -52,7 +52,7 @@ DEFINE_TEST(test_option_lz4)
if (strstr(p, "Can't launch") != NULL && !canLz4()) {
skipping("This version of bsdtar uses an external lz4 program "
"but no such program is available on this system.");
return;
goto done;
}
/* Some systems successfully spawn the new process,
* but fail to exec a program within that process.
@ -61,14 +61,18 @@ DEFINE_TEST(test_option_lz4)
if (strstr(p, "Can't write") != NULL && !canLz4()) {
skipping("This version of bsdtar uses an external lz4 program "
"but no such program is available on this system.");
return;
goto done;
}
failure("--lz4 option is broken: %s", p);
assertEqualInt(r, 0);
return;
goto done;
}
free(p);
/* Check that the archive file has an lz4 signature. */
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "\x04\x22\x4d\x18", 4);
done:
free(p);
}

View File

@ -48,10 +48,13 @@ DEFINE_TEST(test_option_lzma)
}
failure("--lzma option is broken");
assertEqualInt(r, 0);
return;
goto done;
}
free(p);
/* Check that the archive file has an lzma signature. */
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "\x5d\00\00", 3);
done:
free(p);
}

View File

@ -42,14 +42,17 @@ DEFINE_TEST(test_option_lzop)
if (r != 0) {
if (!canLzop()) {
skipping("lzop is not supported on this platform");
return;
goto done;
}
failure("--lzop option is broken");
assertEqualInt(r, 0);
return;
goto done;
}
free(p);
/* Check that the archive file has an lzma signature. */
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a", 9);
done:
free(p);
}

View File

@ -36,6 +36,10 @@ DEFINE_TEST(test_option_r)
size_t s, buff_size_rounded;
int r, i;
buff = NULL;
p0 = NULL;
p1 = NULL;
/* Create an archive with one file. */
assertMakeFile("f1", 0644, "abc");
r = systemf("%s cf archive.tar --format=ustar f1 >step1.out 2>step1.err", testprog);
@ -47,11 +51,9 @@ DEFINE_TEST(test_option_r)
/* Do some basic validation of the constructed archive. */
p0 = slurpfile(&s, "archive.tar");
if (!assert(p0 != NULL))
return;
if (!assert(s >= 2048)) {
free(p0);
return;
}
goto done;
if (!assert(s >= 2048))
goto done;
assertEqualMem(p0 + 0, "f1", 3);
assertEqualMem(p0 + 512, "abc", 3);
assertEqualMem(p0 + 1024, "\0\0\0\0\0\0\0\0", 8);
@ -60,10 +62,8 @@ DEFINE_TEST(test_option_r)
/* Edit that file with a lot more data and update the archive with a new copy. */
buff = malloc(buff_size);
assert(buff != NULL);
if (buff == NULL) {
free(p0);
return;
}
if (buff == NULL)
goto done;
for (i = 0; i < (int)buff_size; ++i)
buff[i] = "abcdefghijklmnopqrstuvwxyz"[rand() % 26];
@ -77,10 +77,8 @@ DEFINE_TEST(test_option_r)
/* The constructed archive should just have the new entry appended. */
p1 = slurpfile(&s, "archive.tar");
if (!assert(p1 != NULL)) {
free(p0);
return;
}
if (!assert(p1 != NULL))
goto done;
buff_size_rounded = ((buff_size + 511) / 512) * 512;
assert(s >= 2560 + buff_size_rounded);
/* Verify first entry is unchanged. */
@ -105,10 +103,8 @@ DEFINE_TEST(test_option_r)
/* Validate the constructed archive. */
p1 = slurpfile(&s, "archive.tar");
if (!assert(p1 != NULL)) {
free(p0);
return;
}
if (!assert(p1 != NULL))
goto done;
assert(s >= 3584 + buff_size_rounded);
/* Verify first two entries are unchanged. */
assertEqualMem(p0, p1, 1536 + buff_size_rounded);
@ -118,7 +114,6 @@ DEFINE_TEST(test_option_r)
/* Verify end-of-archive marker. */
assertEqualMem(p1 + 2560 + buff_size_rounded, "\0\0\0\0\0\0\0\0", 8);
assertEqualMem(p1 + 3072 + buff_size_rounded, "\0\0\0\0\0\0\0\0", 8);
free(p0);
free(p1);
/* Unpack everything */
@ -132,4 +127,7 @@ DEFINE_TEST(test_option_r)
/* Verify that the second copy of f1 overwrote the first. */
assertFileContents(buff, (int)strlen(buff), "f1");
done:
free(buff);
free(p0);
}

View File

@ -53,6 +53,7 @@ DEFINE_TEST(test_option_uid_uname)
/* Should force uid and uname fields in ustar header. */
assertEqualMem(data + 108, "000021 \0", 8);
assertEqualMem(data + 265, "foofoofoo\0", 10);
free(data);
/* Again with just --uid */
failure("Error invoking %s c", testprog);
@ -65,6 +66,7 @@ DEFINE_TEST(test_option_uid_uname)
assertEqualMem(data + 108, "000021 \0", 8);
/* Uname field in ustar header should be empty. */
assertEqualMem(data + 265, "\0", 1);
free(data);
/* Again with just --uname */
failure("Error invoking %s c", testprog);
@ -77,4 +79,7 @@ DEFINE_TEST(test_option_uid_uname)
/* Uid should be unchanged from original reference. */
assertEqualMem(data + 108, reference + 108, 8);
assertEqualMem(data + 265, "foofoofoo\0", 10);
free(data);
free(reference);
}

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