freedreno/afuc: Make 0 a valid number

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6368>
This commit is contained in:
Connor Abbott
2020-08-18 14:36:37 +02:00
committed by Marge Bot
parent 66dd248593
commit f0b87186df
+1 -1
View File
@@ -40,7 +40,7 @@ extern YYSTYPE yylval;
"\n" yylineno++;
[ \t] ; /* ignore whitespace */
";"[^\n]*"\n" yylineno++; /* ignore comments */
[1-9][0-9]* yylval.num = strtoul(yytext, NULL, 0); return T_INT;
0|[1-9][0-9]* yylval.num = strtoul(yytext, NULL, 0); return T_INT;
"0x"[0-9a-fA-F]* yylval.num = strtoul(yytext, NULL, 0); return T_HEX;
"$"[0-9a-fA-F][0-9a-fA-F] yylval.num = parse_reg(yytext); return T_REGISTER;