aboutsummaryrefslogtreecommitdiff
path: root/src/lisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-08-12 00:43:54 +0000
committerdos-reis <gdr@axiomatics.org>2011-08-12 00:43:54 +0000
commite1ae4b73abdbbfe03c47f728de05e0aabbedb291 (patch)
tree03d21fc43a94efa0e75f429d465f4a242cd6e844 /src/lisp
parenta1de530b8c7a40177f1e8c0ebf84d8e9359ef503 (diff)
downloadopen-axiom-e1ae4b73abdbbfe03c47f728de05e0aabbedb291.tar.gz
* interp/define.boot (NRTgetLookupFunction): Handle the case where
the base domain is a parameter. * interp/g-util.boot (formalVarNumber): New. * lisp/core.lisp.in (readIntegerIfCan): Likewise.
Diffstat (limited to 'src/lisp')
-rw-r--r--src/lisp/core.lisp.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in
index 46d5306f..3ecb6c48 100644
--- a/src/lisp/core.lisp.in
+++ b/src/lisp/core.lisp.in
@@ -101,6 +101,7 @@
"prettyPrint"
"readLine"
"readExpr"
+ "readIntegerIfCan"
;; compiler data structures
"%Mode"
@@ -527,6 +528,11 @@
(defmacro |readExpr| (f)
`(read ,f nil |%nothing|))
+(defun |readIntegerIfCan| (s)
+ (let ((r (multiple-value-call #'cons (parse-integer s :junk-allowed t))))
+ (cond ((eql (cdr r) (length s)) (car r))
+ (t nil))))
+
;; Pretty-print a lisp form on a given output stream.
(defun |prettyPrint| (x &optional (s |$OutputStream|))
(let ((*print-pretty* t)