mesa/program: Change the program parser's namespace.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 29 Jul 2013 22:55:06 +0000 (15:55 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 31 Jul 2013 18:52:06 +0000 (11:52 -0700)
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
src/mesa/program/program_lexer.l
src/mesa/program/program_parse.y

index 0947bb0462cb75dd0fc19929d8b01628b32ce71b..d5dbcf347b37894d197fd3756364115b09572175 100644 (file)
@@ -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
 %%
 
index e2da633477dfd875b54fafb69628662a90027517..6415bef765f9bee6d0c131583c2d829b54ba0891 100644 (file)
@@ -269,8 +269,15 @@ static struct asm_instruction *asm_instruction_copy_ctor(
 %type <negate> 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);
+}
 %}
 
 %%