6 include term-colours.4th
10 create car memsize allot
11 create cdr memsize allot
12 create types memsize allot
14 0 constant symbol-type
23 create here 1+ , allot ;
35 2dup = abort" Stack underflow."
38 -rot swap ( v sp' s0 )
47 : inc-parse-idx parse-idx +! ;
48 : dec-parse-idx parse-idx -! ;
50 : ?charavailable ( -- bool )
51 parse-str @ @ parse-idx @ >
54 : nextchar ( -- char )
56 parse-str @ 1+ parse-idx @ + @
62 : ?whitespace ( -- bool )
69 nextchar [char] ( = or
70 nextchar [char] ) = or
87 nextchar [char] # <> if exit then
91 nextchar dup [char] t = swap [char] f = or
111 nextchar [char] ( = if
116 nextchar [char] ) = if
126 \ Parse a counted string into a scheme expression
127 : parseexp ( straddr n -- exp )
138 create repl-buffer 161 allot
141 repl-buffer parse-str !
146 bold fg green ." => " reset-term
148 repl-buffer 1+ 160 expect cr