How to convert source code to a xml based representation of the ast?

Posted by autobiographer on Stack Overflow See other posts from Stack Overflow or by autobiographer
Published on 2010-05-12T10:26:39Z Indexed on 2010/05/12 10:34 UTC
Read the original article Hit count: 278

Filed under:
|
|
|

i wanna get a xml representation of the ast of java and c code. 3 months ago, i asked this question yet but the solutions weren't comfortable for me

  • srcml seems to be a good solution for this problem but it does not support line numbers and columns but i need that feature.
  • about elsa: cite: "There is ongoing effort to export the Elsa AST as an XML document; we expect to be able to advertise this in the next public release."
  • dms... didn't understand that.
  • especially for java, there is javaml which supports line numbers. but the sourceforge page doesn't list any files.

question: there's software available which supports conversion of ast into xml which supports line numbers (and columns) [especially for java and c/c++]? is there an alternative to javaml and srcml?

ps: i don't wanne have parser generators. i hope to find a tool which can be used on the console typing: ./my-xml-generator Test.java [or something like that]... or a java implementation would be great too.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about ast