aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_lexer.ll
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/glsl_lexer.ll')
-rw-r--r--mesalib/src/glsl/glsl_lexer.ll23
1 files changed, 5 insertions, 18 deletions
diff --git a/mesalib/src/glsl/glsl_lexer.ll b/mesalib/src/glsl/glsl_lexer.ll
index e66a93591..57c46be84 100644
--- a/mesalib/src/glsl/glsl_lexer.ll
+++ b/mesalib/src/glsl/glsl_lexer.ll
@@ -23,7 +23,7 @@
*/
#include <ctype.h>
#include <limits.h>
-#include "strtod.h"
+#include "util/strtod.h"
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_parser.h"
@@ -450,24 +450,11 @@ layout {
return LITERAL_INTEGER(8);
}
-[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = glsl_strtof(yytext, NULL);
- return FLOATCONSTANT;
- }
-\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = glsl_strtof(yytext, NULL);
- return FLOATCONSTANT;
- }
-[0-9]+\.([eE][+-]?[0-9]+)?[fF]? {
- yylval->real = glsl_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 = glsl_strtof(yytext, NULL);
- return FLOATCONSTANT;
- }
-[0-9]+[fF] {
- yylval->real = glsl_strtof(yytext, NULL);
+ yylval->real = _mesa_strtof(yytext, NULL);
return FLOATCONSTANT;
}