Tuesday 21 May 2002
Over the last few months I've spent a bit of time, on and off, looking at the
Spirit parser framework
. It's a pretty amazing piece of work which allows you to express parsers pretty much directly in EBNF. Needless to say it uses the miracle of template meta-programming in a pretty remarkable way. I'd always looked at it and thought
this is exceedingly clever, but how do I actually use it
, until last night. In five minutes, snatched before I put Daniel to bed, I had an
This morning, I've used the Spirit framework to put together a new SAX parser, and it already calls all of the ContentHandler functions except skippedEntity. I think that's pretty incredible, given it took me two weeks to write an partial DTD parser and that only has about 5 things to notify. I've got no feel for how it'll compare with expat and the rest, too early, but there's already the obvious benefit of having nothing extra to link.