[cfe-dev] Clang and XML output

Matthieu Dubet maattdd at gmail.com
Sun Aug 22 07:54:28 PDT 2010


Hi,

I'm developing a small C / C++ / ObjC IDE and I plan to use Clang "behind
the wall" for all the highlighting, completion and semantic stuff about the
code .

I know Clang has an -as-xml-output option, but the generated XML is far too
complicated to be used as is, and I was wondering if there is some function
I'm not aware about, producing XML (or any markup language) more like this
tool ( http://42ndart.org/scalpel/demonstration.html ).

int
main(int argc, char** argv)
{
	std::cout << "Hello, World!" << std::endl;
	return 0;
}


<namespace>
 <function name="main">
  <return_type>
   <built_in_type type="int"/>
  </return_type>
  <parameters>
   <parameter name="argc">
    <type>
     <built_in_type type="int"/>
    </type>
   </parameter>
   <parameter name="argv">
    <type>
     <pointer>
      <pointer>
       <built_in_type type="char"/>
      </pointer>
     </pointer>
    </type>
   </parameter>
  </parameters>
 </function>
</namespace>


Sorry for my poor english, and thanks for this amazing compiler .

Matthieu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100822/759af259/attachment.html>


More information about the cfe-dev mailing list