wisp
 
(Arne Babenhauserheide)
2014-08-19: can write scheme

can write scheme

diff --git a/wisp-scheme.w b/wisp-scheme.w
--- a/wisp-scheme.w
+++ b/wisp-scheme.w
@@ -461,15 +461,21 @@ define : wisp-scheme-read-string str
          call-with-input-string str wisp-scheme-read-all
 
 
-; display
-;   wisp-scheme-read-string  "foo ; bar\n  ; nop \n\n; nup\n; nup \n  \n\n\nfoo : moo \"\n\" \n___ . goo . hoo"
-; newline 
+write
+  wisp-scheme-read-string  "foo ; bar\n  ; nop \n\n; nup\n; nup \n  \n\n\nfoo : moo \"\n\" \n___ . goo . hoo"
+newline 
 ; display
 ;   wisp-scheme-read-string  "  foo ; bar\n  ; nop \n\n; nup\n; nup \n  \n\n\nfoo : moo"
 ; newline 
-; display : wisp-scheme-read-file-chunk "wisp-scheme.w"
+; write : wisp-scheme-read-file-chunk "wisp-scheme.w"
 ; newline 
 ; run all chunks in wisp-guile.w as parsed by wisp-scheme.w. Give wisp-guile.w to parse as argument.
-map primitive-eval : wisp-scheme-read-file "wisp-guile.w"
+; map primitive-eval : wisp-scheme-read-file "wisp-guile.w"
+call-with-output-file "wisp-guile.scm"
+  lambda : port
+    map 
+       lambda : chunk
+                write chunk port
+       wisp-scheme-read-file "wisp-guile.w"
 ; pipe the output into 1, then compare it with the output of wisp.scm. If it is equal, this parser works!
 ; guile wisp.scm wisp-scheme.w > wisp-scheme.scm; guile wisp-scheme.scm wisp-guile.w > 1; guile wisp.scm wisp-guile.w > 2; diff 1 2