> 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:21:30 up 1 day 10:37, 2 users, load average: 0.29, 0.40, 0.48
This commit is contained in:
parent
ea30467cd6
commit
436fd0a6cd
1 changed files with 1 additions and 1 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 { if($3 == 0) { perror("Devide by 0\n"); YYABORT; }; $$ = $1 / $3;}
|
||||
| '-' number { $$ = -$2; }
|
||||
| '(' expression ')' { $$ = $2; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue