Creating a Parser in Java for Java
I have just 6 months familiarity with JAVA so excuse me if I am being foolish sometimes. ..
My objective is to create an application in Java which should be able to create a flow chart of a Java program once its source code is given as input to the application. It should also be able to generate a basic class hierarchy or functional hierarchy (If there is one) by reading the source code of the application. Now my problem is that I am researching on this since two weeks but didn't get anything significant.......My approach to do this would be
1. Parse the Java Program..extract as much info as I can
2. Use tis info to generate the flow chart and all
now problem with the first is I need to write grammars to parse the java program...and it may complicate the project....so Can you people suggest any other solution or a more elegant approach....
To generate gramars I am thinking of using Antlr is it the right choice or Is there something better??...and even better can anyone guide me on ow to write full fledged grammar to parse a Java Program So that the stated objectives can be achieved???...
hanks in advance.....plz help