nazemian
nazemian

Reputation: 159

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?

Upvotes: 0

Views: 921

Answers (1)

Alex L
Alex L

Reputation: 6492

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.

Check grammar list here

Upvotes: 1

Related Questions