The Lambda Lab
/
projects
/
scheme.forth.jl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
26a9711
)
Almost done with characters.
author
Tim Vaughan
<tgvaughan@gmail.com>
Tue, 5 Jul 2016 06:40:49 +0000
(08:40 +0200)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Tue, 5 Jul 2016 06:40:49 +0000
(08:40 +0200)
scheme.4th
patch
|
blob
|
history
diff --git
a/scheme.4th
b/scheme.4th
index
ea02cd5
..
a4e2d07
100644
(file)
--- a/
scheme.4th
+++ b/
scheme.4th
@@
-134,11
+134,13
@@
parse-idx-stack parse-idx-sp !
;
: str-equiv? ( str -- bool )
;
: str-equiv? ( str -- bool )
+
push-parse-idx
push-parse-idx
- true
+ true
-rot
swap dup rot + swap
swap dup rot + swap
+
do
i @ nextchar <> if
drop false
do
i @ nextchar <> if
drop false
@@
-148,7
+150,7
@@
parse-idx-stack parse-idx-sp !
inc-parse-idx
loop
inc-parse-idx
loop
- delim?
<>
if drop false then
+ delim?
false =
if drop false then
pop-parse-idx
;
pop-parse-idx
;
@@
-252,6
+254,7
@@
parse-idx-stack parse-idx-sp !
: self-evaluating? ( obj -- obj bool )
number-type istype? if true exit then
boolean-type istype? if true exit then
: self-evaluating? ( obj -- obj bool )
number-type istype? if true exit then
boolean-type istype? if true exit then
+ character-type istype? if true exit then
false ;
: eval
false ;
: eval
@@
-281,7
+284,11
@@
parse-idx-stack parse-idx-sp !
9 of ." #\tab" endof
bl of ." #\space" endof
'\n' of ." #\newline" endof
9 of ." #\tab" endof
bl of ." #\space" endof
'\n' of ." #\newline" endof
+
+ ." #\" emit
endcase
endcase
+
+ trace
;
: print ( obj -- )
;
: print ( obj -- )