diff --git a/nemu/src/monitor/sdb/addrexp.y b/nemu/src/monitor/sdb/addrexp.y index 82407e2..2b268ac 100644 --- a/nemu/src/monitor/sdb/addrexp.y +++ b/nemu/src/monitor/sdb/addrexp.y @@ -26,7 +26,7 @@ expression | expression '-' expression { $$ = $1 - $3; } | expression '*' expression { $$ = $1 * $3; } | expression '/' expression { $$ = $1 / $3; if($3 == 0) perror("Devide by 0\n");} - // | '-' number { $$ = -$2; } + | '-' number { $$ = -$2; } | '(' expression ')' { $$ = $2; } number