Jez Higgins

Freelance software generalist
software created
extended or repaired


Older posts are available in the archive or through tags.

Feed

Follow me on Twitter
My code on GitHub

Contact
About

Thursday 05 August 2004 Arabica

Added some more XPath expression classes for multiply, divide and modulus. At the moment, I'm testing all these things by manipulating them directly. Now I've got a little handful of classes, the next time I get a few minutes I hope to start hooking them up to the parser.

At the moment, I've got the parser on the one hand and these expression classes on the other. The parser chews through a XPath and, assuming it's syntactically correct, produces an abstract syntax tree (ast) modelling that XPath. The expression classes actually do stuff.

All I need to do now is join them up by walking the ast and creating the corresponding objects as you go. This should be pretty straightforward, as the ast nodes have a unique integer type id. By using a lookup table of type ids to factory functions, everything should more or less fall out. Then, as I add new classes to fill out the functionality I can just add them into the table.

Something like that, anyway. This would probably make more sense after persuing the code, which is available from SourceForge CVS.


Tagged code, arabica, xml, and c++


Jez Higgins

Freelance software generalist
software created
extended or repaired

Older posts are available in the archive or through tags.

Feed

Follow me on Twitter
My code on GitHub

Contact
About