Fixes for recent yacc
authorgatecat <gatecat@ds0.me>
Mon, 3 Jan 2022 19:15:15 +0000 (19:15 +0000)
committergatecat <gatecat@ds0.me>
Mon, 3 Jan 2022 19:28:46 +0000 (19:28 +0000)
Signed-off-by: gatecat <gatecat@ds0.me>
distrib/sources/behvrlog/bgl_bcomp.lex
distrib/sources/behvrlog/bgl_bcomp.yac
distrib/sources/mbkvrlog/mgl_scomp.lex
distrib/sources/mbkvrlog/mgl_scomp.yac

index 184e67c1b5a3c5e0c9655d29694aa98531334b40..177739ceae37aa162b94d9261b8a6b33df0273ab 100644 (file)
@@ -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"
index 691851c3dd78e11b32617f4f0cb5c9573baf86f6..158e70408a3c62ba38f76e186c4b196a7806a465 100644 (file)
 /*                                                                          */
 /****************************************************************************/
 
+%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 <stdio.h>
 #include <string.h>
index f58dd7491e073450dac60e52a27728771aedd9f7..ff1d57eeed87597e94387c50be91fecbabb8a884 100644 (file)
@@ -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"
index f7bfc77b34bb3f4652fb26c41dd05f1a9a1080b3..5a51addc983017d272deef144e81582bbeec512f 100644 (file)
 /*                                                                          */
 /****************************************************************************/
 
+%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 <stdio.h>
 #include <stdlib.h>