Imported Upstream version 20220101 upstream/20220101
authorJinWang An <jinwang.an@samsung.com>
Tue, 10 Jan 2023 04:20:09 +0000 (13:20 +0900)
committerJinWang An <jinwang.an@samsung.com>
Tue, 10 Jan 2023 04:20:09 +0000 (13:20 +0900)
20 files changed:
CHANGES
MANIFEST
VERSION
package/byacc.spec
package/debian/changelog
package/debian/control
package/debian/copyright
package/debian/postinst
package/debian/prerm
package/debian/rules
package/mingw-byacc.spec
package/pkgsrc/Makefile
test/btyacc/expr.oxout.tab.c
test/btyacc/expr.oxout.tab.h
test/expr.oxout.h [new file with mode: 0644]
test/expr.oxout.y
test/run_make.sh
test/run_test.sh
test/yacc/expr.oxout.tab.c
test/yacc/expr.oxout.tab.h

diff --git a/CHANGES b/CHANGES
index 92e8a6c..817e4b5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,43 @@
+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
index 819bf1c..a508cbe 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-MANIFEST for byacc-20211224, version t20211224
+MANIFEST for byacc-20220101, version t20220101
 --------------------------------------------------------------------------------
 MANIFEST                        this file
 ACKNOWLEDGEMENTS                original version of byacc - 1993
@@ -466,6 +466,7 @@ test/err_syntax8.y              testcase for used_reserved()
 test/err_syntax8a.y             testcase for used_reserved()
 test/err_syntax9.y              testcase for tokenized_start()
 test/error.y                    original version of byacc - 1993
+test/expr.oxout.h               stub for "run_make.sh"
 test/expr.oxout.y               test-case for "#line" feature
 test/grammar.y                  grammar from cproto
 test/inherit0.y                 testcase for btyacc
diff --git a/VERSION b/VERSION
index 14fac3a..a20c0b2 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20211224
+20220101
index 36f1d62..9cff7ab 100644 (file)
@@ -1,9 +1,9 @@
 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
@@ -20,10 +20,10 @@ parsers consist of a set of LALR(1) parsing tables and a driver
 routine written in the C programming language.  It has a public domain
 license which includes the generated C.
 
-%package -n btyacc
+%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
@@ -58,18 +58,16 @@ pushd BUILD-byacc
 CONFIGURE_TOP=%{my_srcdir} \
 %configure %{CFG_OPTS} \
   --program-prefix=b \
-  --program-transform-name='s,\^,b,'
 make
 popd
 
-mkdir BUILD-btyacc
-pushd BUILD-btyacc
+mkdir BUILD-byacc2
+pushd BUILD-byacc2
 CONFIGURE_TOP=%{my_srcdir} \
 %configure %{CFG_OPTS} \
   --enable-btyacc \
-  --program-prefix=bt \
+  --program-transform-name='s,\<yacc,byacc2,g' \
   --with-max-table-size=123456 \
-  --program-transform-name='s,\^,bt,'
 make
 popd
 
@@ -81,7 +79,7 @@ make install DESTDIR=$RPM_BUILD_ROOT
 ( cd $RPM_BUILD_ROOT%{_bindir} && ln -vs %{AppProgram} %{UseProgram} )
 popd
 
-pushd BUILD-btyacc
+pushd BUILD-byacc2
 make install DESTDIR=$RPM_BUILD_ROOT
 popd
 
@@ -94,7 +92,7 @@ popd
 %{_prefix}/bin/%{UseProgram}
 %{_mandir}/man1/%{AppProgram}.*
 
-%files -n btyacc
+%files -n byacc2
 %defattr(-,root,root)
 %{_prefix}/bin/%{AltProgram}
 %{_mandir}/man1/%{AltProgram}.*
@@ -102,6 +100,9 @@ popd
 %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
 
index 84f3ee6..bf3dee9 100644 (file)
@@ -1,3 +1,9 @@
+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
index a6b8644..46beb2f 100644 (file)
@@ -8,6 +8,7 @@ Homepage: https://invisible-island.net/byacc/
 Vcs-Git: https://salsa.debian.org/dickey/byacc
 
 Package: byacc
+Provides: yacc
 Architecture: any
 Multi-Arch: foreign
 Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -18,7 +19,8 @@ Description: public domain Berkeley LALR Yacc parser generator
  routine written in the C programming language.  It has a public domain
  license which includes the generated C.
 
-Package: btyacc
+Package: byacc2
+Provides: yacc
 Architecture: any
 Multi-Arch: foreign
 Depends: ${shlibs:Depends}, ${misc:Depends}
index 073020c..dbbb151 100644 (file)
@@ -36,7 +36,7 @@ skeleton.c with the bug report.  Do not expect rapid responses.
 
 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
index ca6276d..28bcd08 100644 (file)
@@ -8,6 +8,10 @@ if [ $1 != "upgrade" ] ; then
                --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#
index f3889d7..d300dcf 100644 (file)
@@ -5,6 +5,7 @@ set -e
 
 if [ $1 != "upgrade" ]; then
        update-alternatives --remove yacc /usr/bin/byacc
