Java : parse C source code, extract variables and methods
I want to parse C files to extract variables and functions.
I need to change some local variables to global type.
Is there any java library for this purpose?
ANTLR is a great tool that has community and APIs for JAVA, C, C#, Python, ActionScript. There are ready to use grammars for many programming languages (C, C#, Java, Perl etc) or custom grammar can be created if needed.