[cxml-cvs] CVS update: cxml/xml/xml-parse.lisp

Update of /project/cxml/cvsroot/cxml/xml In directory common-lisp.net:/tmp/cvs-serv15203/xml Modified Files: xml-parse.lisp Log Message: noch ein paar assertions durch check-rune ersetzt Date: Sun Nov 27 13:43:29 2005 Author: dlichteblau Index: cxml/xml/xml-parse.lisp diff -u cxml/xml/xml-parse.lisp:1.26 cxml/xml/xml-parse.lisp:1.27 --- cxml/xml/xml-parse.lisp:1.26 Sun Nov 27 13:39:36 2005 +++ cxml/xml/xml-parse.lisp Sun Nov 27 13:43:29 2005 @@ -1219,10 +1219,17 @@ (unread-rune c input) (values :CDATA (read-cdata input))))))))))) +(definline check-rune (input actual expected) + (declare (ignore input)) + (unless (eql actual expected) + (wf-error "expected #/~A but found #/~A" + (rune-char expected) + (rune-char actual)))) + (defun read-pe-reference (zinput) (let* ((input (car (zstream-input-stack zinput))) (nam (read-name-token input))) - (assert (rune= #/\; (read-rune input))) + (check-rune input #/\; (read-rune input)) (cond (*expand-pe-p* ;; no external entities here! (let ((i2 (entity->xstream nam :parameter))) @@ -1346,7 +1353,7 @@ (values kind (cons name atts))) ((eq (peek-rune input) #//) (consume-rune input) - (assert (rune= #/> (read-rune input))) + (check-rune input #/> (read-rune input)) (values :ztag (cons name atts))) (t (wf-error "syntax error in read-tag-2.")) ))) @@ -1427,7 +1434,7 @@ (wf-error "Expecting name after &.")) (let ((name (read-name-token input))) (setf c (read-rune input)) - (assert (rune= c #/\;)) + (check-rune input c #/\;) (ecase mode (:ATT (recurse-on-entity @@ -1449,7 +1456,7 @@ (wf-error "Expecting name after %.")) (let ((name (read-name-token input))) (setf c (read-rune input)) - (assert (rune= c #/\;)) + (check-rune input c #/\;) (cond (*expand-pe-p* (recurse-on-entity zinput name :parameter @@ -1473,16 +1480,10 @@ (declare (dynamic-extent #'muffle)) (muffle input (or delim (let ((delim (read-rune input))) - (assert (member delim '(#/\" #/\'))) + (unless (member delim '(#/\" #/\')) + (wf-error "invalid attribute delimiter")) delim)))))) -(defun check-rune (input actual expected) - (declare (ignore input)) - (unless (eql actual expected) - (wf-error "expected #/~A but found #/~A" - (rune-char expected) - (rune-char actual)))) - (defun read-character-reference (input) ;; xxx eof handling ;; The #/& is already read @@ -3217,7 +3218,7 @@ (wf-error "Expecting name after &.")) (let ((name (read-name-token input))) (setf c (read-rune input)) - (assert (rune= c #/\;)) + (check-rune input c #/\;) (recurse-on-entity zinput name :general (lambda (zinput)
participants (1)
-
dlichteblau@common-lisp.net