summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-01 14:46:33 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-01 14:46:33 +0900
commit56113e171a604ffc77d52270c61ae6ee2d0627fc (patch)
tree41f0711ab92ff64579ef7fb531aa515420ea30bb
parentdf8480a772d4352d0dff9a532d821c31893d9a78 (diff)
downloadbyacc-56113e171a604ffc77d52270c61ae6ee2d0627fc.tar.gz
byacc-56113e171a604ffc77d52270c61ae6ee2d0627fc.tar.bz2
byacc-56113e171a604ffc77d52270c61ae6ee2d0627fc.zip
Imported Upstream version 20101127upstream/20101127
-rw-r--r--CHANGES8
-rw-r--r--VERSION2
-rw-r--r--output.c16
-rw-r--r--package/byacc.spec4
-rw-r--r--package/debian/changelog6
-rw-r--r--test/calc2.tab.c6
-rw-r--r--test/calc3.tab.c6
7 files changed, 36 insertions, 12 deletions
diff --git a/CHANGES b/CHANGES
index 340b7fe..7cb4d53 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+2010-11-27 Thomas Dickey <tom@crayon>
+
+ * package/byacc.spec, package/debian/changelog, VERSION: bump
+
+ * output.c:
+ corrected use of %parse-param value in yyerror(); it doesn't use &yylval
+ (report by Clifford Yapp)
+
2010-11-26 Thomas Dickey <tom@crayon>
* skeleton.c: typo
diff --git a/VERSION b/VERSION
index 60c6408..65e43a6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20101126
+20101127
diff --git a/output.c b/output.c
index 1d4f771..eaa2834 100644
--- a/output.c
+++ b/output.c
@@ -1,4 +1,4 @@
-/* $Id: output.c,v 1.36 2010/11/26 16:47:40 tom Exp $ */
+/* $Id: output.c,v 1.37 2010/11/27 17:28:29 tom Exp $ */
#include "defs.h"
@@ -1299,8 +1299,16 @@ output_error_decl(void)
putl_code("/* Parameters sent to yyerror. */\n");
if (parse_param)
{
+ param *p;
+
putl_code("#define YYERROR_DECL() yyerror(YYSTYPE *v, const char *s)\n");
- putl_code("#define YYERROR_CALL(msg) yyerror(&yylval, msg)\n");
+
+ puts_code("#define YYERROR_CALL(msg) yyerror(");
+
+ for (p = parse_param; p; p = p->next)
+ fprintf(code_file, "%s, ", p->name);
+
+ putl_code("msg)\n");
}
else
{
@@ -1355,7 +1363,9 @@ output_yyerror_call(const char *msg)
puts_code(" yyerror(");
if (parse_param)
{
- puts_code("&yylval, ");
+ param *p;
+ for (p = parse_param; p; p = p->next)
+ fprintf(code_file, "%s, ", p->name);
}
puts_code("\"");
puts_code(msg);
diff --git a/package/byacc.spec b/package/byacc.spec
index e2c9183..3c355b5 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 20101126
+%define AppVersion 20101127
%define UseProgram yacc
-# $XTermId: byacc.spec,v 1.5 2010/11/26 09:22:40 tom Exp $
+# $XTermId: byacc.spec,v 1.6 2010/11/27 17:32:08 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: 1
diff --git a/package/debian/changelog b/package/debian/changelog
index 2ae7dd9..b012531 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,3 +1,9 @@
+byacc (20101127) unstable; urgency=low
+
+ * corrected yyerror use of %parse-param data
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 27 Nov 2010 12:32:00 -0500
+
byacc (20101126) unstable; urgency=low
* additional fix to generated code to avoid symbol conflict
diff --git a/test/calc2.tab.c b/test/calc2.tab.c
index 5d863a5..4cf9c03 100644
--- a/test/calc2.tab.c
+++ b/test/calc2.tab.c
@@ -128,7 +128,7 @@ typedef int YYSTYPE;
/* Parameters sent to yyerror. */
#define YYERROR_DECL() yyerror(YYSTYPE *v, const char *s)
-#define YYERROR_CALL(msg) yyerror(&yylval, msg)
+#define YYERROR_CALL(msg) yyerror(regs, base, msg)
extern int YYPARSE_DECL();
extern int YYLEX_DECL();
@@ -473,7 +473,7 @@ yyloop:
}
if (yyerrflag) goto yyinrecovery;
- yyerror(&yylval, "syntax error");
+ yyerror(regs, base, "syntax error");
goto yyerrlab;
@@ -658,7 +658,7 @@ to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
goto yyloop;
yyoverflow:
- yyerror(&yylval, "yacc stack overflow");
+ yyerror(regs, base, "yacc stack overflow");
yyabort:
yyfreestack(&yystack);
diff --git a/test/calc3.tab.c b/test/calc3.tab.c
index 50b9009..1ef1908 100644
--- a/test/calc3.tab.c
+++ b/test/calc3.tab.c
@@ -128,7 +128,7 @@ typedef int YYSTYPE;
/* Parameters sent to yyerror. */
#define YYERROR_DECL() yyerror(YYSTYPE *v, const char *s)
-#define YYERROR_CALL(msg) yyerror(&yylval, msg)
+#define YYERROR_CALL(msg) yyerror(regs, base, msg)
extern int YYPARSE_DECL();
extern int YYLEX_DECL();
@@ -473,7 +473,7 @@ yyloop:
}
if (yyerrflag) goto yyinrecovery;
- yyerror(&yylval, "syntax error");
+ yyerror(regs, base, "syntax error");
goto yyerrlab;
@@ -658,7 +658,7 @@ to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
goto yyloop;
yyoverflow:
- yyerror(&yylval, "yacc stack overflow");
+ yyerror(regs, base, "yacc stack overflow");
yyabort:
yyfreestack(&yystack);