From 08316e9e75cf7e1fc1f8e46e5c463fce8e27322f Mon Sep 17 00:00:00 2001 From: gatecat Date: Mon, 3 Jan 2022 19:15:15 +0000 Subject: [PATCH] Fixes for recent yacc Signed-off-by: gatecat --- distrib/sources/behvrlog/bgl_bcomp.lex | 2 ++ distrib/sources/behvrlog/bgl_bcomp.yac | 7 ++++--- distrib/sources/mbkvrlog/mgl_scomp.lex | 2 ++ distrib/sources/mbkvrlog/mgl_scomp.yac | 7 ++++--- 4 files changed, 12 insertions(+), 6 deletions(-) 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 -- 2.30.2