Milian Wolff mail at
Sat Oct 16 03:14:56 UTC 2010

Sven Brauch, 16.10.2010:
> That indeed looks like a good idea.
> I read the parser documentation and generated an XML file out of the AST
> the parser provides; for this script , it looks
> like this:
> I'd now read that into the C++ AST (this will require quite some changes in
> class structures, as the AST this parser provides is much more clear and
> detailed; for example, instead of "Identifier", it explicitly gives things
> like "FunctionDef", "Attribute" and "Name", and even tells wether the
> attribute is being written or read. Nice!). Do you think that's a bearable
> plan (PovAddict already disliked the idea of using XML for this...)?

if all you get from libpython is xml, then so be it. still much better than 
writing the parser from scratch imo.

though if possible use the lib direclty and skip the overhead of creating + 
reading xml.

anyways, don't "map it into C++ AST", either create your own AST from the xml 
or just build the duchain on your own. Imo the former should work well.

Milian Wolff
mail at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the KDevelop-devel mailing list