diff --git a/src/parsetab/tabs.dbm.bak b/src/parsetab/tabs.dbm.bak index 7ba2f637e..3f5d4f516 100644 --- a/src/parsetab/tabs.dbm.bak +++ b/src/parsetab/tabs.dbm.bak @@ -1,4 +1,4 @@ 'zxbpp', (0, 76970) -'asmparse', (77312, 269087) -'zxnext_asmparse', (346624, 299111) -'zxbparser', (646144, 708977) +'asmparse', (77312, 270618) +'zxnext_asmparse', (348160, 300642) +'zxbparser', (649216, 708977) diff --git a/src/parsetab/tabs.dbm.dat b/src/parsetab/tabs.dbm.dat index 0929abd1e..37c91f202 100644 Binary files a/src/parsetab/tabs.dbm.dat and b/src/parsetab/tabs.dbm.dat differ diff --git a/src/parsetab/tabs.dbm.dir b/src/parsetab/tabs.dbm.dir index 7ba2f637e..3f5d4f516 100644 --- a/src/parsetab/tabs.dbm.dir +++ b/src/parsetab/tabs.dbm.dir @@ -1,4 +1,4 @@ 'zxbpp', (0, 76970) -'asmparse', (77312, 269087) -'zxnext_asmparse', (346624, 299111) -'zxbparser', (646144, 708977) +'asmparse', (77312, 270618) +'zxnext_asmparse', (348160, 300642) +'zxbparser', (649216, 708977) diff --git a/src/zxbasm/asmparse.py b/src/zxbasm/asmparse.py index e3da365bc..ea23a3989 100755 --- a/src/zxbasm/asmparse.py +++ b/src/zxbasm/asmparse.py @@ -900,6 +900,8 @@ def p_mem_indir(p): def p_expr_uminus(p): """expr : MINUS expr %prec UMINUS | PLUS expr %prec UMINUS + | MINUS pexpr %prec UMINUS + | PLUS pexpr %prec UMINUS """ p[0] = Expr.makenode(Container(p[1], p.lineno(1)), p[2]) diff --git a/tests/functional/neg_par.asm b/tests/functional/neg_par.asm new file mode 100644 index 000000000..d04b2fe70 --- /dev/null +++ b/tests/functional/neg_par.asm @@ -0,0 +1,4 @@ +ld a, -(5) +ld a, 0-(5) +ld a, +(5) +ld a, 0+(5) diff --git a/tests/functional/neg_par.bin b/tests/functional/neg_par.bin new file mode 100644 index 000000000..43ce191b3 --- /dev/null +++ b/tests/functional/neg_par.bin @@ -0,0 +1 @@ +>û>û>> \ No newline at end of file