freedreno/afuc: Make 0 a valid number
[mesa.git] / src / freedreno / afuc / lexer.l
index 8c3113d1c16f6f4e569f5b55ba89c98c734faaac..830ba83db706b15ce408b44809bd58579340e23e 100644 (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;