From: Connor Abbott Date: Tue, 18 Aug 2020 12:36:37 +0000 (+0200) Subject: freedreno/afuc: Make 0 a valid number X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f0b87186df201c776c140a3d543b52cb5ca40c2e;p=mesa.git freedreno/afuc: Make 0 a valid number Part-of: --- diff --git a/src/freedreno/afuc/lexer.l b/src/freedreno/afuc/lexer.l index 8c3113d1c16..830ba83db70 100644 --- a/src/freedreno/afuc/lexer.l +++ b/src/freedreno/afuc/lexer.l @@ -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;