((eq? (peek-byte) 59) (begin (read-line-comment (read-byte))
(eat-whitespace)))
((eq? (peek-byte) 35) (begin (read-byte)
- (if (eq? (peek-byte) 33) (begin (read-byte)
- (read-block-comment (read-byte))
- (eat-whitespace))
- (unread-byte 35))))))
-
- (define (read-block-comment c)
- (if (eq? c 33) (if (eq? (peek-byte) 35) (read-byte)
- (read-block-comment (read-byte)))
- (read-block-comment (read-byte))))
+ (cond ((eq? (peek-byte) 33)
+ (read-byte)
+ (read-block-comment 33 (read-byte))
+ (eat-whitespace))
+ ((eq? (peek-byte) 124)
+ (read-byte)
+ (read-block-comment 124 (read-byte))
+ (eat-whitespace))
+ (#t (unread-byte 35)))
+))))
+
+ (define (read-block-comment s c)
+ (if (eq? c s) (if (eq? (peek-byte) 35) (read-byte)
+ (read-block-comment s (read-byte)))
+ (read-block-comment s (read-byte))))
;; (define (read-hex c)
;; (if (eq? c 10) c
(begin (unread-byte c) (lookup w a))))
((eq? c 35) (cond
((eq? (peek-byte) 33) (begin (read-byte)
- (read-block-comment (read-byte))
+ (read-block-comment 33 (read-byte))
(read-word (read-byte) w a)))
+ ((eq? (peek-byte) 124) (begin (read-byte)
+ (read-block-comment 124 (read-byte))
+ (read-word (read-byte) w a)))
((eq? (peek-byte) 40) (read-byte) (list->vector (read-list a)))
((eq? (peek-byte) 92) (read-byte) (read-character))
((eq? (peek-byte) 120) (read-byte) (read-hex))