summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/translator/glslang.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/glslang.l')
-rw-r--r--src/3rdparty/angle/src/compiler/translator/glslang.l19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/glslang.l b/src/3rdparty/angle/src/compiler/translator/glslang.l
index 518b78df11..ee4d28b6d6 100644
--- a/src/3rdparty/angle/src/compiler/translator/glslang.l
+++ b/src/3rdparty/angle/src/compiler/translator/glslang.l
@@ -32,6 +32,7 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
#pragma warning(disable: 4189)
#pragma warning(disable: 4505)
#pragma warning(disable: 4701)
+#pragma warning(disable: 4702)
#endif
}
@@ -70,6 +71,7 @@ static int floatsuffix_check(TParseContext* context);
%option noyywrap nounput never-interactive
%option yylineno reentrant bison-bridge bison-locations
%option extra-type="TParseContext*"
+%x FIELDS
D [0-9]
L [a-zA-Z_]
@@ -358,7 +360,7 @@ O [0-7]
")" { return RIGHT_PAREN; }
("["|"<:") { return LEFT_BRACKET; }
("]"|":>") { return RIGHT_BRACKET; }
-"." { return DOT; }
+"." { BEGIN(FIELDS); return DOT; }
"!" { return BANG; }
"-" { return DASH; }
"~" { return TILDE; }
@@ -373,9 +375,16 @@ O [0-7]
"&" { return AMPERSAND; }
"?" { return QUESTION; }
+<FIELDS>{L}({L}|{D})* {
+ BEGIN(INITIAL);
+ yylval->lex.string = NewPoolTString(yytext);
+ return FIELD_SELECTION;
+}
+<FIELDS>[ \t\v\f\r] {}
+
[ \t\v\n\f\r] { }
-<<EOF>> { yyterminate(); }
-. { assert(false); return 0; }
+<*><<EOF>> { yyterminate(); }
+<*>. { assert(false); return 0; }
%%
@@ -492,8 +501,8 @@ int floatsuffix_check(TParseContext* context)
return(FLOATCONSTANT);
}
-void yyerror(YYLTYPE* lloc, TParseContext* context, const char* reason) {
- context->error(*lloc, reason, yyget_text(context->scanner));
+void yyerror(YYLTYPE* lloc, TParseContext* context, void *scanner, const char* reason) {
+ context->error(*lloc, reason, yyget_text(scanner));
context->recover();
}