diff --git a/nemu/src/monitor/sdb/addrexp.y b/nemu/src/monitor/sdb/addrexp.y index 3123f8f..7f9d02d 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 { if($3 == 0) { perror("Devide by 0\n"); YYABORT; }; $$ = $1 / $3;} + | expression '/' expression { if($3 == 0) { perror("Error: Devide by 0 in expression\n"); YYABORT; }; $$ = $1 / $3;} | '-' number { $$ = -$2; } | '(' expression ')' { $$ = $2; }