+ (let* ((eof (gensym))
+ (next (ls-read stream nil eof)))
+ (skip-whitespaces-and-comments stream)
+ (cond
+ ((eq next eof)
+ (discard-char stream #\)))
+ (t
+ (cons next
+ (if (char= (%peek-char stream) #\.)
+ (progn
+ (discard-char stream #\.)
+ (if (terminalp (%peek-char stream))
+ (prog1 (ls-read stream) ; Dotted pair notation
+ (skip-whitespaces-and-comments stream)
+ (let ((ch (%peek-char stream)))
+ (if (or (null ch) (char= #\) ch))
+ (discard-char stream #\))
+ (error "Multiple objects following . in a list"))))
+ (let ((token (concat "." (read-escaped-until stream #'terminalp))))
+ (cons (interpret-token token)
+ (%read-list stream)))))
+ (%read-list stream))))))))))