> 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:
parent
0436356a3b
commit
8970a2cac4
2 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
#include <isa.h>
|
||||
#include <addrexp.h>
|
||||
static bool success = false;
|
||||
void yyerror(word_t *result, const char *err);
|
||||
%}
|
||||
%option noyywrap
|
||||
|
||||
|
@ -10,7 +11,7 @@
|
|||
$[a-zA-Z]{2,3} {
|
||||
yylval = isa_reg_str2val(yytext + 1, &success);
|
||||
if(!success) {
|
||||
printf("YYTEXT: %s", yytext);
|
||||
yyerror(NULL, "Failed to convert reg to value");
|
||||
return YYerror;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ int main(void) {
|
|||
s = expr_suite();
|
||||
sr = srunner_create(s);
|
||||
|
||||
srunner_run_all(sr, CK_VERBOSE);
|
||||
srunner_run_all(sr, CK_NORMAL);
|
||||
number_failed = srunner_ntests_failed(sr);
|
||||
srunner_free(sr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue