> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux 10:18:42 up 1 day 10:34, 2 users, load average: 0.17, 0.47, 0.52
This commit is contained in:
parent
1cb2e8ebdf
commit
862f8be292
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ expression
|
|||
| expression '+' expression { $$ = $1 + $3; }
|
||||
| expression '-' expression { $$ = $1 - $3; }
|
||||
| expression '*' expression { $$ = $1 * $3; }
|
||||
| expression '/' expression { $$ = $1 / $3; if($3 == 0) perror("Devide by 0\n"); YYABORT; }
|
||||
| expression '/' expression { $$ = $1 / $3; if($3 == 0) { perror("Devide by 0\n"); YYABORT; }}
|
||||
| '-' number { $$ = -$2; }
|
||||
| '(' expression ')' { $$ = $2; }
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ static int cmd_x(char *args) {
|
|||
return 0;
|
||||
|
||||
wrong_usage:
|
||||
printf("Invalid argument for command x: %s\n", args);
|
||||
printf("Invalid argument for command x: %s\n", arg);
|
||||
printf("Usage: x [N: uint] [EXPR: <expr>]\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue