On Thu, 2016-10-27 at 12:41 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.veli...@collabora.com>
> 
> Flex version 2.6.2 does not expand (define) the yy version of some
> function, thus we fail to compile.

functions

> 
> 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.

This seems a bit fragile to me. As far as I can tell (although it might
be unlikely) there is no guarantee that the expanded functions won't be
be changed on the flex end and require renaming again in future.

It would be nice if we could discover the real problem rather than
papering over it. If we must do a hack it would be good to note that it
is was because of a flex bug (code comment), otherwise if it's our bug
IMO we should try fix it properly.


> 
> Cc: "12.0 13.0" <mesa-sta...@lists.freedesktop.org>
> Cc: Mike Lothian <m...@fireburn.co.uk>
> Repored-by: Mike Lothian <m...@fireburn.co.uk>
> Signed-off-by: Emil Velikov <emil.l.veli...@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);
>  }
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to