projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66dd248
)
freedreno/afuc: Make 0 a valid number
author
Connor Abbott
<cwabbott0@gmail.com>
Tue, 18 Aug 2020 12:36:37 +0000
(14:36 +0200)
committer
Marge Bot
<eric+marge@anholt.net>
Tue, 18 Aug 2020 16:17:31 +0000
(16:17 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6368>
src/freedreno/afuc/lexer.l
patch
|
blob
|
history
diff --git
a/src/freedreno/afuc/lexer.l
b/src/freedreno/afuc/lexer.l
index 8c3113d1c16f6f4e569f5b55ba89c98c734faaac..830ba83db706b15ce408b44809bd58579340e23e 100644
(file)
--- 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;