Common Lisp syntax extensions with quasi-quote
This site, just like the project, is pretty much under construction... But this small fragment illustrates what the project is after and code speaks better than a million words:
QQT> (set-readtime-wrapper-syntax-in-readtable) ; No value QQT> (pprint '{(with-quasi-quoted-xml-syntax :transform '(quasi-quoted-string quasi-quoted-binary (binary-emitting-form :stream *xml-stream*))) <element (attribute ,(+ 40 2)) <child>>}) (lambda () (write-sequence #(60 101 108 101 109 101 110 116 32 97 116 116 114 105 98 117 116 101 61 34) *xml-stream*) (write-quasi-quoted-binary (transform-quasi-quoted-string-to-quasi-quoted-binary (escape-as-xml (princ-to-string (+ 40 2))) :encoding :utf-8) *xml-stream*) (write-sequence #(34 62 60 99 104 105 108 100 47 62 60 47 101 108 101 109 101 110 116 62) *xml-stream*) (values)) ; No value QQT> {(with-quasi-quoted-xml-syntax :transform '(quasi-quoted-string quasi-quoted-binary (binary-emitting-form :stream *xml-stream*))) <element (attribute ,(+ 40 2)) <child>>} #<FUNCTION (LAMBDA ()) {1007D83D99}> QQT> (babel:octets-to-string (with-binary-stream-to-binary *xml-stream* (emit *)) :encoding :utf-8) "<element attribute=\"42\"><child/></element>" QQT>For more gory details you can check out the unit tests in the darcs repo. It will give you an uptodate view on how the project is progressing.
For demonstrational (end experimentational) purposes we've created a UCW based CLOS class inspector using cl-quasi-quote.
You can browse the cl-quasi-quote darcs repository or get the tree with
darcs get --partial http://common-lisp.net/project/cl-quasi-quote/darcs/cl-quasi-quote
BSD / Public Domain