Persistent AST and google sparsehash

Adam Treat treat at
Sat Aug 5 16:25:24 UTC 2006

On Saturday 05 August 2006 8:19 am, Jakob Petsovits wrote:
> On Saturday, 5. August 2006 13:41, Adam Treat wrote:
> > POST++ seems reasonable enough, but I wonder if it would be easier to
> > just implement a serializable interface in the kdevelop-pg ast generator.
> > Perhaps we can provide << and >> operators that write to a QDataStream?
> >
> > What do you think?
> Sure, must be feasible.
> An AST node does not need to contain pointers other than pointers to the
> other nodes, so we can concentrate on serializing the custom members
> (bools, ints, enums) and traversing the tree. We have a non-cyclic tree,
> which should be easy enough to traverse - hey, we already got default
> visitors!

Yah, that reference I linked is a great source.  This should be very easy to 
implement in the kdev-ast-gen as we already have a visitor, like you said ;)

> The most difficult question for me is how to seperate the serialized
> members from the data stream, but that's probably because I'm not familiar
> with the class and haven't read the apidox yet.

Not sure what you mean?  I'm pretty sure roberto is not going to want to use 
QDataStream in the parser, although I wish kdevelop-pg would just bite the 
bullet and use Qt ;)  So, we'll probably have to use std::iostream and just 
serialize ourselves.   Check out the reference I linked.


More information about the KDevelop-devel mailing list