From 519dc8d604746f0e46c8ed0968dec27c1ad3f768 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Thu, 10 May 2018 09:08:46 +0000 Subject: [PATCH] snapshot of project "byacc", label t20180510 --- CHANGES | 10 ++++++++++ MANIFEST | 2 +- VERSION | 2 +- output.c | 22 ++++++++++++++-------- package/byacc.spec | 4 ++-- package/debian/changelog | 6 ++++++ package/mingw-byacc.spec | 4 ++-- package/pkgsrc/Makefile | 2 +- test/btyacc/rename_debug.i | 4 ++++ test/yacc/rename_debug.i | 4 ++++ 10 files changed, 45 insertions(+), 15 deletions(-) diff --git a/CHANGES b/CHANGES index c636474..42a8246 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,13 @@ +2018-05-10 Thomas E. Dickey + + * output.c: + add a fallback definition for YYDEBUG to the -i externs file. + + * test/btyacc/rename_debug.i, test/yacc/rename_debug.i: regen + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + 2018-05-09 Thomas E. Dickey * configure: regen diff --git a/MANIFEST b/MANIFEST index be01c7a..148d026 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -MANIFEST for byacc, version t20180509 +MANIFEST for byacc, version t20180510 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 diff --git a/VERSION b/VERSION index 491e19f..dfbdeba 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -20180509 +20180510 diff --git a/output.c b/output.c index 9854d35..f7352dc 100644 --- a/output.c +++ b/output.c @@ -1,4 +1,4 @@ -/* $Id: output.c,v 1.86 2018/05/09 08:52:58 tom Exp $ */ +/* $Id: output.c,v 1.87 2018/05/10 09:08:46 tom Exp $ */ #include "defs.h" @@ -1289,6 +1289,15 @@ output_stored_text(FILE * fp) write_code_lineno(fp); } +static int +output_yydebug(FILE * fp) +{ + fprintf(fp, "#ifndef YYDEBUG\n"); + fprintf(fp, "#define YYDEBUG %d\n", tflag); + fprintf(fp, "#endif\n"); + return 3; +} + static void output_debug(void) { @@ -1299,16 +1308,11 @@ output_debug(void) ++outline; fprintf(code_file, "#define YYFINAL %d\n", final_state); - putl_code(code_file, "#ifndef YYDEBUG\n"); - ++outline; - fprintf(code_file, "#define YYDEBUG %d\n", tflag); - putl_code(code_file, "#endif\n"); + outline += output_yydebug(code_file); if (rflag) { - fprintf(output_file, "#ifndef YYDEBUG\n"); - fprintf(output_file, "#define YYDEBUG %d\n", tflag); - fprintf(output_file, "#endif\n"); + output_yydebug(output_file); } maxtok = 0; @@ -2039,6 +2043,8 @@ output(void) if (iflag) { + fprintf(externs_file, "\n"); + output_yydebug(externs_file); output_externs(externs_file, global_vars); if (!pure_parser) output_externs(externs_file, impure_vars); diff --git a/package/byacc.spec b/package/byacc.spec index 7172381..b1ff465 100644 --- a/package/byacc.spec +++ b/package/byacc.spec @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20180509 +%define AppVersion 20180510 %define UseProgram yacc -# $Id: byacc.spec,v 1.38 2018/05/10 01:13:51 tom Exp $ +# $Id: byacc.spec,v 1.39 2018/05/10 08:59:09 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 diff --git a/package/debian/changelog b/package/debian/changelog index a1fd3d7..6177033 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,3 +1,9 @@ +byacc (20180510) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey Thu, 10 May 2018 04:59:09 -0400 + byacc (20180509) unstable; urgency=low * maintenance updates diff --git a/package/mingw-byacc.spec b/package/mingw-byacc.spec index 25994c7..75b02c8 100644 --- a/package/mingw-byacc.spec +++ b/package/mingw-byacc.spec @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20180509 +%define AppVersion 20180510 %define UseProgram yacc -# $Id: mingw-byacc.spec,v 1.20 2018/05/10 01:13:51 tom Exp $ +# $Id: mingw-byacc.spec,v 1.21 2018/05/10 08:59:09 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 diff --git a/package/pkgsrc/Makefile b/package/pkgsrc/Makefile index f244124..0ccb47f 100644 --- a/package/pkgsrc/Makefile +++ b/package/pkgsrc/Makefile @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $ # -DISTNAME= byacc-20180509 +DISTNAME= byacc-20180510 PKGREVISION= 1 CATEGORIES= devel MASTER_SITES= ftp://ftp.invisible-island.net/byacc/ diff --git a/test/btyacc/rename_debug.i b/test/btyacc/rename_debug.i index dc6da89..ce4871a 100644 --- a/test/btyacc/rename_debug.i +++ b/test/btyacc/rename_debug.i @@ -51,6 +51,10 @@ int YYLEX_DECL(); extern int YYPARSE_DECL(); +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif + #if YYDEBUG extern int yydebug; #endif diff --git a/test/yacc/rename_debug.i b/test/yacc/rename_debug.i index 45d02f1..1e81e02 100644 --- a/test/yacc/rename_debug.i +++ b/test/yacc/rename_debug.i @@ -51,6 +51,10 @@ int YYLEX_DECL(); extern int YYPARSE_DECL(); +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif + #if YYDEBUG extern int yydebug; #endif