This is it. The thing that I have been working towards.
It is a RDF shell that iteracts with the redland lib.
It supports some gcc extensions that need to be extracted into something more reusable.
The idea is that you will be able to define new commands that are based on an ontology, define queries attached to them and basically make the iteraction with the gcc introspection data completly data driven.
The current version has a nice function get_structs that queries the structures. It is used like this in a one liner script :
perl -I /mnt/gcc/gcc/introspector -Mrdfsh -e RDF::Shell::Main::main "storage TREE_NODE; prefix its http://introspector.sf.net/2007/04/02/introspector-gcc-base.owl#; prefix data1 file:///mnt/gcc/gcc/svn/build2/gcc/tree-dump-split/TREE_NODE.rdf#; set_prefix data1; get_structs;" > test.txt
The pointer and ref types are not emitted just yet :
here is a struct that can be recreated out of the rdf.