Mesa (master): glsl: Classify "layout" like other identifiers.

Kenneth Graunke kwg at kemper.freedesktop.org
Sat Jul 27 17:37:01 UTC 2013


Module: Mesa
Branch: master
Commit: c178ec0d7e8cc7007cb34e4f56f14261a057c200
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c178ec0d7e8cc7007cb34e4f56f14261a057c200

Author: Kenneth Graunke <kenneth at 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 <kenneth at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Cc: mesa-stable at lists.freedesktop.org

---

 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 b95b254..9375230 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);
 		   }
 		}
 




More information about the mesa-commit mailing list