On 2024-04-13, at 09:31:07 +0200, Andreas Tille wrote: > Control: tags -1 help > thanks > > Hi, > > while I was able to fix the origininal cause of the failure I'm now blocked by > some issue that cython seems to miss adding some > #include <lex.h> > but I have no idea how to accomplish this. The Salsa CI build log[1] says: > > ... > y.tab.c: In function 'yyparse': > y.tab.c:1409:16: error: implicit declaration of function 'yylex' > [-Werror=implicit-function-declaration] > y.tab.c:2185:7: error: implicit declaration of function 'yyerror'; did you > mean 'YYerror'? [-Werror=implicit-function-declaration] > In file included from aqlparse.y:335: > aqlparse.l: In function 'yylex': > ... > > Any help would be welcome > Andreas.
You are missing declarations:
* `yylex` - this needs to be added to the yacc source
* `yyerror` - this is present but hidden by a CPP conditional
* `yywrap` - this is not needed (grep for "YY_SKIP_YYWRAP") and can be
disabled
Patch attached.
You can find more info about all three in the flex and bison manuals.
J.
diff --git a/waql/aql_.h b/waql/aql_.h
index cde94a97896b..dd3b89116280 100644
--- a/waql/aql_.h
+++ b/waql/aql_.h
@@ -448,7 +448,7 @@ char* aqlNodeTypeName (AqlNodeType inType);
char* aqlOpTypeName (AqlOpType inType);
char* aqlLocSourceTypeName (AqlLocSourceType inType);
-#if defined(IBM)
+#if defined(IBM) || defined(LINUX)
/* predeclare lex.yy.c fns */
void yyerror (char *s);
#endif
diff --git a/waql/aqlparse.l b/waql/aqlparse.l
index 313375027957..bc232e0a4c48 100644
--- a/waql/aqlparse.l
+++ b/waql/aqlparse.l
@@ -102,6 +102,8 @@
%}
+%option noyywrap
+
letter [A-Za-z]
digit [0-9]
id {letter}({letter}|{digit}|"_")*
diff --git a/waql/aqlparse.y b/waql/aqlparse.y
index 9989831a4838..975ae325c14c 100644
--- a/waql/aqlparse.y
+++ b/waql/aqlparse.y
@@ -77,6 +77,8 @@ static int tokPos[1024];
/**************************************************************/
+int yylex(void);
+
%}
%union {
signature.asc
Description: PGP signature

