+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
-/* $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"
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
{
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);
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
+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
/* 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();
}
if (yyerrflag) goto yyinrecovery;
- yyerror(&yylval, "syntax error");
+ yyerror(regs, base, "syntax error");
goto yyerrlab;
goto yyloop;
yyoverflow:
- yyerror(&yylval, "yacc stack overflow");
+ yyerror(regs, base, "yacc stack overflow");
yyabort:
yyfreestack(&yystack);
/* 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();
}
if (yyerrflag) goto yyinrecovery;
- yyerror(&yylval, "syntax error");
+ yyerror(regs, base, "syntax error");
goto yyerrlab;
goto yyloop;
yyoverflow:
- yyerror(&yylval, "yacc stack overflow");
+ yyerror(regs, base, "yacc stack overflow");
yyabort:
yyfreestack(&yystack);