Skip to content

Commit

Permalink
Import byacc 20170430
Browse files Browse the repository at this point in the history
  • Loading branch information
christos committed Jun 5, 2017
1 parent ed93e2f commit 7280938
Show file tree
Hide file tree
Showing 59 changed files with 378 additions and 101 deletions.
30 changes: 30 additions & 0 deletions external/bsd/byacc/dist/CHANGES
@@ -1,3 +1,33 @@
2017-04-30 Thomas E. Dickey <dickey@invisible-island.net>

* test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/rename_debug.c, btyaccpar.c, btyaccpar.skel:
fix another uninitialized variable warning in "make check_make" for btyacc

* test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/calc3.tab.c, btyaccpar.c, btyaccpar.skel, test/yacc/ok_syntax1.tab.c, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/calc3.tab.c, yaccpar.c, defs.h, yaccpar.skel, output.c:
fix some compiler warnings for "make check_make" by adding section init_vars,
which initializes the body_vars for pure-parser configuration.

2017-04-30 Tom.Shields

* output.c:
use YY_NO_LEAKS set in configure --with-no-leaks, in the generated code

2017-04-30 Julien.Ramseier

* main.c, test/yacc/big_l.output:
fix typo in unsupported-flag warning message

2017-04-30 Thomas E. Dickey <dickey@invisible-island.net>

* VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile:
bump

2017-03-18 Thomas E. Dickey <dickey@invisible-island.net>

* config.sub: 2017-02-07

* config.guess: 2017-03-05

2017-02-01 Thomas E. Dickey <dickey@invisible-island.net>

* test/btyacc/expr.oxout.error, test/btyacc/expr.oxout.output, test/btyacc/expr.oxout.tab.c, test/btyacc/expr.oxout.tab.h, test/yacc/expr.oxout.error, test/yacc/expr.oxout.output, test/yacc/expr.oxout.tab.c, test/yacc/expr.oxout.tab.h:
Expand Down
2 changes: 1 addition & 1 deletion external/bsd/byacc/dist/MANIFEST
@@ -1,4 +1,4 @@
MANIFEST for byacc-20170201, version t20170201
MANIFEST for byacc-20170430, version t20170430
--------------------------------------------------------------------------------
MANIFEST this file
ACKNOWLEDGEMENTS original version of byacc - 1993
Expand Down
2 changes: 1 addition & 1 deletion external/bsd/byacc/dist/VERSION
@@ -1 +1 @@
20170201
20170430
21 changes: 19 additions & 2 deletions external/bsd/byacc/dist/btyaccpar.c
@@ -1,10 +1,10 @@
/* $NetBSD: btyaccpar.c,v 1.1.1.4 2017/02/11 19:30:02 christos Exp $ */
/* $NetBSD: btyaccpar.c,v 1.1.1.5 2017/06/05 18:49:47 christos Exp $ */

/* This file generated automatically using
* @Id: skel2c,v 1.4 2016/06/07 00:26:09 tom Exp @
*/

/* @Id: btyaccpar.skel,v 1.5 2016/12/02 22:02:28 tom Exp @ */
/* @Id: btyaccpar.skel,v 1.6 2017/04/30 23:40:34 tom Exp @ */

#include "defs.h"

Expand Down Expand Up @@ -452,6 +452,23 @@ const char *const body_2[] =
" if (yydebug)",
" fprintf(stderr, \"%sdebug[<# of symbols on state stack>]\\n\", YYPREFIX);",
"#endif",
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
" memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range));",
"#endif",
"",
0
};

const char *const init_vars[] =
{
" yyerrflag = 0;",
" yychar = 0;",
" memset(&yyval, 0, sizeof(yyval));",
" memset(&yylval, 0, sizeof(yylval));",
"#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
" memset(&yyloc, 0, sizeof(yyloc));",
" memset(&yylloc, 0, sizeof(yylloc));",
"#endif",
"",
0
};
Expand Down
15 changes: 14 additions & 1 deletion external/bsd/byacc/dist/btyaccpar.skel
@@ -1,4 +1,4 @@
/* Id: btyaccpar.skel,v 1.5 2016/12/02 22:02:28 tom Exp */
/* Id: btyaccpar.skel,v 1.7 2017/05/01 00:13:19 tom Exp */

