> 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:27:00  up 2 days 12:21,  2 users,  load average: 0.53, 0.46, 0.40
This commit is contained in:
tracer-ysyx 2024-01-15 23:27:00 +08:00 committed by xinyangli
parent 0436356a3b
commit 8970a2cac4
2 changed files with 3 additions and 2 deletions

View file

@ -2,6 +2,7 @@
#include <isa.h> #include <isa.h>
#include <addrexp.h> #include <addrexp.h>
static bool success = false; static bool success = false;
void yyerror(word_t *result, const char *err);
%} %}
%option noyywrap %option noyywrap
@ -10,7 +11,7 @@
$[a-zA-Z]{2,3} { $[a-zA-Z]{2,3} {
yylval = isa_reg_str2val(yytext + 1, &success); yylval = isa_reg_str2val(yytext + 1, &success);
if(!success) { if(!success) {
printf("YYTEXT: %s", yytext); yyerror(NULL, "Failed to convert reg to value");
return YYerror; return YYerror;
} }
} }

View file

@ -219,7 +219,7 @@ int main(void) {
s = expr_suite(); s = expr_suite();
sr = srunner_create(s); sr = srunner_create(s);
srunner_run_all(sr, CK_VERBOSE); srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr); number_failed = srunner_ntests_failed(sr);
srunner_free(sr); srunner_free(sr);