Fix bug with 10 and 41.

This commit is contained in:
Brad Nelson
2024-11-07 19:00:33 -08:00
parent 1316a3144e
commit ffd0226fdb
4 changed files with 5 additions and 9 deletions

View File

@ -67,7 +67,7 @@ create NEXT ' donext @ ' next ! : next -1 nest-depth +! ['] next , , ; immed
;
( Define a recognizer stack. )
create RECSTACK 0 , 10 cells allot
create RECSTACK 0 , bl 2/ ( 16 no numbers yet ) cells allot
: +RECOGNIZER ( xt -- ) 1 RECSTACK +! RECSTACK dup @ cells + ! ;
: -RECOGNIZER ( -- ) -1 RECSTACK +! ;
: GET-RECOGNIZERS ( -- xtn..xt1 n )

View File

@ -12,7 +12,7 @@
\ See the License for the specific language governing permissions and
\ limitations under the License.
: ( 41 parse drop drop ; immediate
: \ 10 parse drop drop ; immediate
: #! 10 parse drop drop ; immediate ( shebang for scripts )
( Now can do comments! )
: ( bl nl + 1- parse drop drop ; immediate ( Now can do comments! )
( bl=32 nl=10 so nl+32-1=41, right paren )
: \ nl parse drop drop ; immediate
: #! nl parse drop drop ; immediate ( shebang for scripts )

View File

@ -162,8 +162,6 @@ e: check-tier1-opcodes
out: 0
out: 1
out: -1
out: 10
out: 41
out: nip
out: rdrop
out: */

View File

@ -16,8 +16,6 @@
X("0", ZERO, PUSH 0) \
X("1", ONE, PUSH 1) \
X("-1", NEGATIVEONE, PUSH -1) \
X("10", TEN, PUSH 10) \
X("41", FOURTYONE, PUSH 41) \
Y(nip, NIP) \
Y(rdrop, --rp) \
XV(forth, "*/", STARSLASH, SSMOD_FUNC; NIP) \