From 7143bafa06d1de63cb839fbe95d39913e5ed3445 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Tue, 4 Jun 2013 20:46:18 +0100 Subject: [PATCH] #J supports multiple descriptors --- src/read.lisp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/read.lisp b/src/read.lisp index ceec883..e8ca5eb 100644 --- a/src/read.lisp +++ b/src/read.lisp @@ -250,7 +250,15 @@ (#\J (unless (char= (%peek-char stream) #\:) (error "FFI descriptor must start with a semicolon.")) - `(oget *root* ,(subseq (read-until stream #'terminalp) 1))) + (let ((descriptor (subseq (read-until stream #'terminalp) 1)) + (subdescriptors nil)) + (do* ((start 0 (1+ end)) + (end (position #\: (subseq descriptor start)) + (position #\: (subseq descriptor start)))) + ((null end) + (push (subseq descriptor start) subdescriptors) + `(oget *root* ,@(reverse subdescriptors))) + (push (subseq descriptor start end) subdescriptors)))) (otherwise (cond ((and ch (digit-char-p ch)) -- 1.7.10.4