author | Camm Maguire <camm@debian.org> | 2014年09月18日 09:59:31 -0400 |
---|---|---|
committer | Camm Maguire <camm@debian.org> | 2014年09月18日 09:59:31 -0400 |
commit | 6affe0e29728436e6b64f3748f36ba2773fe11e9 (patch) | |
tree | 423480e9a9c6da1a78a7b7708b826e37d6807a42 | |
parent | b498d7148e7cc57ec32f95ff02536b9990ca06a6 (diff) | |
download | gcl-6affe0e29728436e6b64f3748f36ba2773fe11e9.tar.gz |
-rwxr-xr-x | gcl/lsp/gcl_autoload.lsp | 40 | ||||
-rwxr-xr-x | gcl/lsp/gcl_module.lsp | 39 |
diff --git a/gcl/lsp/gcl_autoload.lsp b/gcl/lsp/gcl_autoload.lsp index 8c604b09b..a604ac106 100755 --- a/gcl/lsp/gcl_autoload.lsp +++ b/gcl/lsp/gcl_autoload.lsp @@ -26,46 +26,6 @@ ;(defvar *features*) -(defun eval-feature (x) - (cond ((atom x) - (member x *features* - :test #'(lambda (a b) - (cond ((symbolp a) - (and (symbolp b) - (string-equal (symbol-name a) - (symbol-name b)))) - (t (eql a b)))))) - ((eq (car x) 'and) - (dolist (x (cdr x) t) (unless (eval-feature x) (return nil)))) - ((eq (car x) 'or) - (dolist (x (cdr x) nil) (when (eval-feature x) (return t)))) - ((eq (car x) 'not) - (not (eval-feature (cadr x)))) - (t (error "~S is not a feature expression." x)))) - -;;; Revised by Marc Rinfret. -(defun sharp-+-reader (stream subchar arg) - (if (eval-feature (let ((*read-suppress* nil) (*read-base* 10.)) - (read stream t nil t))) - (values (read stream t nil t)) - (let ((*read-suppress* t)) (read stream t nil t) (values)))) - -(set-dispatch-macro-character #\# #\+ 'sharp-+-reader) -(set-dispatch-macro-character #\# #\+ 'sharp-+-reader - (si::standard-readtable)) - -(defun sharp---reader (stream subchar arg) - (if (eval-feature (let ((*read-suppress* nil) (*read-base* 10.)) - (read stream t nil t))) - (let ((*read-suppress* t)) (read stream t nil t) (values)) - (values (read stream t nil t)))) - -(set-dispatch-macro-character #\# #\- 'sharp---reader) -(set-dispatch-macro-character #\# #\- 'sharp---reader - (si::standard-readtable)) - - - (defun lisp-implementation-type () "GNU Common Lisp (GCL)") (defun machine-type () #+sun "SUN" diff --git a/gcl/lsp/gcl_module.lsp b/gcl/lsp/gcl_module.lsp index 58c461a8a..63d122a93 100755 --- a/gcl/lsp/gcl_module.lsp +++ b/gcl/lsp/gcl_module.lsp @@ -82,3 +82,42 @@ nil))))) +(defun eval-feature (x) + (cond ((atom x) + (member x *features* + :test #'(lambda (a b) + (cond ((symbolp a) + (and (symbolp b) + (string-equal (symbol-name a) + (symbol-name b)))) + (t (eql a b)))))) + ((eq (car x) 'and) + (dolist (x (cdr x) t) (unless (eval-feature x) (return nil)))) + ((eq (car x) 'or) + (dolist (x (cdr x) nil) (when (eval-feature x) (return t)))) + ((eq (car x) 'not) + (not (eval-feature (cadr x)))) + (t (error "~S is not a feature expression." x)))) + +(defun sharp-+-reader (stream subchar arg) + (declare (ignore subchar arg)) + (if (eval-feature (let ((*read-suppress* nil) (*read-base* 10.)) + (read stream t nil t))) + (values (read stream t nil t)) + (let ((*read-suppress* t)) (read stream t nil t) (values)))) + +(set-dispatch-macro-character #\# #\+ 'sharp-+-reader) +(set-dispatch-macro-character #\# #\+ 'sharp-+-reader + (si::standard-readtable)) + +(defun sharp---reader (stream subchar arg) + (declare (ignore subchar arg)) + (if (eval-feature (let ((*read-suppress* nil) (*read-base* 10.)) + (read stream t nil t))) + (let ((*read-suppress* t)) (read stream t nil t) (values)) + (values (read stream t nil t)))) + +(set-dispatch-macro-character #\# #\- 'sharp---reader) +(set-dispatch-macro-character #\# #\- 'sharp---reader + (si::standard-readtable)) + |