schemedoc own parser - 3

This commit is contained in:
erana 2012-01-17 21:19:34 +09:00
parent 65757bc3af
commit 70dd35a18c
1 changed files with 14 additions and 1 deletions

View File

@ -56,10 +56,12 @@
((null? e)0) ((null? e)0)
(display (car e) out))) (display (car e) out)))
(display-rec l)))) (display-rec l))))
;;
;; parser :
;; ;;
;; make a list of chars from filename contents ;; make a list of chars from filename contents
;; ;;
(define (schemedoc-parser-doc filename) (define (schemedoc-parser-doc filename)
(define (parse in) (define (parse in)
(let ((c (read-char in))) (let ((c (read-char in)))
@ -78,3 +80,14 @@
(let ((in (open-input-file filename))) (let ((in (open-input-file filename)))
(read-rec in))) (read-rec in)))
;;
;; main program
;;
(define (eoln)(string #\newline))
(define $SCHEMEDOCDIR (getenv "SCHEMEDOCDIR"))
(case $SCHEMEDOCDIR
((#f) (for-each display
'("set your SCHEMEDOCDIR env var to the paths where pods and sods reside." (eoln) "exiting" (eoln))
(exit)
)))