From: gatecat Date: Mon, 3 Jan 2022 19:15:15 +0000 (+0000) Subject: Fixes for recent yacc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=08316e9e75cf7e1fc1f8e46e5c463fce8e27322f;p=tas-yagle.git Fixes for recent yacc Signed-off-by: gatecat --- diff --git a/distrib/sources/behvrlog/bgl_bcomp.lex b/distrib/sources/behvrlog/bgl_bcomp.lex index 184e67c..177739c 100644 --- a/distrib/sources/behvrlog/bgl_bcomp.lex +++ b/distrib/sources/behvrlog/bgl_bcomp.lex @@ -34,7 +34,9 @@ extern "C" { } #include "bgl_type.h" +extern "C" { #include "bgl_bcomp.tab.h" +} #include "bgl_parse.h" #include "bgl_util.h" #include "bgl_class.h" diff --git a/distrib/sources/behvrlog/bgl_bcomp.yac b/distrib/sources/behvrlog/bgl_bcomp.yac index 691851c..158e704 100644 --- a/distrib/sources/behvrlog/bgl_bcomp.yac +++ b/distrib/sources/behvrlog/bgl_bcomp.yac @@ -13,16 +13,17 @@ /* */ /****************************************************************************/ +%parse-param {void *parm} +%lex-param {void *parm} + %{ #define YYDEBUG 1 -#define YYPARSE_PARAM parm -#define YYLEX_PARAM parm #define BGL_CONTEXT(x) ((bgl_getcontext(parm))->x) #undef yyerror -#define yyerror(x) bgl_bcomperror(x, (bgl_getcontext(parm))) +#define yyerror(parm, x) bgl_bcomperror(x, (bgl_getcontext(parm))) #include #include diff --git a/distrib/sources/mbkvrlog/mgl_scomp.lex b/distrib/sources/mbkvrlog/mgl_scomp.lex index f58dd74..ff1d57e 100644 --- a/distrib/sources/mbkvrlog/mgl_scomp.lex +++ b/distrib/sources/mbkvrlog/mgl_scomp.lex @@ -35,7 +35,9 @@ extern "C" { } #include "mgl_type.h" +extern "C" { #include "mgl_scomp.tab.h" +} #include "mgl_parse.h" #include "mgl_util.h" #include "mgl_class.h" diff --git a/distrib/sources/mbkvrlog/mgl_scomp.yac b/distrib/sources/mbkvrlog/mgl_scomp.yac index f7bfc77..5a51add 100644 --- a/distrib/sources/mbkvrlog/mgl_scomp.yac +++ b/distrib/sources/mbkvrlog/mgl_scomp.yac @@ -13,16 +13,17 @@ /* */ /****************************************************************************/ +%parse-param {void *parm} +%lex-param {void *parm} + %{ #define YYDEBUG 1 -#define YYPARSE_PARAM parm -#define YYLEX_PARAM parm #define MGL_CONTEXT(x) ((mgl_getcontext(parm))->x) #undef yyerror -#define yyerror(x) mgl_scomperror(x, (mgl_getcontext(parm))) +#define yyerror(parm, x) mgl_scomperror(x, (mgl_getcontext(parm))) #include #include