Ok, I'm curious! What might such a tool look like or do? Did you have something specific in mind?
Both of these could be achieved by somehow decoupling the front-end (as in before semantic analysis) of compilers and making them output the AST in some standardized tree-structured format like XML.