[Bese-devel] yaclml xml-reader

Attila Lendvai attila.lendvai at gmail.com
Tue Aug 15 14:08:51 UTC 2006


> I see no obvious way to fix this, or how to change xml-reader-open to
> make <: tags work. One "solution" is to use it.bese.yaclml.tags:as-is
> instead of <:as-is. Not as pretty though..
>
> Any thoughts?

not much time now, but seems like we must implement or hook-into
symbol the original reading somehow.

for the curious: the situation is that in a reader macro we encounter
a "<" char and depending on the next char it's either an xml tag open
or a simple symbol. if it's not an xml tag then we unread the "<" char
and restart the reader with a clean readtable. this is fine, but needs
two levels of lookahead.

my only idea is to implement symbol reading. not too nice but probably
works. look at the next char, if it's a ":" then bind *package* to
(find-package "<") and simply restart the reader, return what it
reads. if it's a space, a "(" or any of the delimiting chars (is there
a way in CLHS to check for this?) then return (intern "<") so we won't
break with packages shadowing cl:<

otherwise we are at an xml open tag and enter our xml reader.

i'll take a look at it tomorrow if you don't push a fix for it.

thanks Henrik,

-- 
- attila

"- The truth is that I've been too considerate, and so became
unintentionally cruel...
 - I understand.
 - No, you don't understand! We don't speak the same language!"

Ingmar Bergman - Smultronstället (Wild Strawberries)


More information about the bese-devel mailing list