From: Kenneth Graunke Date: Mon, 29 Jul 2013 22:55:06 +0000 (-0700) Subject: mesa/program: Change the program parser's namespace. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de917b4c4c4dfc949d5f8e3d9eb2dd48b63a3de5;p=mesa.git mesa/program: Change the program parser's namespace. 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 Reviewed-by: Matt Turner Tested-by: Laurent Carlier Cc: "9.2" mesa-stable@lists.freedesktop.org --- diff --git a/src/mesa/program/program_lexer.l b/src/mesa/program/program_lexer.l index 0947bb0462c..d5dbcf347b3 100644 --- a/src/mesa/program/program_lexer.l +++ b/src/mesa/program/program_lexer.l @@ -165,7 +165,7 @@ szf [HR]? cc C? sat (_SAT)? -%option prefix="_mesa_program_" +%option prefix="_mesa_program_lexer_" %option bison-bridge bison-locations reentrant noyywrap %% diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y index e2da633477d..6415bef765f 100644 --- a/src/mesa/program/program_parse.y +++ b/src/mesa/program/program_parse.y @@ -269,8 +269,15 @@ static struct asm_instruction *asm_instruction_copy_ctor( %type optionalSign %{ -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, - void *yyscanner); +extern int +_mesa_program_lexer_lex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, + void *yyscanner); + +static int +yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, void *yyscanner) +{ + return _mesa_program_lexer_lex(yylval_param, yylloc_param, yyscanner); +} %} %%