As Tim Bray says that is another fine way to do it.
>> I'm playing with a design involving two pluggable "ESIS-handlers", one
>> "low-level", where GI's, attribute names, attribute values, comments etc
>> points directly into the source. (typically via a filemapping or an
>> in-memory-buffer)
We started off doing something like this in LTNSL, but stopped doing
filemapping (a) because it wasn't very portable and (b) either you do
some tricky decisions about when you free these pointers into the
source or it makes reading huge corpora like the 2 gigabyte BNC corpus
impossible which we wanted to be able to do.
David