Module: Mesa
Branch: 9.1
Commit: 9688066bcaee041ea148e7dd60fba36012e00539
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9688066bcaee041ea148e7dd60fba36012e00539

Author: Kenneth Graunke <kenn...@whitecape.org>
Date:   Fri Jul 26 12:31:06 2013 -0700

glsl: Classify "layout" like other identifiers.

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 <kenn...@whitecape.org>
Reviewed-by: Matt Turner <matts...@gmail.com>
Cc: mesa-sta...@lists.freedesktop.org
(cherry picked from commit c178ec0d7e8cc7007cb34e4f56f14261a057c200)

---

 src/glsl/glsl_lexer.ll |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
index ddc9f80..f6aee4a 100644
--- a/src/glsl/glsl_lexer.ll
+++ b/src/glsl/glsl_lexer.ll
@@ -361,7 +361,7 @@ layout              {
                      return LAYOUT_TOK;
                   } else {
                      yylval->identifier = strdup(yytext);
-                     return IDENTIFIER;
+                     return classify_identifier(yyextra, yytext);
                   }
                }
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to