> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.1.71 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jan  5 14:18:41 UTC 2024 x86_64 GNU/Linux
 23:31:50  up 2 days 12:26,  2 users,  load average: 0.42, 0.34, 0.35
This commit is contained in:
tracer-ysyx 2024-01-15 23:31:50 +08:00 committed by xinyangli
parent 8970a2cac4
commit 800cd64f98

View file

@ -8,6 +8,7 @@
%%
0[xX][0-9a-fA-F]+ { yylval = strtoul(yytext, NULL, 16); return HEX_NUMBER; }
$[a-zA-Z]{2,3} {
yylval = isa_reg_str2val(yytext + 1, &success);
if(!success) {
@ -15,7 +16,6 @@ $[a-zA-Z]{2,3} {
return YYerror;
}
}
0[xX][0-9a-fA-F]+ { yylval = strtoul(yytext, NULL, 16); return HEX_NUMBER; }
[0-9]+ { yylval = strtoul(yytext, NULL, 10); return NUMBER; }
[+\-*/()] { return *yytext; }
[ \t] { }