I need to parse files written in some languages(Java, C, C#...) and then trace the AST(Abstract syntax tree) to xml. (Actually the aim is to manipulate it and trace to another language - this second part have been implemented). After investigation I find out that there is no common approach to do this.
The most closest one is srcML. But first problem is that it is not Java =). The second problem is amount of languages (only 3).
I know that DMS can solve this problem, but it is not free and open-source.
So, as I understand, there is single way to do this: take ANTLR and try to convert AST to XML. So question is how to do it with ANTLR(Java), or maybe I miss some(not ANTLR way) to do this.