+2022-01-01 Thomas E. Dickey <dickey@invisible-island.net>
+
+ * test/run_test.sh:
+ adjust to ignore NetBSD's difference in getopt warnings.
+
+ * package/pkgsrc/Makefile: resync with pkgsrc
+
+ * test/yacc/expr.oxout.tab.c, test/btyacc/expr.oxout.tab.c: regen
+
+ * test/expr.oxout.y, test/expr.oxout.h: fix gcc warnings
+
+ * test/yacc/expr.oxout.tab.c, test/yacc/expr.oxout.tab.h: regen
+
+ * test/run_make.sh: workaround for compiling the expr.oxout.y files
+
+ * test/expr.oxout.y: fix syntax error
+
+ * test/btyacc/expr.oxout.tab.c: regen
+
+ * test/expr.oxout.h: RCS_BASE
+
+ * test/yacc/expr.oxout.tab.c: fix syntax error
+
+ * test/btyacc/expr.oxout.tab.c: regen, s/expr.oxout/expr_oxout/g
+
+ * test/btyacc/expr.oxout.tab.h: regen
+
+ * test/run_test.sh:
+ filter the default prefix to change "." to "_", so that the generated
+ files will compile consistently with run_make.sh
+
+ * package/debian/control, package/debian/prerm, package/debian/postinst:
+ add "byacc2" as an alternative for "yacc"
+
+ * package/byacc.spec, package/debian/control, package/debian/rules:
+ rename "btyacc" to "byacc2" to co-exist with traditional "btyacc" package
+
+ * package/debian/copyright, VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile:
+ bump
+
2021-12-24 Thomas E. Dickey <dickey@invisible-island.net>
* package/debian/rules: fixes from Debian package for lintian warnings
-MANIFEST for byacc-20211224, version t20211224
+MANIFEST for byacc-20220101, version t20220101
--------------------------------------------------------------------------------
MANIFEST this file
ACKNOWLEDGEMENTS original version of byacc - 1993
test/err_syntax8a.y testcase for used_reserved()
test/err_syntax9.y testcase for tokenized_start()
test/error.y original version of byacc - 1993
+test/expr.oxout.h stub for "run_make.sh"
test/expr.oxout.y test-case for "#line" feature
test/grammar.y grammar from cproto
test/inherit0.y testcase for btyacc
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
-%define AltProgram btyacc
-%define AppVersion 20211224
+%define AltProgram byacc2
+%define AppVersion 20220101
%define UseProgram yacc
-# $Id: byacc.spec,v 1.60 2021/12/25 00:13:22 tom Exp $
+# $Id: byacc.spec,v 1.62 2022/01/01 14:59:55 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1
routine written in the C programming language. It has a public domain
license which includes the generated C.
-%package -n btyacc
+%package -n byacc2
Summary: Curses library with POSIX thread support.
-%description -n btyacc
+%description -n byacc2
This package provides a parser generator utility that reads a grammar
specification from a file and generates an LR(1) parser for it. The
parsers consist of a set of LALR(1) parsing tables and a driver
CONFIGURE_TOP=%{my_srcdir} \
%configure %{CFG_OPTS} \
--program-prefix=b \
- --program-transform-name='s,\^,b,'
make
popd
-mkdir BUILD-btyacc
-pushd BUILD-btyacc
+mkdir BUILD-byacc2
+pushd BUILD-byacc2
CONFIGURE_TOP=%{my_srcdir} \
%configure %{CFG_OPTS} \
--enable-btyacc \
- --program-prefix=bt \
+ --program-transform-name='s,\<yacc,byacc2,g' \
--with-max-table-size=123456 \
- --program-transform-name='s,\^,bt,'
make
popd
( cd $RPM_BUILD_ROOT%{_bindir} && ln -vs %{AppProgram} %{UseProgram} )
popd
-pushd BUILD-btyacc
+pushd BUILD-byacc2
make install DESTDIR=$RPM_BUILD_ROOT
popd
%{_prefix}/bin/%{UseProgram}
%{_mandir}/man1/%{AppProgram}.*
-%files -n btyacc
+%files -n byacc2
%defattr(-,root,root)
%{_prefix}/bin/%{AltProgram}
%{_mandir}/man1/%{AltProgram}.*
%changelog
# each patch should add its ChangeLog entries here
+* Sat Jan 01 2022 Thomas Dickey
+- rename btyacc package to byacc2 to co-exist with traditional btyacc
+
* Fri May 25 2018 Thomas Dickey
- add btyacc package
+byacc (20220101) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 Jan 2022 07:06:35 -0500
+
byacc (20211224) unstable; urgency=low
* maintenance updates
Vcs-Git: https://salsa.debian.org/dickey/byacc
Package: byacc
+Provides: yacc
Architecture: any
Multi-Arch: foreign
Depends: ${shlibs:Depends}, ${misc:Depends}
routine written in the C programming language. It has a public domain
license which includes the generated C.
-Package: btyacc
+Package: byacc2
+Provides: yacc
Architecture: any
Multi-Arch: foreign
Depends: ${shlibs:Depends}, ${misc:Depends}
Files: aclocal.m4
Licence: other-BSD
-Copyright: 2004-2020,2021 by Thomas E. Dickey
+Copyright: 2004-2021,2022 by Thomas E. Dickey
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
--install /usr/bin/yacc yacc /usr/bin/byacc 80 \
--slave /usr/share/man/man1/yacc.1.gz yaccman \
/usr/share/man/man1/byacc.1.gz
+ update-alternatives \
+ --install /usr/bin/yacc yacc /usr/bin/byacc2 80 \
+ --slave /usr/share/man/man1/yacc.1.gz yaccman \
+ /usr/share/man/man1/byacc2.1.gz
fi
#DEBHELPER#
if [ $1 != "upgrade" ]; then
update-alternatives --remove yacc /usr/bin/byacc
+ update-alternatives --remove yacc /usr/bin/byacc2
fi
#DEBHELPER#
#!/usr/bin/make -f
-# $Id: rules,v 1.6 2021/12/25 01:55:41 tom Exp $
+# $Id: rules,v 1.7 2022/01/01 13:01:37 tom Exp $
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-PACKAGES.arch = byacc btyacc
+PACKAGES.arch = byacc byacc2
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
endif
BYACC_DIR = $(CURDIR)/debian/byacc
-BTYACC_DIR = $(CURDIR)/debian/btyacc
+BTYACC_DIR = $(CURDIR)/debian/byacc2
BYACC_TMP = t/byacc
-BTYACC_TMP = t/btyacc
+BTYACC_TMP = t/byacc2
verbose = # -v
--mandir=\$${prefix}/share/man \
--sysconfdir=/etc \
--enable-stdnoreturn \
- --program-transform-name='s,^,b,'
+ --program-transform-name='s,^yacc,byacc,'
all: build
touch $@
-config-btyacc-stamp:
+config-byacc2-stamp:
dh_testdir
rm -rf $(BTYACC_TMP)
cd $(BTYACC_TMP); $(configure) \
--enable-btyacc \
--with-max-table-size=123456 \
- --program-transform-name='s,^,bt,'
+ --program-transform-name='s,^yacc,byacc2,'
touch $@
touch $@
-build-btyacc-stamp: config-btyacc-stamp
+build-byacc2-stamp: config-byacc2-stamp
dh_testdir
cd $(BTYACC_TMP); $(MAKE)
touch $@
-install-btyacc-stamp: build-btyacc-stamp
+install-byacc2-stamp: build-byacc2-stamp
dh_testdir
dh_testroot
dh_installdirs
cd $(BTYACC_TMP); $(MAKE) install DESTDIR=$(BTYACC_DIR)
- sed -i '/- an LALR/s,^..N,btyacc,' $(BTYACC_DIR)/usr/share/man/man1/btyacc.1
+ sed -i '/- an LALR/s,^..N,byacc2,' $(BTYACC_DIR)/usr/share/man/man1/byacc2.1
touch $@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
-%define AppVersion 20211224
+%define AppVersion 20220101
%define UseProgram yacc
-# $Id: mingw-byacc.spec,v 1.38 2021/12/25 00:13:22 tom Exp $
+# $Id: mingw-byacc.spec,v 1.39 2022/01/01 12:06:35 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1
-# $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $
+# $NetBSD: Makefile,v 1.24 2021/08/14 01:04:32 mef Exp $
#
-DISTNAME= byacc-20211224
-PKGREVISION= 1
+DISTNAME= byacc-20220101
CATEGORIES= devel
-MASTER_SITES= ftp://ftp.invisible-island.net/byacc/
+MASTER_SITES= https://invisible-mirror.net/archives/byacc/
+DIST_SUBDIR= byacc-20220101
EXTRACT_SUFX= .tgz
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://invisible-island.net/byacc/byacc.html
+MAINTAINER= fcambus@NetBSD.org
+HOMEPAGE= https://invisible-island.net/byacc/byacc.html
COMMENT= Berkeley Yacc
+LICENSE= public-domain
-PKG_DESTDIR_SUPPORT= user-destdir
GNU_CONFIGURE= YES
MAKE_FILE= makefile
#define YYDEBUGSTR YYPREFIX "debug"
#ifndef yyparse
-#define yyparse expr.oxout_parse
+#define yyparse expr_oxout_parse
#endif /* yyparse */
#ifndef yylex
-#define yylex expr.oxout_lex
+#define yylex expr_oxout_lex
#endif /* yylex */
#ifndef yyerror
-#define yyerror expr.oxout_error
+#define yyerror expr_oxout_error
#endif /* yyerror */
#ifndef yychar
-#define yychar expr.oxout_char
+#define yychar expr_oxout_char
#endif /* yychar */
#ifndef yyval
-#define yyval expr.oxout_val
+#define yyval expr_oxout_val
#endif /* yyval */
#ifndef yylval
-#define yylval expr.oxout_lval
+#define yylval expr_oxout_lval
#endif /* yylval */
#ifndef yydebug
-#define yydebug expr.oxout_debug
+#define yydebug expr_oxout_debug
#endif /* yydebug */
#ifndef yynerrs
-#define yynerrs expr.oxout_nerrs
+#define yynerrs expr_oxout_nerrs
#endif /* yynerrs */
#ifndef yyerrflag
-#define yyerrflag expr.oxout_errflag
+#define yyerrflag expr_oxout_errflag
#endif /* yyerrflag */
#ifndef yylhs
-#define yylhs expr.oxout_lhs
+#define yylhs expr_oxout_lhs
#endif /* yylhs */
#ifndef yylen
-#define yylen expr.oxout_len
+#define yylen expr_oxout_len
#endif /* yylen */
#ifndef yydefred
-#define yydefred expr.oxout_defred
+#define yydefred expr_oxout_defred
#endif /* yydefred */
#ifndef yystos
-#define yystos expr.oxout_stos
+#define yystos expr_oxout_stos
#endif /* yystos */
#ifndef yydgoto
-#define yydgoto expr.oxout_dgoto
+#define yydgoto expr_oxout_dgoto
#endif /* yydgoto */
#ifndef yysindex
-#define yysindex expr.oxout_sindex
+#define yysindex expr_oxout_sindex
#endif /* yysindex */
#ifndef yyrindex
-#define yyrindex expr.oxout_rindex
+#define yyrindex expr_oxout_rindex
#endif /* yyrindex */
#ifndef yygindex
-#define yygindex expr.oxout_gindex
+#define yygindex expr_oxout_gindex
#endif /* yygindex */
#ifndef yytable
-#define yytable expr.oxout_table
+#define yytable expr_oxout_table
#endif /* yytable */
#ifndef yycheck
-#define yycheck expr.oxout_check
+#define yycheck expr_oxout_check
#endif /* yycheck */
#ifndef yyname
-#define yyname expr.oxout_name
+#define yyname expr_oxout_name
#endif /* yyname */
#ifndef yyrule
-#define yyrule expr.oxout_rule
+#define yyrule expr_oxout_rule
#endif /* yyrule */
#if YYBTYACC
#ifndef yycindex
-#define yycindex expr.oxout_cindex
+#define yycindex expr_oxout_cindex
#endif /* yycindex */
#ifndef yyctable
-#define yyctable expr.oxout_ctable
+#define yyctable expr_oxout_ctable
#endif /* yyctable */
#endif /* YYBTYACC */
-#define YYPREFIX "expr.oxout_"
+#define YYPREFIX "expr_oxout_"
#define YYPURE 0
#define CONST 258
#define YYERRCODE 256
typedef int YYINT;
-static const YYINT expr.oxout_lhs[] = { -1,
+static const YYINT expr_oxout_lhs[] = { -1,
2, 0, 1, 3, 3, 3, 3, 3, 3, 3,
};
-static const YYINT expr.oxout_len[] = { 2,
+static const YYINT expr_oxout_len[] = { 2,
0, 2, 1, 3, 3, 3, 3, 3, 1, 1,
};
-static const YYINT expr.oxout_defred[] = { 1,
+static const YYINT expr_oxout_defred[] = { 1,
0, 0, 9, 10, 0, 2, 0, 0, 0, 0,
0, 0, 8, 0, 0, 4, 0,
};
#if defined(YYDESTRUCT_CALL) || defined(YYSTYPE_TOSTRING)
-static const YYINT expr.oxout_stos[] = { 0,
+static const YYINT expr_oxout_stos[] = { 0,
260, 262, 257, 258, 40, 261, 263, 263, 43, 45,
42, 47, 41, 263, 263, 263, 263,
};
#endif /* YYDESTRUCT_CALL || YYSTYPE_TOSTRING */
-static const YYINT expr.oxout_dgoto[] = { 1,
+static const YYINT expr_oxout_dgoto[] = { 1,
6, 2, 7,
};
-static const YYINT expr.oxout_sindex[] = { 0,
+static const YYINT expr_oxout_sindex[] = { 0,
0, -40, 0, 0, -40, 0, -18, -24, -40, -40,
-40, -40, 0, -37, -37, 0, -39,
};
-static const YYINT expr.oxout_rindex[] = { 0,
+static const YYINT expr_oxout_rindex[] = { 0,
0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
0, 0, 0, 2, 8, 0, 1,
};
#if YYBTYACC
-static const YYINT expr.oxout_cindex[] = { 0,
+static const YYINT expr_oxout_cindex[] = { 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
};
#endif
-static const YYINT expr.oxout_gindex[] = { 0,
+static const YYINT expr_oxout_gindex[] = { 0,
0, 0, 4,
};
#define YYTABLESIZE 218
-static const YYINT expr.oxout_table[] = { 5,
+static const YYINT expr_oxout_table[] = { 5,
6, 5, 11, 0, 11, 3, 0, 7, 8, 12,
0, 0, 14, 15, 16, 17, 13, 11, 9, 0,
10, 0, 12, 11, 9, 0, 10, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 4,
};
-static const YYINT expr.oxout_check[] = { 40,
+static const YYINT expr_oxout_check[] = { 40,
0, 0, 42, -1, 42, 0, -1, 0, 5, 47,
-1, -1, 9, 10, 11, 12, 41, 42, 43, -1,
45, -1, 47, 42, 43, -1, 45, -1, 47, -1,
-1, -1, -1, -1, -1, -1, 257, 258,
};
#if YYBTYACC
-static const YYINT expr.oxout_ctable[] = { -1,
+static const YYINT expr_oxout_ctable[] = { -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
#define YYUNDFTOKEN 264
#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
#if YYDEBUG
-static const char *const expr.oxout_name[] = {
+static const char *const expr_oxout_name[] = {
"$end",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,"'('","')'","'*'","'+'",0,"'-'",0,"'/'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"error","ID",
"CONST","$accept","yyyAugNonterm","s","$$1","expr","illegal-symbol",
};
-static const char *const expr.oxout_rule[] = {
+static const char *const expr_oxout_rule[] = {
"$accept : yyyAugNonterm",
"$$1 :",
"yyyAugNonterm : $$1 s",
void yyyHandleOverflow(char which)
- {char *msg1,*msg2;
- long oldSize,newSize;
+ {char *msg1 = "?", *msg2;
+ long oldSize = 0, newSize;
switch(which)
{
case yyySSALof :
}
if (yyyCond(2) != yyyPass) {
#line 23 "expr.Y"
- printf("postfix: ")/* missing ; */
+ printf("postfix: ");
#line 497 "expr.oxout.y"
}
static int yyyInitDone = 0;
if (yyyInitDone) return;
- if ((yyyRS = (struct yyyRSitem *)
- calloc((size_t)(yyyRSmaxSize+1), (size_t)sizeof(struct yyyRSitem))
+ if ((yyyRS = (yyyRSitem *)
+ calloc((size_t)(yyyRSmaxSize+1), (size_t)sizeof(yyyRSitem))
)
==
- ((struct yyyRSitem *) NULL)
+ ((yyyRSitem *) NULL)
)
yyyfatal("malloc error in ox ready set space allocation\n");
yyyRS++;
(yyyRCT *) calloc((size_t)yyyNattrbs, (size_t)sizeof(yyyRCT));
if ((*yyyOxStackItem)->node->refCountList == (yyyRCT *) NULL)
yyyfatal("malloc error in ox reference count list space allocation\n");
- (*yyyOxStackItem)->node->prodNum = yyyProdNum;
+ (*yyyOxStackItem)->node->prodNum = (int) yyyProdNum;
va_start(ap, yyval_OxAttrbs);
for (i=1;i<=yyyRHSlength;i++)
{yyySIT *yaccStDum = va_arg(ap,struct yyyOxAttrbs *)->yyyOxStackItem;
-void yyyGenLeaf(int nAttrbs,int typeNum,long startP,long stopP,YYSTYPE *yylval)
+void yyyGenLeaf(int nAttrbs,int typeNum,long startP,long stopP,YYSTYPE *mylval)
{yyyRCT *rcPdum;
- yyySIT **yyyOxStackItem = &yylval->yyyOxAttrbs.yyyOxStackItem;
+ yyySIT **yyyOxStackItem = &mylval->yyyOxAttrbs.yyyOxStackItem;
(*yyyOxStackItem) = (yyySIT *) malloc((size_t)sizeof(yyySIT));
if ((*yyyOxStackItem) == (yyySIT *) NULL)
yyyfatal("malloc error in ox yacc semantic stack space allocation\n");
-#ifndef _expr.oxout__defines_h_
-#define _expr.oxout__defines_h_
+#ifndef _expr_oxout__defines_h_
+#define _expr_oxout__defines_h_
#define ID 257
#define CONST 258
} yyyOxAttrbs;
} YYSTYPE;
#endif /* !YYSTYPE_IS_DECLARED */
-extern YYSTYPE expr.oxout_lval;
+extern YYSTYPE expr_oxout_lval;
-#endif /* _expr.oxout__defines_h_ */
+#endif /* _expr_oxout__defines_h_ */
--- /dev/null
+/* testing only */
+
+typedef int yyyWAT;
+typedef int yyyWST;
+typedef int yyyFT;
+
+typedef struct yyyLexemes {
+ char * lexeme;
+} yyyLexemes;
+
+typedef struct yyyAttribs {
+ yyyLexemes yyyAttrb1;
+} yyyAttribs;
+
+typedef struct yyyParent {
+ struct yyyGNT * noderef;
+ struct yyyStackItem * stackref;
+} yyyParent;
+
+typedef struct yyyGNT {
+ int * refCountList;
+ int refCountListLen;
+ struct yyyParent parent;
+ int parentIsStack;
+ int prodNum;
+ int whichSym;
+ struct yyyGNT ** cL;
+ int cLlen;
+ yyyAttribs yyyAttrbs;
+} yyyGNT;
+
+typedef int yyyRCT;
+
+typedef struct yyyStackItem {
+ int wa;
+ int whichSym;
+ yyyGNT * node;
+ long solvedSAlist;
+} yyySIT;
+
+#define yyyRSitem yyySIT
+
+yyyRSitem *yyyRSTop;
+yyyRSitem *yyyAfterRS;
+yyyRSitem *yyyRS;
+
+#undef yyparse
+#undef yylex
+#undef yyerror
+#undef yychar
+#undef yyval
+#undef yylval
+#undef yydebug
+#undef yynerrs
+#undef yyerrflag
+#undef yylhs
+#undef yylen
+#undef yydefred
+#undef yystos
+#undef yydgoto
+#undef yysindex
+#undef yyrindex
+#undef yygindex
+#undef yytable
+#undef yycheck
+#undef yyname
+#undef yyrule
+#undef yycindex
+#undef yyctable
+
+struct {
+ int test_yycheck [256];
+ int test_yydefred [256];
+ int test_yydgoto [256];
+ int test_yygindex [256];
+ int test_yylen [256];
+ int test_yylhs [256];
+ int test_yyrindex [256];
+ int test_yysindex [256];
+ int test_yytable [256];
+#define yycheck test_expr.test_yycheck
+#define yydefred test_expr.test_yydefred
+#define yydgoto test_expr.test_yydgoto
+#define yygindex test_expr.test_yygindex
+#define yylen test_expr.test_yylen
+#define yylhs test_expr.test_yylhs
+#define yyrindex test_expr.test_yyrindex
+#define yysindex test_expr.test_yysindex
+#define yytable test_expr.test_yytable
+} test_expr;
void yyyHandleOverflow(char which)
- {char *msg1,*msg2;
- long oldSize,newSize;
+ {char *msg1 = "?", *msg2;
+ long oldSize = 0, newSize;
switch(which)
{
case yyySSALof :
}
if (yyyCond(2) != yyyPass) {
#line 23 "expr.Y"
- printf("postfix: ")/* missing ; */
+ printf("postfix: ");
#line 497 "expr.oxout.y"
}
static int yyyInitDone = 0;
if (yyyInitDone) return;
- if ((yyyRS = (struct yyyRSitem *)
- calloc((size_t)(yyyRSmaxSize+1), (size_t)sizeof(struct yyyRSitem))
+ if ((yyyRS = (yyyRSitem *)
+ calloc((size_t)(yyyRSmaxSize+1), (size_t)sizeof(yyyRSitem))
)
==
- ((struct yyyRSitem *) NULL)
+ ((yyyRSitem *) NULL)
)
yyyfatal("malloc error in ox ready set space allocation\n");
yyyRS++;
(yyyRCT *) calloc((size_t)yyyNattrbs, (size_t)sizeof(yyyRCT));
if ((*yyyOxStackItem)->node->refCountList == (yyyRCT *) NULL)
yyyfatal("malloc error in ox reference count list space allocation\n");
- (*yyyOxStackItem)->node->prodNum = yyyProdNum;
+ (*yyyOxStackItem)->node->prodNum = (int) yyyProdNum;
va_start(ap, yyval_OxAttrbs);
for (i=1;i<=yyyRHSlength;i++)
{yyySIT *yaccStDum = va_arg(ap,struct yyyOxAttrbs *)->yyyOxStackItem;
-void yyyGenLeaf(int nAttrbs,int typeNum,long startP,long stopP,YYSTYPE *yylval)
+void yyyGenLeaf(int nAttrbs,int typeNum,long startP,long stopP,YYSTYPE *mylval)
{yyyRCT *rcPdum;
- yyySIT **yyyOxStackItem = &yylval->yyyOxAttrbs.yyyOxStackItem;
+ yyySIT **yyyOxStackItem = &mylval->yyyOxAttrbs.yyyOxStackItem;
(*yyyOxStackItem) = (yyySIT *) malloc((size_t)sizeof(yyySIT));
if ((*yyyOxStackItem) == (yyySIT *) NULL)
yyyfatal("malloc error in ox yacc semantic stack space allocation\n");
#!/bin/sh
-# $Id: run_make.sh,v 1.19 2021/06/19 19:27:47 tom Exp $
+# $Id: run_make.sh,v 1.20 2022/01/01 20:53:16 tom Exp $
# vi:ts=4 sw=4:
# do a test-compile on each of the ".c" files in the test-directory
C_FILE=`basename "$1"`
O_FILE=`basename "$C_FILE" .c`.o
shift
+ RETEST=`unset CDPATH; cd $TEST_DIR; pwd`
cd "$REF_DIR"
- make -f "$PROG_DIR/makefile" srcdir="$PROG_DIR" "$O_FILE" "$@"
+ test -f "$I_FILE" && rm "$I_FILE"
+ make -f "$PROG_DIR/makefile" EXTRA_CFLAGS=-I$RETEST srcdir="$PROG_DIR" "$O_FILE" "$@"
test -f "$O_FILE" && rm "$O_FILE"
cd "$THIS_DIR"
}
#!/bin/sh
-# $Id: run_test.sh,v 1.33 2021/06/19 19:33:05 tom Exp $
+# $Id: run_test.sh,v 1.35 2022/01/01 22:28:17 tom Exp $
# vi:ts=4 sw=4:
errors=0
-e "s%$YACC_escaped%YACC%" \
-e "s%^yacc\>%YACC%" \
-e "s%YACC:.*option.*$%YACC: error message%" \
+ -e "s%yacc:.*option.*$%YACC: error message%" \
-e "s%^Usage: yacc\>%Usage: YACC%" \
-e '/YYPATCH/s/[0-9][0-9]*/"yyyymmdd"/' \
-e '/#define YYPATCH/s/PATCH/CHECK/' \
*)
root=`basename "$input" .y`
ROOT="test-$root"
- prefix=${root}_
+ prefix=`echo "${root}_" | sed -e 's/[.]/_/g'`
OPTS=
OPT2=
#define YYEOF 0
#ifndef yyparse
-#define yyparse expr.oxout_parse
+#define yyparse expr_oxout_parse
#endif /* yyparse */
#ifndef yylex
-#define yylex expr.oxout_lex
+#define yylex expr_oxout_lex
#endif /* yylex */
#ifndef yyerror
-#define yyerror expr.oxout_error
+#define yyerror expr_oxout_error
#endif /* yyerror */
#ifndef yychar
-#define yychar expr.oxout_char
+#define yychar expr_oxout_char
#endif /* yychar */
#ifndef yyval
-#define yyval expr.oxout_val
+#define yyval expr_oxout_val
#endif /* yyval */
#ifndef yylval
-#define yylval expr.oxout_lval
+#define yylval expr_oxout_lval
#endif /* yylval */
#ifndef yydebug
-#define yydebug expr.oxout_debug
+#define yydebug expr_oxout_debug
#endif /* yydebug */
#ifndef yynerrs
-#define yynerrs expr.oxout_nerrs
+#define yynerrs expr_oxout_nerrs
#endif /* yynerrs */
#ifndef yyerrflag
-#define yyerrflag expr.oxout_errflag
+#define yyerrflag expr_oxout_errflag
#endif /* yyerrflag */
#ifndef yylhs
-#define yylhs expr.oxout_lhs
+#define yylhs expr_oxout_lhs
#endif /* yylhs */
#ifndef yylen
-#define yylen expr.oxout_len
+#define yylen expr_oxout_len
#endif /* yylen */
#ifndef yydefred
-#define yydefred expr.oxout_defred
+#define yydefred expr_oxout_defred
#endif /* yydefred */
#ifndef yydgoto
-#define yydgoto expr.oxout_dgoto
+#define yydgoto expr_oxout_dgoto
#endif /* yydgoto */
#ifndef yysindex
-#define yysindex expr.oxout_sindex
+#define yysindex expr_oxout_sindex
#endif /* yysindex */
#ifndef yyrindex
-#define yyrindex expr.oxout_rindex
+#define yyrindex expr_oxout_rindex
#endif /* yyrindex */
#ifndef yygindex
-#define yygindex expr.oxout_gindex
+#define yygindex expr_oxout_gindex
#endif /* yygindex */
#ifndef yytable
-#define yytable expr.oxout_table
+#define yytable expr_oxout_table
#endif /* yytable */
#ifndef yycheck
-#define yycheck expr.oxout_check
+#define yycheck expr_oxout_check
#endif /* yycheck */
#ifndef yyname
-#define yyname expr.oxout_name
+#define yyname expr_oxout_name
#endif /* yyname */
#ifndef yyrule
-#define yyrule expr.oxout_rule
+#define yyrule expr_oxout_rule
#endif /* yyrule */
-#define YYPREFIX "expr.oxout_"
+#define YYPREFIX "expr_oxout_"
#define YYPURE 0
#define CONST 258
#define YYERRCODE 256
typedef int YYINT;
-static const YYINT expr.oxout_lhs[] = { -1,
+static const YYINT expr_oxout_lhs[] = { -1,
2, 0, 1, 3, 3, 3, 3, 3, 3, 3,
};
-static const YYINT expr.oxout_len[] = { 2,
+static const YYINT expr_oxout_len[] = { 2,
0, 2, 1, 3, 3, 3, 3, 3, 1, 1,
};
-static const YYINT expr.oxout_defred[] = { 1,
+static const YYINT expr_oxout_defred[] = { 1,
0, 0, 9, 10, 0, 2, 0, 0, 0, 0,
0, 0, 8, 0, 0, 4, 0,
};
-static const YYINT expr.oxout_dgoto[] = { 1,
+static const YYINT expr_oxout_dgoto[] = { 1,
6, 2, 7,
};
-static const YYINT expr.oxout_sindex[] = { 0,
+static const YYINT expr_oxout_sindex[] = { 0,
0, -40, 0, 0, -40, 0, -18, -24, -40, -40,
-40, -40, 0, -37, -37, 0, -39,
};
-static const YYINT expr.oxout_rindex[] = { 0,
+static const YYINT expr_oxout_rindex[] = { 0,
0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
0, 0, 0, 2, 8, 0, 1,
};
-static const YYINT expr.oxout_gindex[] = { 0,
+static const YYINT expr_oxout_gindex[] = { 0,
0, 0, 4,
};
#define YYTABLESIZE 218
-static const YYINT expr.oxout_table[] = { 5,
+static const YYINT expr_oxout_table[] = { 5,
6, 5, 11, 0, 11, 3, 0, 7, 8, 12,
0, 0, 14, 15, 16, 17, 13, 11, 9, 0,
10, 0, 12, 11, 9, 0, 10, 0, 12, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 4,
};
-static const YYINT expr.oxout_check[] = { 40,
+static const YYINT expr_oxout_check[] = { 40,
0, 0, 42, -1, 42, 0, -1, 0, 5, 47,
-1, -1, 9, 10, 11, 12, 41, 42, 43, -1,
45, -1, 47, 42, 43, -1, 45, -1, 47, -1,
#define YYUNDFTOKEN 264
#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
#if YYDEBUG
-static const char *const expr.oxout_name[] = {
+static const char *const expr_oxout_name[] = {
"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,"'('","')'","'*'","'+'",0,"'-'",0,"'/'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"ID",
"CONST",0,0,0,0,0,"illegal-symbol",
};
-static const char *const expr.oxout_rule[] = {
+static const char *const expr_oxout_rule[] = {
"$accept : yyyAugNonterm",
"$$1 :",
"yyyAugNonterm : $$1 s",
void yyyHandleOverflow(char which)
- {char *msg1,*msg2;
- long oldSize,newSize;
+ {char *msg1 = "?", *msg2;
+ long oldSize = 0, newSize;
switch(which)
{
case yyySSALof :
}
if (yyyCond(2) != yyyPass) {
#line 23 "expr.Y"
- printf("postfix: ")/* missing ; */
+ printf("postfix: ");
#line 497 "expr.oxout.y"
}
static int yyyInitDone = 0;
if (yyyInitDone) return;
- if ((yyyRS = (struct yyyRSitem *)
- calloc((size_t)(yyyRSmaxSize+1), (size_t)sizeof(struct yyyRSitem))
+ if ((yyyRS = (yyyRSitem *)
+ calloc((size_t)(yyyRSmaxSize+1), (size_t)sizeof(yyyRSitem))
)
==
- ((struct yyyRSitem *) NULL)
+ ((yyyRSitem *) NULL)
)
yyyfatal("malloc error in ox ready set space allocation\n");
yyyRS++;
(yyyRCT *) calloc((size_t)yyyNattrbs, (size_t)sizeof(yyyRCT));
if ((*yyyOxStackItem)->node->refCountList == (yyyRCT *) NULL)
yyyfatal("malloc error in ox reference count list space allocation\n");
- (*yyyOxStackItem)->node->prodNum = yyyProdNum;
+ (*yyyOxStackItem)->node->prodNum = (int) yyyProdNum;
va_start(ap, yyval_OxAttrbs);
for (i=1;i<=yyyRHSlength;i++)
{yyySIT *yaccStDum = va_arg(ap,struct yyyOxAttrbs *)->yyyOxStackItem;
-void yyyGenLeaf(int nAttrbs,int typeNum,long startP,long stopP,YYSTYPE *yylval)
+void yyyGenLeaf(int nAttrbs,int typeNum,long startP,long stopP,YYSTYPE *mylval)
{yyyRCT *rcPdum;
- yyySIT **yyyOxStackItem = &yylval->yyyOxAttrbs.yyyOxStackItem;
+ yyySIT **yyyOxStackItem = &mylval->yyyOxAttrbs.yyyOxStackItem;
(*yyyOxStackItem) = (yyySIT *) malloc((size_t)sizeof(yyySIT));
if ((*yyyOxStackItem) == (yyySIT *) NULL)
yyyfatal("malloc error in ox yacc semantic stack space allocation\n");
} yyyOxAttrbs;
} YYSTYPE;
#endif /* !YYSTYPE_IS_DECLARED */
-extern YYSTYPE expr.oxout_lval;
+extern YYSTYPE expr_oxout_lval;