diff --git a/nemu/src/monitor/sdb/addrexp.y b/nemu/src/monitor/sdb/addrexp.y index f83733d..815c7b5 100644 --- a/nemu/src/monitor/sdb/addrexp.y +++ b/nemu/src/monitor/sdb/addrexp.y @@ -16,6 +16,7 @@ %token NUMBER HEX_NUMBER %token REGISTER +%locations %start input %define api.value.type { word_t } %parse-param { uint32_t *result } diff --git a/nemu/tests/expr_test.c b/nemu/tests/expr_test.c index 59ed3d3..038294a 100644 --- a/nemu/tests/expr_test.c +++ b/nemu/tests/expr_test.c @@ -176,6 +176,7 @@ START_TEST(test_expr_plain_register) { fputs(buf, stderr); gpr(i) = i; } + yy_scan_string(buf); uint32_t value; ck_assert(!yyparse(&value));