#include "defs.h"

Expand Down Expand Up @@ -385,6 +385,19 @@ YYPARSE_DECL()
if (yydebug)
fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX);
#endif
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range));
#endif

%% init_vars
yyerrflag = 0;
yychar = 0;
memset(&yyval, 0, sizeof(yyval));
memset(&yylval, 0, sizeof(yylval));
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
memset(&yyloc, 0, sizeof(yyloc));
memset(&yylloc, 0, sizeof(yylloc));
#endif

%% body_3
%%ifdef YYBTYACC
Expand Down
12 changes: 8 additions & 4 deletions external/bsd/byacc/dist/config.guess
Expand Up @@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2017 Free Software Foundation, Inc.

timestamp='2017-01-01'
timestamp='2017-03-05'

# 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
Expand Down Expand Up @@ -837,10 +837,11 @@ EOF
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
UNAME_PROCESSOR=x86_64 ;;
i386)
UNAME_PROCESSOR=i586 ;;
esac
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
Expand Down Expand Up @@ -1343,6 +1344,9 @@ EOF
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit ;;
NSX-?:NONSTOP_KERNEL:*:*)
echo nsx-tandem-nsk${UNAME_RELEASE}
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
exit ;;
Expand Down
5 changes: 4 additions & 1 deletion external/bsd/byacc/dist/config.sub
Expand Up @@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2017 Free Software Foundation, Inc.

timestamp='2017-01-01'
timestamp='2017-02-07'

# 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
Expand Down Expand Up @@ -948,6 +948,9 @@ case $basic_machine in
nsr-tandem)
basic_machine=nsr-tandem
;;
nsx-tandem)
basic_machine=nsx-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
Expand Down
5 changes: 3 additions & 2 deletions external/bsd/byacc/dist/defs.h
@@ -1,6 +1,6 @@
/* $NetBSD: defs.h,v 1.1.1.9 2017/02/11 19:30:02 christos Exp $ */
/* $NetBSD: defs.h,v 1.1.1.10 2017/06/05 18:49:47 christos Exp $ */

/* Id: defs.h,v 1.56 2017/02/02 00:44:38 tom Exp */
/* Id: defs.h,v 1.57 2017/04/30 23:29:11 tom Exp */

#ifdef HAVE_CONFIG_H
#include <config.h>
Expand Down Expand Up @@ -309,6 +309,7 @@ extern const char *const hdr_defs[];
extern const char *const hdr_vars[];
extern const char *const body_1[];
extern const char *const body_vars[];
extern const char *const init_vars[];
extern const char *const body_2[];
extern const char *const body_3[];
extern const char *const trailer[];
Expand Down
6 changes: 3 additions & 3 deletions external/bsd/byacc/dist/main.c
@@ -1,6 +1,6 @@
/* $NetBSD: main.c,v 1.1.1.9 2017/02/11 19:30:02 christos Exp $ */
/* $NetBSD: main.c,v 1.1.1.10 2017/06/05 18:49:47 christos Exp $ */

/* Id: main.c,v 1.59 2017/02/02 00:44:38 tom Exp */
/* Id: main.c,v 1.60 2017/04/30 20:57:56 Julien.Ramseier Exp */

#include <signal.h>
#ifndef _WIN32
Expand Down Expand Up @@ -268,7 +268,7 @@ setflag(int ch)
#if defined(YYBTYACC)
locations = 1;
#else
unsupported_flag_warning("-B", "reconfigure with --enable-btyacc");
unsupported_flag_warning("-L", "reconfigure with --enable-btyacc");
#endif
break;

