This plugin consists of two parts: the parser, which is intended to create anabstract syntax tree (AST) from a string of python code, and the DUChain Library,which analyzes this AST semantically, extracting information about contexts, variable /class / function declarations, and other stuff.The parser----------... is not written by us. We're querying the python C API to extract an AST from a givenstring of python code. For information about the parser API, see http://docs.python.org/c-api/veryhigh.html?highlight=pyparser_#PyParser_SimpleParseString(for example). As this AST is based on PyObjects, relies on a large amount of macros for dataaccess, and is not based on classes, but on structs, we transform it to a more convenient form.This is done in parser/astbuilder.cpp by the PythonAstTransformer class. It walks through a pythontree, and generates the corresponding plugin-tree objects (those which end with Ast, like StatementAst etc.).This transformer is not written by hand, but is generated by the conversionGenerator.py script. This scriptreads information on how the AST should be transformed from the parser/python26.sdef file.It should be obvious from the large amount of examples what those rules look like.