Bison 3.0 removes the YYLEX_PARAM macro. In preparation for handling
this using %lex-param, the parser needs a wrapper function for the
actual Flex lex() function.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67354
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Tested-by: Laurent Carlier <lordheavym@gmail.com>
Cc: "9.2" mesa-stable@lists.freedesktop.org
%option bison-bridge bison-locations reentrant noyywrap
%option nounput noyy_top_state
%option never-interactive
-%option prefix="_mesa_glsl_"
+%option prefix="_mesa_glsl_lexer_"
%option extra-type="struct _mesa_glsl_parse_state *"
%x PP PRAGMA
{
_mesa_glsl_error(loc, st, "%s", msg);
}
+
+static int
+_mesa_glsl_lex(YYSTYPE *val, YYLTYPE *loc, void *scanner)
+{
+ return _mesa_glsl_lexer_lex(val, loc, scanner);
+}
%}
%expect 0
extern void _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state);
union YYSTYPE;
-extern int _mesa_glsl_lex(union YYSTYPE *yylval, YYLTYPE *yylloc,
- void *scanner);
+extern int _mesa_glsl_lexer_lex(union YYSTYPE *yylval, YYLTYPE *yylloc,
+ void *scanner);
extern int _mesa_glsl_parse(struct _mesa_glsl_parse_state *);