compile #+ and #- - gcl.git - GNU Common Lisp

index : gcl.git
GNU Common Lisp
summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamm Maguire <camm@debian.org>2014年09月18日 09:59:31 -0400
committerCamm Maguire <camm@debian.org>2014年09月18日 09:59:31 -0400
commit6affe0e29728436e6b64f3748f36ba2773fe11e9 (patch)
tree423480e9a9c6da1a78a7b7708b826e37d6807a42
parentb498d7148e7cc57ec32f95ff02536b9990ca06a6 (diff)
downloadgcl-6affe0e29728436e6b64f3748f36ba2773fe11e9.tar.gz
compile #+ and #-
Diffstat
-rwxr-xr-xgcl/lsp/gcl_autoload.lsp 40
-rwxr-xr-xgcl/lsp/gcl_module.lsp 39
2 files changed, 39 insertions, 40 deletions
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))
+
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月06日 21:09:30 +0000

AltStyle によって変換されたページ (->オリジナル) /