[Mesa-stable] [Mesa-dev] [PATCH] glsl: Classify "layout" like other identifiers.

Matt Turner mattst88 at gmail.com
Fri Jul 26 14:09:25 PDT 2013


On Fri, Jul 26, 2013 at 12:34 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> When "layout" isn't being lexed as LAYOUT_TOK, we should treat it like
> an ordinary identifier.  This means we need to classify it to determine
> whether we should return IDENTIFIER, TYPE_IDENTIFIER, or NEW_IDENTIFIER.
>
> Fixes the WebGL conformance test "shader-with-non-reserved-words."
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Tapani Pälli <tapani.palli at intel.com>
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/glsl/glsl_lexer.ll | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
> index 145119c..491dcec 100644
> --- a/src/glsl/glsl_lexer.ll
> +++ b/src/glsl/glsl_lexer.ll
> @@ -352,7 +352,7 @@ layout              {
>                       return LAYOUT_TOK;
>                    } else {
>                       yylval->identifier = strdup(yytext);
> -                     return IDENTIFIER;
> +                     return classify_identifier(yyextra, yytext);
>                    }
>                 }
>
> --
> 1.8.3.3

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-stable mailing list