Signed-off-by: Nikolay Sivov nsivov@codeweavers.com ---
Immediate issue was that constants like 1e1 were not parsed without a suffix.
libs/vkd3d-shader/hlsl.l | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.l b/libs/vkd3d-shader/hlsl.l index e9281ec..60aca79 100644 --- a/libs/vkd3d-shader/hlsl.l +++ b/libs/vkd3d-shader/hlsl.l @@ -188,11 +188,7 @@ row_major {return KW_ROW_MAJOR; } yylval->floatval = atof(yytext); return C_FLOAT; } -[0-9]+.([eE][+-]?[0-9]+)?[h|H|f|F]? { - yylval->floatval = atof(yytext); - return C_FLOAT; - } -[0-9]+([eE][+-]?[0-9]+)?[h|H|f|F] { +[0-9]+(.)?([eE][+-]?[0-9]+)?[h|H|f|F]? { yylval->floatval = atof(yytext); return C_FLOAT; }