0

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?

3
  • possible duplicate of Library to parse C/C++ source code Commented Mar 16, 2012 at 20:35
  • not actually, i'm looking for java library. Commented Mar 16, 2012 at 20:40
  • Well, I do not think there is a library(a single JAR) - Hope you know that ANTLR is a java based solution. Commented Mar 16, 2012 at 20:43

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

As i said, i need to modify variables in some conditions. Can ANTLR help?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.