schemedoc own parser - 2
This commit is contained in:
parent
3589a9b9d2
commit
65757bc3af
|
@ -60,22 +60,21 @@
|
||||||
;;
|
;;
|
||||||
;; make a list of chars from filename contents
|
;; make a list of chars from filename contents
|
||||||
;;
|
;;
|
||||||
(define (schemedoc-explode-doc filename)
|
(define (schemedoc-parser-doc filename)
|
||||||
(define (explode in)
|
(define (parse in)
|
||||||
(let ((c (read-char in)))
|
(let ((c (read-char in)))
|
||||||
(if (eof-object? c)
|
(if (eof-object? c)
|
||||||
c
|
c
|
||||||
(append (list c) (explode in)))))
|
(append (list c) (parse in)))))
|
||||||
|
|
||||||
(define (read-rec in)
|
(define (read-rec in)
|
||||||
(call-with-values
|
(call-with-values
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(explode in)
|
(parse in)
|
||||||
)
|
)
|
||||||
(lambda (l)
|
(lambda (l)
|
||||||
(display l)
|
(display l)
|
||||||
l)))
|
l)))
|
||||||
|
|
||||||
(let ((in (open-input-file filename)))
|
(let ((in (open-input-file filename)))
|
||||||
(read-rec in)
|
(read-rec in)))
|
||||||
))
|
|
||||||
|
|
Loading…
Reference in New Issue