From 6fa38ed966088f706eb00355a8397797f13679f5 Mon Sep 17 00:00:00 2001 From: crc Date: Fri, 12 Nov 2021 23:28:23 +0000 Subject: [PATCH] fix a couple of things in example/alternate-listener.retro FossilOrigin-Name: b3cb321551d24e23a3a1cb34bc708ac183a96cf2767fa8d8c8f51242d9233a5e --- example/alternate-listener.retro | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/example/alternate-listener.retro b/example/alternate-listener.retro index 9c7a161..52987b9 100644 --- a/example/alternate-listener.retro +++ b/example/alternate-listener.retro @@ -31,21 +31,6 @@ and providing a more flexible base to build on. # The Code -The RETRO image has a 512 cell buffer between the kernel and the -high level code. This is used for the Text Input Buffer, or TIB. - - +------------------+ - | kernel | 0-1023 - | input buffer | 1024-1536 - | standard library | 1537+ - | ... | - | system buffers | EOM - ??? - +------------------+ - -~~~ -#1024 'TIB const -~~~ - The listener needs to determine what to treat as the end of the token. I define `end-of-token?` for this. @@ -124,7 +109,7 @@ And with these, I can quickly implement the `new-listener`. ~~~ {{ :guard (-) buffer:end TIB lt? [ TIB buffer:set ] if ; - :c:get (-c) as{ 'liii.... i #1 d }as dup buffer:add ; + :c:get (-c) \liii.... `1 dup buffer:add ; :s:get (-s) [ TIB buffer:set [ guard c:get special-keys check end-of-token? ] until buffer:start s:chop ] buffer:preserve ;