hax:%want-strings-p

This commit is contained in:
dlichteblau
2007-10-21 17:07:38 +00:00
parent 76330fb41a
commit 74248e3403
3 changed files with 17 additions and 10 deletions

View File

@ -25,7 +25,6 @@
:rune-is-character)) :rune-is-character))
(unless (or (<= #xD800 x #xDFFF) (unless (or (<= #xD800 x #xDFFF)
(and (< x char-code-limit) (code-char x))) (and (< x char-code-limit) (code-char x)))
(print (code-char x))
(format t " no, reverting to octet strings.~%") (format t " no, reverting to octet strings.~%")
(return :rune-is-integer))) (return :rune-is-integer)))
*features*)) *features*))

View File

@ -9,15 +9,15 @@
;;; Redistribution and use in source and binary forms, with or without ;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are ;;; modification, are permitted provided that the following conditions are
;;; met: ;;; met:
;;; ;;;
;;; 1. Redistributions of source code must retain the above copyright ;;; 1. Redistributions of source code must retain the above copyright
;;; notice, this list of conditions and the following disclaimer. ;;; notice, this list of conditions and the following disclaimer.
;;; ;;;
;;; 2. Redistributions in binary form must reproduce the above copyright ;;; 2. Redistributions in binary form must reproduce the above copyright
;;; notice, this list of conditions and the following disclaimer in the ;;; notice, this list of conditions and the following disclaimer in the
;;; documentation and/or other materials provided with the distribution ;;; documentation and/or other materials provided with the distribution
;;; ;;;
;;; THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED ;;; THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
;;; WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ;;; WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
;;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ;;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@ -34,20 +34,23 @@
(:use :common-lisp) (:use :common-lisp)
(:export #:abstract-handler (:export #:abstract-handler
#:default-handler #:default-handler
#:make-attribute #:make-attribute
#:standard-attribute #:standard-attribute
#:find-attribute #:find-attribute
#:attribute-name #:attribute-name
#:attribute-value #:attribute-value
#:attribute-specified-p #:attribute-specified-p
#:start-document #:start-document
#:start-element #:start-element
#:characters #:characters
#:end-element #:end-element
#:end-document #:end-document
#:comment)) #:comment
#+rune-is-integer
#:%want-strings-p))
(in-package :hax) (in-package :hax)
@ -86,6 +89,11 @@
(defclass abstract-handler () ()) (defclass abstract-handler () ())
(defclass default-handler (abstract-handler) ()) (defclass default-handler (abstract-handler) ())
#+rune-is-integer
(defgeneric %want-strings-p (handler)
(:method ((handler null)) nil)
(:method ((handler abstract-handler)) t))
(defgeneric start-document (handler name public-id system-id) (defgeneric start-document (handler name public-id system-id)
(:method ((handler null) name public-id system-id) (:method ((handler null) name public-id system-id)
(declare (ignore name public-id system-id)) (declare (ignore name public-id system-id))

View File

@ -29,7 +29,7 @@
(defun rod-reader (stream subchar arg) (defun rod-reader (stream subchar arg)
(runes::rod-string (runes::rod-reader stream subchar arg))) (runes::rod-string (runes::rod-reader stream subchar arg)))
(setf runes-system:*utf8-runes-readtable* (setf closure-common-system:*utf8-runes-readtable*
(let ((rt (copy-readtable))) (let ((rt (copy-readtable)))
(set-dispatch-macro-character #\# #\/ 'rune-reader rt) (set-dispatch-macro-character #\# #\/ 'rune-reader rt)
(set-dispatch-macro-character #\# #\" 'rod-reader rt) (set-dispatch-macro-character #\# #\" 'rod-reader rt)