[util] Correct the lex priority for int constants

The actual need to specify unsigned int constant is a bit of a pain, but
not being able to do so due to lex priority errors is even more of a
pain.
This commit is contained in:
Bill Currie 2021-02-17 13:29:53 +09:00
parent a94949c009
commit 4bda49d798

View file

@ -120,13 +120,13 @@ STRING \"(\\.|[^"\\])*\"
__auto_type context = yyget_extra (yyscanner);
%}
{INT}+ {
yylval->value = parse_int (yytext, context);
{INT}+[uU] {
yylval->value = parse_uint (yytext, context);
return VALUE;
}
{INT}+[uU] {
yylval->value = parse_uint (yytext, context);
{INT}+ {
yylval->value = parse_int (yytext, context);
return VALUE;
}