From f0b87186df201c776c140a3d543b52cb5ca40c2e Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 18 Aug 2020 14:36:37 +0200 Subject: [PATCH] freedreno/afuc: Make 0 a valid number Part-of: --- src/freedreno/afuc/lexer.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2