From 65757bc3af889e332c97d36088e432cb4d30b5c2 Mon Sep 17 00:00:00 2001 From: erana Date: Tue, 17 Jan 2012 21:10:27 +0900 Subject: [PATCH] schemedoc own parser - 2 --- scsh/schemedoc/schemedoc.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scsh/schemedoc/schemedoc.scm b/scsh/schemedoc/schemedoc.scm index c21a6bd..877dc93 100644 --- a/scsh/schemedoc/schemedoc.scm +++ b/scsh/schemedoc/schemedoc.scm @@ -60,22 +60,21 @@ ;; ;; make a list of chars from filename contents ;; -(define (schemedoc-explode-doc filename) - (define (explode in) +(define (schemedoc-parser-doc filename) + (define (parse in) (let ((c (read-char in))) (if (eof-object? c) c - (append (list c) (explode in))))) + (append (list c) (parse in))))) (define (read-rec in) (call-with-values (lambda () - (explode in) + (parse in) ) (lambda (l) (display l) l))) (let ((in (open-input-file filename))) - (read-rec in) - )) + (read-rec in)))