aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glsl/glsl_lexer.ll15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
index 419a07b1daf..57c46be84ca 100644
--- a/src/glsl/glsl_lexer.ll
+++ b/src/glsl/glsl_lexer.ll
@@ -450,18 +450,9 @@ layout {
return LITERAL_INTEGER(8);
}
-[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = _mesa_strtof(yytext, NULL);
- return FLOATCONSTANT;
- }
-\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = _mesa_strtof(yytext, NULL);
- return FLOATCONSTANT;
- }
-[0-9]+\.([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = _mesa_strtof(yytext, NULL);
- return FLOATCONSTANT;
- }
+[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? |
+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? |
+[0-9]+\.([eE][+-]?[0-9]+)?[fF]? |
[0-9]+[eE][+-]?[0-9]+[fF]? {
yylval->real = _mesa_strtof(yytext, NULL);
return FLOATCONSTANT;