Expand Down
24 changes: 22 additions & 2 deletions external/bsd/byacc/dist/output.c
@@ -1,6 +1,6 @@
/* $NetBSD: output.c,v 1.1.1.9 2017/02/11 19:30:02 christos Exp $ */
/* $NetBSD: output.c,v 1.1.1.10 2017/06/05 18:49:47 christos Exp $ */

/* Id: output.c,v 1.79 2016/12/02 20:42:38 tom Exp */
/* Id: output.c,v 1.81 2017/04/30 23:23:32 tom Exp */

#include "defs.h"

Expand Down Expand Up @@ -1586,6 +1586,19 @@ output_pure_parser(FILE * fp)
putc_code(fp, '\n');
}

#if defined(YY_NO_LEAKS)
static void
output_no_leaks(FILE * fp)
{
putc_code(fp, '\n');

if (fp == code_file)
++outline;
fputs("#define YY_NO_LEAKS 1\n", fp);
putc_code(fp, '\n');
}
#endif

static void
output_trailing_text(void)
{
Expand Down Expand Up @@ -1987,6 +2000,9 @@ output(void)

output_prefix(fp);
output_pure_parser(fp);
#if defined(YY_NO_LEAKS)
output_no_leaks(fp);
#endif
output_stored_text(fp);
output_stype(fp);
#if defined(YYBTYACC)
Expand Down Expand Up @@ -2070,6 +2086,10 @@ output(void)
write_section(code_file, body_vars);
}
write_section(code_file, body_2);
if (pure_parser)
{
write_section(code_file, init_vars);
}
#if defined(YYBTYACC)
if (initial_action)
output_initial_action();
Expand Down
4 changes: 2 additions & 2 deletions external/bsd/byacc/dist/package/byacc.spec
@@ -1,8 +1,8 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
%define AppVersion 20170201
%define AppVersion 20170430
%define UseProgram yacc
# $XTermId: byacc.spec,v 1.33 2017/02/01 09:55:04 tom Exp $
# $XTermId: byacc.spec,v 1.34 2017/04/30 20:55:15 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1
Expand Down
6 changes: 6 additions & 0 deletions external/bsd/byacc/dist/package/debian/changelog
@@ -1,3 +1,9 @@
byacc (20170430) unstable; urgency=low

* maintenance updates

-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 30 Apr 2017 16:55:15 -0400

byacc (20170201) unstable; urgency=low

* maintenance updates
Expand Down
4 changes: 2 additions & 2 deletions external/bsd/byacc/dist/package/mingw-byacc.spec
@@ -1,8 +1,8 @@
Summary: byacc - public domain Berkeley LALR Yacc parser generator
%define AppProgram byacc
%define AppVersion 20170201
%define AppVersion 20170430
%define UseProgram yacc
# $XTermId: mingw-byacc.spec,v 1.15 2017/02/01 09:55:04 tom Exp $
# $XTermId: mingw-byacc.spec,v 1.16 2017/04/30 20:55:15 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1
Expand Down
2 changes: 1 addition & 1 deletion external/bsd/byacc/dist/package/pkgsrc/Makefile
@@ -1,7 +1,7 @@
# NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp
#

DISTNAME= byacc-20170201
DISTNAME= byacc-20170430
PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ftp://invisible-island.net/byacc/
Expand Down
16 changes: 14 additions & 2 deletions external/bsd/byacc/dist/test/btyacc/btyacc_calc1.tab.c
@@ -1,4 +1,4 @@
/* $NetBSD: btyacc_calc1.tab.c,v 1.1.1.4 2017/02/11 19:30:03 christos Exp $ */
/* $NetBSD: btyacc_calc1.tab.c,v 1.1.1.5 2017/06/05 18:49:49 christos Exp $ */

/* original parser id follows */
/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */
Expand Down Expand Up @@ -820,6 +820,18 @@ YYPARSE_DECL()
if (yydebug)
fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX);
#endif
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range));
#endif

yyerrflag = 0;
yychar = 0;
memset(&yyval, 0, sizeof(yyval));
memset(&yylval, 0, sizeof(yylval));
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
memset(&yyloc, 0, sizeof(yyloc));
memset(&yylloc, 0, sizeof(yylloc));
#endif

