[Advanced-readtable-cvs] r15 -

rklochkov at common-lisp.net rklochkov at common-lisp.net
Sat Jan 26 19:59:30 UTC 2013


Author: rklochkov
Date: Sat Jan 26 11:59:30 2013
New Revision: 15

Log:
Refactored. Beta release. Now strong depends on named-readtables

Modified:
   advanced-readtable.asd
   package.lisp
   src.lisp

Modified: advanced-readtable.asd
==============================================================================
--- advanced-readtable.asd	Fri Jan 25 06:09:35 2013	(r14)
+++ advanced-readtable.asd	Sat Jan 26 11:59:30 2013	(r15)
@@ -1,9 +1,13 @@
 (asdf:defsystem #:advanced-readtable
   :description "Advanced customizable readtable"
   :author "Roman Klochkov <kalimehtar at mail.ru>"
-  :version "0.2.0"
+  :version "0.8.0"
   :license "BSD"
+  :depends-on (#:named-readtables)
   :serial t
   :components ((:file "package")
-               (:file "src")))
+               (:file "finders")
+               (:file "api")
+               (:file "readtable")
+               (:file "hierarchy")))
   

Modified: package.lisp
==============================================================================
--- package.lisp	Fri Jan 25 06:09:35 2013	(r14)
+++ package.lisp	Sat Jan 26 11:59:30 2013	(r15)
@@ -1,5 +1,6 @@
-(cl:|DEFPACKAGE| #:advanced-readtable
-  (:use #:cl)
+(defpackage #:advanced-readtable
+  (:use #:cl #:named-readtables)
+  (:import-from #:named-readtables #:define-api #:=>)
   (:shadow
    #:find-package
    #:find-symbol

Modified: src.lisp
==============================================================================
--- src.lisp	Fri Jan 25 06:09:35 2013	(r14)
+++ src.lisp	Sat Jan 26 11:59:30 2013	(r15)
@@ -494,27 +494,24 @@
   (defun chars-to-process ()
     (let ((*readtable* (copy-readtable nil)))
       (nconc
-       (loop :for i :from 1 :to 127
+       (loop :for i :from 0 :to 127
           :for c = (code-char i)
           :when (to-process c) :collect c)
        (loop :for c :across +additional-chars+
           :when (to-process c) :collect c))))
 
   (defun make-named-rt ()
-    `(,(cl:find-symbol "DEFREADTABLE" "NAMED-READTABLES") :advanced
+    `(defreadtable :advanced
        (:merge :standard)
-       ,@(loop :for c :in (chars-to-process)
-            :collect `(:macro-char ,c #'read-token-with-colons t))
+       ,@(mapcar (lambda (c) (list :macro-char c #'read-token-with-colons t))
+                 (chars-to-process))
        (:macro-char #\( #'open-paren-reader nil))))
 
 (macrolet ((def-advanced-readtable ()
              (make-named-rt)))
-  (when (cl:find-package "NAMED-READTABLES")
-    (def-advanced-readtable)))
+  (def-advanced-readtable))
 
 (defun activate ()
-  (dolist (c (chars-to-process))
-    (set-macro-character c #'read-token-with-colons t))
-  (set-macro-character #\( #'open-paren-reader t))
+  (in-readtable :advanced))
 
 (defun ! () (activate))




More information about the Advanced-readtable-cvs mailing list