Our DMS Software Reengineering Toolkit can do this with C # 2/3/4 . (EDIT 2014: and now C # 5)
DMS has exact compiler parsers for C # (as well as Java and many other languages).
, . AST node file/line/column , node,
API DMS. , . DMS AST AST; .
XML AST, node, ( ) . :
run DMSDomainParser ++XML <path_to_your_file>
DMS :
, ( , ), -.
, , , C, COBOL Java; #.
DMS , XML .