diff --git a/nemu/src/monitor/sdb/addrexp.y b/nemu/src/monitor/sdb/addrexp.y index 0041088..3123f8f 100644 --- a/nemu/src/monitor/sdb/addrexp.y +++ b/nemu/src/monitor/sdb/addrexp.y @@ -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; }