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:
05e51dd
)
Character parsing works.
author
Tim Vaughan
<tgvaughan@gmail.com>
Tue, 5 Jul 2016 21:24:42 +0000
(23:24 +0200)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Tue, 5 Jul 2016 21:24:42 +0000
(23:24 +0200)
scheme.4th
patch
|
blob
|
history
diff --git
a/scheme.4th
b/scheme.4th
index
a4e2d07
..
c4d5d4c
100644
(file)
--- a/
scheme.4th
+++ b/
scheme.4th
@@
-1,5
+1,3
@@
-\ Scheme interpreter
-
vocabulary scheme
scheme definitions
vocabulary scheme
scheme definitions
@@
-165,9
+163,9
@@
parse-idx-stack parse-idx-sp !
inc-parse-idx
inc-parse-idx
- S" newline" str-equiv? if true exit then
- S" space" str-equiv? if true exit then
- S" tab" str-equiv? if true exit then
+ S" newline" str-equiv? if
pop-parse-idx
true exit then
+ S" space" str-equiv? if
pop-parse-idx
true exit then
+ S" tab" str-equiv? if
pop-parse-idx
true exit then
charavailable? false = if pop-parse-idx false exit then
charavailable? false = if pop-parse-idx false exit then
@@
-209,9
+207,9
@@
parse-idx-stack parse-idx-sp !
inc-parse-idx
inc-parse-idx
inc-parse-idx
inc-parse-idx
- S" newline" str-equiv? if '\n' character-type exit then
- S" space" str-equiv? if bl character-type exit then
- S" tab" str-equiv? if 9 character-type exit then
+ S" newline" str-equiv? if
7 parse-idx +!
'\n' character-type exit then
+ S" space" str-equiv? if
5 parse-idx +!
bl character-type exit then
+ S" tab" str-equiv? if
3 parse-idx +!
9 character-type exit then
nextchar character-type
nextchar character-type
@@
-285,10
+283,8
@@
parse-idx-stack parse-idx-sp !
bl of ." #\space" endof
'\n' of ." #\newline" endof
bl of ." #\space" endof
'\n' of ." #\newline" endof
- ." #\" emit
+
dup
." #\" emit
endcase
endcase
-
- trace
;
: print ( obj -- )
;
: print ( obj -- )