Commit a5203e1a authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dcompiler: Don't take the sign as part of the numeric token.

parent a7956c4c
...@@ -184,15 +184,15 @@ row_major {return KW_ROW_MAJOR; } ...@@ -184,15 +184,15 @@ row_major {return KW_ROW_MAJOR; }
return NEW_IDENTIFIER; return NEW_IDENTIFIER;
} }
[+-]?[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[h|H|f|F]? { [0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[h|H|f|F]? {
hlsl_lval.floatval = atof(yytext); hlsl_lval.floatval = atof(yytext);
return C_FLOAT; return C_FLOAT;
} }
[+-]?[0-9]+\.([eE][+-]?[0-9]+)?[h|H|f|F]? { [0-9]+\.([eE][+-]?[0-9]+)?[h|H|f|F]? {
hlsl_lval.floatval = atof(yytext); hlsl_lval.floatval = atof(yytext);
return C_FLOAT; return C_FLOAT;
} }
[+-]?[0-9]+([eE][+-]?[0-9]+)?[h|H|f|F] { [0-9]+([eE][+-]?[0-9]+)?[h|H|f|F] {
hlsl_lval.floatval = atof(yytext); hlsl_lval.floatval = atof(yytext);
return C_FLOAT; return C_FLOAT;
} }
...@@ -204,7 +204,7 @@ row_major {return KW_ROW_MAJOR; } ...@@ -204,7 +204,7 @@ row_major {return KW_ROW_MAJOR; }
sscanf(yytext, "0%o", &hlsl_lval.intval); sscanf(yytext, "0%o", &hlsl_lval.intval);
return C_INTEGER; return C_INTEGER;
} }
\-?[0-9]+ { [0-9]+ {
hlsl_lval.intval = (atoi(yytext)); hlsl_lval.intval = (atoi(yytext));
return C_INTEGER; return C_INTEGER;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment