[Mesa-stable] [PATCH 1/3] glsl: use the prefixed name of the lexer generated functions

Emil Velikov emil.l.velikov at gmail.com
Thu Oct 27 11:41:09 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

Flex version 2.6.2 does not expand (define) the yy version of some
function, thus we fail to compile.

Strictly speaking this might be a flex bug, although expanding the few
instances is perfectly trivial and works with 2.6.2 and earlier versions
of flex.

Cc: "12.0 13.0" <mesa-stable at lists.freedesktop.org>
Cc: Mike Lothian <mike at fireburn.co.uk>
Repored-by: Mike Lothian <mike at fireburn.co.uk>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
Do we have any flex/bison wizards around ? I'm wondering if one cannot
skim through the files and nuke some of the {mis,ab}uses that are bound
to be lurking ;-)
---
 src/compiler/glsl/glsl_lexer.ll | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/compiler/glsl/glsl_lexer.ll b/src/compiler/glsl/glsl_lexer.ll
index d5e5d4c..e5492bf 100644
--- a/src/compiler/glsl/glsl_lexer.ll
+++ b/src/compiler/glsl/glsl_lexer.ll
@@ -627,12 +627,12 @@ classify_identifier(struct _mesa_glsl_parse_state *state, const char *name)
 void
 _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string)
 {
-   yylex_init_extra(state, & state->scanner);
-   yy_scan_string(string, state->scanner);
+   _mesa_glsl_lexer_lex_init_extra(state, & state->scanner);
+   _mesa_glsl_lexer__scan_string(string, state->scanner);
 }
 
 void
 _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state)
 {
-   yylex_destroy(state->scanner);
+   _mesa_glsl_lexer_lex_destroy(state->scanner);
 }
-- 
2.10.0



More information about the mesa-stable mailing list