[antlr-interest] Is antlr the right tool for this job?

William Bland wjb at abstractnonsense.com
Thu Aug 19 15:53:37 PDT 2004


Hello,
	I've been looking around for a while for a neat solution to a class of
problems I have with a large chunk of Java code.  I need to be able to
automatically generate documentation, starting by pulling certain
literal strings out of method calls.  For example I need to be able to
generate a list of all the literal strings that are fed to the method

	StatsSystem.addStat(String name, Object value)

I had a look at AspectJ because someone thought it could do things like
this, but it turns out it can't really.  My current techniques for doing
this kind of thing involve some very messy awk/sed/grep stuff.  I'd like
to move away from that (because it's very fragile and difficult to
maintain) but so far I haven't found a good replacement.

It looks to me though, like antlr could be the right tool for the job. 
If I understand correctly, I could generate an AST from our Java source,
then walk the tree and pull out all the pieces of information I'm
interested in.

Does this sound reasonable, or am I wanting antlr to do things it's not
really designed for?

Thanks very much for your help.

Cheers,
	Bill.
-- 
Dr. William Bland                          www.abstractnonsense.com
Now listening to Nothing (Media player is not running) 




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list