+       update-alternatives --remove yacc /usr/bin/byacc2
 fi
 
 #DEBHELPER#
index b71dc19..acd148e 100755 (executable)
@@ -1,5 +1,5 @@
 #!/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
@@ -9,7 +9,7 @@
 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)
@@ -25,10 +25,10 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 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
 
@@ -43,7 +43,7 @@ configure = \
                --mandir=\$${prefix}/share/man \
                --sysconfdir=/etc \
                --enable-stdnoreturn \
-               --program-transform-name='s,^,b,'
+               --program-transform-name='s,^yacc,byacc,'
 
 all: build
 
@@ -67,7 +67,7 @@ config-byacc-stamp:
 
        touch $@
 
-config-btyacc-stamp:
+config-byacc2-stamp:
        dh_testdir
 
        rm -rf $(BTYACC_TMP)
@@ -75,7 +75,7 @@ config-btyacc-stamp:
        cd $(BTYACC_TMP); $(configure) \
                --enable-btyacc \
                --with-max-table-size=123456 \
-               --program-transform-name='s,^,bt,'
+               --program-transform-name='s,^yacc,byacc2,'
 
        touch $@
 
@@ -86,7 +86,7 @@ build-byacc-stamp: config-byacc-stamp
 
        touch $@
 
-build-btyacc-stamp: config-btyacc-stamp
+build-byacc2-stamp: config-byacc2-stamp
        dh_testdir
 
        cd $(BTYACC_TMP); $(MAKE)
@@ -103,13 +103,13 @@ install-byacc-stamp: build-byacc-stamp
 
        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 $@
 
index d7281c5..b3b95a9 100644 (file)
@@ -1,8 +1,8 @@
 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
index 09e9310..d0051f9 100644 (file)
@@ -1,17 +1,17 @@
-# $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $
+# $NetBSD: Makefile,v 1.24 2021/08/14 01:04:32 mef Exp $
 #
 
-DISTNAME=      byacc-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
index 177aa70..92952b1 100644 (file)
 #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
 
@@ -199,44 +199,44 @@ extern int YYPARSE_DECL();
 #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,
