[antlr-interest] How to parse java source code ?

Anthony Kong anthony.kong at ufjia.com
Sun Jul 13 19:30:06 PDT 2003


I guess you can take a look at http://www.antlr.org/. It is a reasonably
easy-to-use parser. Well documented.

Regards,


Anthony

-----Original Message-----
From: Suma Venkatesh [mailto:sumav_99 at yahoo.com]
Sent: Saturday, July 12, 2003 7:37 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] How to parse java source code ?


Hi,

  Iam looking for a parser which can parse an input java source code.I 
mean the parser
should read
the source code and identify the variable names and types.

Eg: Input is :
  import java.util.*;

public class HelloWorld{

public static void main(String args[]) {

String message = "Hello World";
int count =0;

	while(count <10) {
             System.out.println(message);
             count++;
        }

}

Output should be :

Variables: type name
           int  count
           String message

Can ANTLR do this and if so how ??

PLEASE HELP ME!!

thanks in advance,
suma


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list