#if YYBTYACC
yyps = yyNewState(0); if (yyps == 0) goto yyenomem;
Expand Down Expand Up @@ -1527,7 +1539,7 @@ case 28:
yyval.vval = yystack.l_mark[-1].vval;
}
break;
#line 1529 "btyacc_calc1.tab.c"
#line 1541 "btyacc_calc1.tab.c"
default:
break;
}
Expand Down
7 changes: 5 additions & 2 deletions external/bsd/byacc/dist/test/btyacc/btyacc_demo.tab.c
@@ -1,4 +1,4 @@
/* $NetBSD: btyacc_demo.tab.c,v 1.1.1.4 2017/02/11 19:30:04 christos Exp $ */
/* $NetBSD: btyacc_demo.tab.c,v 1.1.1.5 2017/06/05 18:49:50 christos Exp $ */

/* original parser id follows */
/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */
Expand Down Expand Up @@ -1332,6 +1332,9 @@ YYPARSE_DECL()
if (yydebug)
fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX);
#endif
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range));
#endif

#if YYBTYACC
yyps = yyNewState(0); if (yyps == 0) goto yyenomem;
Expand Down Expand Up @@ -2105,7 +2108,7 @@ case 59:
#line 197 "btyacc_demo.y"
{ yyval.code = yystack.l_mark[-1].code; }
break;
#line 2107 "btyacc_demo.tab.c"
#line 2110 "btyacc_demo.tab.c"
default:
break;
}
Expand Down
7 changes: 5 additions & 2 deletions external/bsd/byacc/dist/test/btyacc/btyacc_destroy1.tab.c
@@ -1,4 +1,4 @@
/* $NetBSD: btyacc_destroy1.tab.c,v 1.1.1.4 2017/02/11 19:30:03 christos Exp $ */
/* $NetBSD: btyacc_destroy1.tab.c,v 1.1.1.5 2017/06/05 18:49:49 christos Exp $ */

/* original parser id follows */
/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */
Expand Down Expand Up @@ -664,6 +664,9 @@ YYPARSE_DECL()
if (yydebug)
fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX);
#endif
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range));
#endif

#if YYBTYACC
yyps = yyNewState(0); if (yyps == 0) goto yyenomem;
Expand Down Expand Up @@ -1227,7 +1230,7 @@ case 9:
#line 86 "btyacc_destroy1.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
break;
#line 1229 "btyacc_destroy1.tab.c"
#line 1232 "btyacc_destroy1.tab.c"
default:
break;
}
Expand Down
7 changes: 5 additions & 2 deletions external/bsd/byacc/dist/test/btyacc/btyacc_destroy2.tab.c
@@ -1,4 +1,4 @@
/* $NetBSD: btyacc_destroy2.tab.c,v 1.1.1.4 2017/02/11 19:30:03 christos Exp $ */
/* $NetBSD: btyacc_destroy2.tab.c,v 1.1.1.5 2017/06/05 18:49:49 christos Exp $ */

/* original parser id follows */
/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */
Expand Down Expand Up @@ -664,6 +664,9 @@ YYPARSE_DECL()
if (yydebug)
fprintf(stderr, "%sdebug[<# of symbols on state stack>]\n", YYPREFIX);
#endif
#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)
memset(yyerror_loc_range, 0, sizeof(yyerror_loc_range));
#endif

#if YYBTYACC
yyps = yyNewState(0); if (yyps == 0) goto yyenomem;
Expand Down Expand Up @@ -1227,7 +1230,7 @@ case 9:
#line 86 "btyacc_destroy2.y"
{ yyval.nlist = yystack.l_mark[-5].nlist; }
break;
#line 1229 "btyacc_destroy2.tab.c"
#line 1232 "btyacc_destroy2.tab.c"
default:
break;
}
Expand Down

0 comments on commit 7280938

Please sign in to comment.