diff options
-rw-r--r-- | src/parse.c | 6 | ||||
-rw-r--r-- | tests/dc/errors/34.txt | 117 |
2 files changed, 118 insertions, 5 deletions
diff --git a/src/parse.c b/src/parse.c index bd9e8586..229c2e59 100644 --- a/src/parse.c +++ b/src/parse.c @@ -105,13 +105,9 @@ static void bc_parse_addNum(BcParse *p, const char *string) { BC_SIG_LOCK; -#if BC_ENABLED // Get the right slab. - slabs = p->fidx == BC_PROG_MAIN || p->fidx == BC_PROG_READ || BC_IS_DC ? + slabs = p->fidx == BC_PROG_MAIN || p->fidx == BC_PROG_READ ? &vm.main_const_slab : &vm.other_slabs; -#else // BC_ENABLED - slabs = &vm.main_const_slab; -#endif // BC_ENABLED // Push an empty constant. c = bc_vec_pushEmpty(consts); diff --git a/tests/dc/errors/34.txt b/tests/dc/errors/34.txt new file mode 100644 index 00000000..902a38bc --- /dev/null +++ b/tests/dc/errors/34.txt @@ -0,0 +1,117 @@ +0 lip1-si0l0+2o0sx_9lq+pR 0900pR +_100900pR +_10900p0bpR +1bp0 +.20bpR +100000.0000005bpR +_10bpR +_.1000[l0;0;rpRl01+s0l010>x]dsxx0sx0s0 +1 2+p+p +3+p +4+p +5+p +6+p +7+p +8+p +9+p +16+p +17+p +18+p +19.p +20+p +21+0+p +71+xx0sx0s0 +1 2+p+p +3o +70+p +70+p +70+p +70+p +22+p +20+p +20+p +20+p +20+p +x0+p +20+p +0 lip1-si0{0+2i0l0+200sx0.1009 +40+1+p +4000pR +_10900p0bpR +1bp0 +.20bpR +100000.002+p +20+p +20+p +20+p +20+p +x0+p +2000005bpR +_10bpR +_.10yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy00[l0;0;rpRl01+s0l010>x]dsxx0sx0s0 +1 2+p+p +3+p +4+p +5+p +6+p +7+p +8+p +9+p +10p ++p +11+p +12+p +13+p +14+p +15+p +16+p +17+p +18+p +19+p +20+p +21+0+p +71+xx0sx0s0 +1 2+p+p +3o +70+p +70+p +70+p +70+p +22+p +20+p + +20+p +30+p +30+p +30+p +0b30+p +30+p +30+p +30+p +30+p +30+p +30+p +40"1+p +40+p +40+p +40+p +40+p +40+p +40+p +40+p +40+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +5pR +100000.0070000bpR +^20+pR +_.10100000.0070000bpR +^20+pR +_.1000Kl0;0;rpRl0 |