diff --git a/src/stack.asm b/src/stack.asm index a68f54f..7677384 100644 --- a/src/stack.asm +++ b/src/stack.asm @@ -1,4 +1,4 @@ -(37, 6, 0, 0, 1, 1, 1, 1, 0, 0, 3, 2, 1, 3, 0, 0, 0, 1, 2, 1, 1, 0, 0, 1, 1, 0, 2, 2, 1, 1, 0, 2, 2, 2, 3, 1, 3, 1) +(37, 6, 0, 0, 0, 1, 1, 1, 0, 0, 3, 2, 1, 3, 0, 0, 0, 1, 2, 1, 1, 0, 0, 1, 1, 0, 2, 2, 1, 1, 0, 2, 2, 2, 3, 1, 3, 1) ADD(0, 0, r0) // r0 current state in pushdown automaton ADD(2, 0, r1) // r1 cursor position in input word, (i2 first symbol of input word, i1 length of input word) ADD(12, 0, r11) // r11 address of stack top @@ -64,6 +64,7 @@ SUB(r9, 1, r9) JUMP(-4) +JL(r10, r1, 2) // check if input word hasn't been read entirely JE(r0, 1, 3) // check if final state ADD(0, 1, o1) // reject = 1 JUMP(2)