@@ -260,7 +260,7 @@ static const YYINT expr.oxout_table[] = {                 5,
     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,
@@ -285,7 +285,7 @@ static const YYINT expr.oxout_check[] = {                40,
    -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,
@@ -318,7 +318,7 @@ static const YYINT expr.oxout_ctable[] = {               -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,
@@ -329,7 +329,7 @@ static const char *const expr.oxout_name[] = {
 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",
@@ -532,8 +532,8 @@ void yyyfatal(char *msg)
 
 
 void yyyHandleOverflow(char which) 
-  {char *msg1,*msg2; 
-   long  oldSize,newSize; 
+  {char *msg1 = "?", *msg2; 
+   long  oldSize = 0, newSize; 
    switch(which) 
      {
       case yyySSALof : 
@@ -840,7 +840,7 @@ if (yyyCond(1) != yyyPass) {
 }
 if (yyyCond(2) != yyyPass) {
 #line 23 "expr.Y"
- printf("postfix:  ")/* missing ; */
+ printf("postfix:  ");
                    
 #line 497 "expr.oxout.y"
 }
@@ -1142,11 +1142,11 @@ void yyyYoxInit(void)
    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++; 
@@ -1201,7 +1201,7 @@ void yyyGenIntNode(long yyyProdNum, int yyyRHSlength, int yyyNattrbs, struct yyy
             (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;
@@ -1302,9 +1302,9 @@ void yyyAdjustINRC(long yyyProdNum, int yyyRHSlength, long startP, long stopP, s
 
 
 
-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");
index b9a9bf3..cafc41c 100644 (file)
@@ -1,5 +1,5 @@
-#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
@@ -15,6 +15,6 @@ struct yyyStackItem *yyyOxStackItem;
 } 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_ */
diff --git a/test/expr.oxout.h b/test/expr.oxout.h
new file mode 100644 (file)
index 0000000..9317098
--- /dev/null
@@ -0,0 +1,90 @@
+/* testing only */
+
+typedef int yyyWAT;
+typedef int yyyWST;
+typedef int yyyFT;
+
+typedef struct yyyLexemes {
+       char * lexeme;
+} yyyLexemes;
+
+typedef struct yyyAttribs {
+       yyyLexemes yyyAttrb1;
+} yyyAttribs;
+
+typedef struct yyyParent {
+       struct yyyGNT * noderef;
+       struct yyyStackItem * stackref;
+} yyyParent;
+
+typedef struct yyyGNT {
+       int *   refCountList;
+       int     refCountListLen;
+       struct yyyParent parent;
+       int     parentIsStack;
+       int     prodNum;
+       int     whichSym;
+       struct yyyGNT ** cL;
+       int     cLlen;
+       yyyAttribs yyyAttrbs;
+} yyyGNT;
+
+typedef int yyyRCT;
+
+typedef struct yyyStackItem {
+       int             wa;
+       int             whichSym;
+       yyyGNT *        node;
+       long            solvedSAlist;
+} yyySIT;
+
+#define yyyRSitem yyySIT
+
+yyyRSitem *yyyRSTop;
+yyyRSitem *yyyAfterRS;
+yyyRSitem *yyyRS; 
+
+#undef yyparse
+#undef yylex
+#undef yyerror
+#undef yychar
+#undef yyval
+#undef yylval
+#undef yydebug
+#undef yynerrs
+#undef yyerrflag
+#undef yylhs
+#undef yylen
+#undef yydefred
+#undef yystos
+#undef yydgoto
+#undef yysindex
+#undef yyrindex
+#undef yygindex
+#undef yytable
+#undef yycheck
+#undef yyname
+#undef yyrule
+#undef yycindex
+#undef yyctable
+
+struct {
+    int test_yycheck  [256];
+    int test_yydefred [256];
+    int test_yydgoto  [256];
+    int test_yygindex [256];
+    int test_yylen    [256];
+    int test_yylhs    [256];
+    int test_yyrindex [256];
+    int test_yysindex [256];
+    int test_yytable  [256];
+#define yycheck  test_expr.test_yycheck
+#define yydefred test_expr.test_yydefred
+#define yydgoto  test_expr.test_yydgoto
+#define yygindex test_expr.test_yygindex
+#define yylen    test_expr.test_yylen
+#define yylhs    test_expr.test_yylhs
+#define yyrindex test_expr.test_yyrindex
+#define yysindex test_expr.test_yysindex
+#define yytable  test_expr.test_yytable
+} test_expr;
index c1769fb..80f16bd 100644 (file)
@@ -183,8 +183,8 @@ void yyyfatal(char *msg)
 
 
 void yyyHandleOverflow(char which) 
-  {char *msg1,*msg2; 
-   long  oldSize,newSize; 
+  {char *msg1 = "?", *msg2; 
+   long  oldSize = 0, newSize; 
    switch(which) 
      {
       case yyySSALof : 
@@ -491,7 +491,7 @@ if (yyyCond(1) != yyyPass) {
 }
 if (yyyCond(2) != yyyPass) {
 #line 23 "expr.Y"
- printf("postfix:  ")/* missing ; */
+ printf("postfix:  ");
                    
 #line 497 "expr.oxout.y"
 }
@@ -793,11 +793,11 @@ void yyyYoxInit(void)
    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++; 
@@ -852,7 +852,7 @@ void yyyGenIntNode(long yyyProdNum, int yyyRHSlength, int yyyNattrbs, struct yyy
             (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;
@@ -953,9 +953,9 @@ void yyyAdjustINRC(long yyyProdNum, int yyyRHSlength, long startP, long stopP, s
 
 
 
-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");
index 03f188e..eec6bbe 100755 (executable)
@@ -1,5 +1,5 @@
 #!/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
@@ -30,8 +30,10 @@ run_make() {
        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"
 }
index 2877164..7acbcfd 100755 (executable)
@@ -1,5 +1,5 @@
 #!/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
@@ -19,6 +19,7 @@ test_diffs() {
                        -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/' \
@@ -210,7 +211,7 @@ do
        *)
                root=`basename "$input" .y`
                ROOT="test-$root"
-               prefix=${root}_
+               prefix=`echo "${root}_" | sed -e 's/[.]/_/g'`
 
                OPTS=
                OPT2=
index 591bd9d..af45682 100644 (file)
 #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
 
@@ -179,32 +179,32 @@ extern int YYPARSE_DECL();
 #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,
@@ -228,7 +228,7 @@ static const YYINT expr.oxout_table[] = {                 5,
     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,
@@ -260,7 +260,7 @@ static const YYINT expr.oxout_check[] = {                40,
 #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,
@@ -271,7 +271,7 @@ static const char *const expr.oxout_name[] = {
 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",
@@ -382,8 +382,8 @@ void yyyfatal(char *msg)
 
 
 void yyyHandleOverflow(char which) 
-  {char *msg1,*msg2; 
-   long  oldSize,newSize; 
+  {char *msg1 = "?", *msg2; 
+   long  oldSize = 0, newSize; 
    switch(which) 
      {
       case yyySSALof : 
@@ -690,7 +690,7 @@ if (yyyCond(1) != yyyPass) {
 }
 if (yyyCond(2) != yyyPass) {
 #line 23 "expr.Y"
- printf("postfix:  ")/* missing ; */
+ printf("postfix:  ");
                    
 #line 497 "expr.oxout.y"
 }
@@ -992,11 +992,11 @@ void yyyYoxInit(void)
    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++; 
@@ -1051,7 +1051,7 @@ void yyyGenIntNode(long yyyProdNum, int yyyRHSlength, int yyyNattrbs, struct yyy
             (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;
@@ -1152,9 +1152,9 @@ void yyyAdjustINRC(long yyyProdNum, int yyyRHSlength, long startP, long stopP, s
 
 
 
-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");
index 517c971..03527bb 100644 (file)
@@ -12,4 +12,4 @@ struct yyyStackItem *yyyOxStackItem;
 } yyyOxAttrbs;
 } YYSTYPE;
 #endif /* !YYSTYPE_IS_DECLARED */
-extern YYSTYPE expr.oxout_lval;
+extern YYSTYPE expr_oxout_lval;