diff --git a/collects/tests/honu/xml.rkt b/collects/tests/honu/xml.rkt index 95cafb9df3..12d01d11dd 100644 --- a/collects/tests/honu/xml.rkt +++ b/collects/tests/honu/xml.rkt @@ -2,15 +2,14 @@ (require honu/core/api racket/match - (only-in honu [/ honu-/]) + (only-in honu [/ honu-/] + [< honu-<] + [> honu->]) (for-syntax syntax/parse racket/base)) (provide xml - xml->string - < >) - -(define-literal < >) + xml->string) (struct xml:object (tag elements)) @@ -34,17 +33,17 @@ (define-honu-syntax xml (lambda (code) - (define-literal-set xml-literals (< > honu-/)) + (define-literal-set xml-literals (honu-< honu-> honu-/)) (define-splicing-syntax-class non-xml-id #:literal-sets (xml-literals) - [pattern (~and (~not <) x:id) #:with q (begin (debug "non xml id ~a\n" #'x) #'x)] + [pattern (~and (~not honu-<) x:id) #:with q (begin (debug "non xml id ~a\n" #'x) #'x)] [pattern x #:with q #'0 #:when (begin (debug "not an xml id ~a\n" #'x) #f)] ) (define-splicing-syntax-class node #:literal-sets (xml-literals) [pattern x #:with result #'0 #:when (begin (debug "xml node ~a\n" #'x) #f)] - [pattern (~seq < start:id > more:node ... < honu-/ end:id >) + [pattern (~seq honu-< start:id honu-> more:node ... honu-< honu-/ end:id honu->) #:with result (racket-syntax (make-xml 'start more.result ...))] [pattern body:honu-body #:with result #'body.result] [pattern (~seq plain:non-xml-id plain*:non-xml-id ...) #:with result #''(plain plain* ...)]