[antlr-interest] Java Cross Referencer

Terence Parr parrt at cs.usfca.edu
Mon Aug 18 11:15:53 PDT 2003


Hi Guys,

At one time, for jGuru, I was building a tool to scarf lots of java 
code and do a serious cross reference.  From that I was going to be 
able to do searches like "find all code related to EJB that also uses 
sockets" or something.  I remember getting the symbol table mostly 
right and the symbol resolution almost right.  The code is unfinished 
and sitting on my disk.

Would love to have someone try to use it as a starting point.  Any 
takers?

Terence

On Monday, August 18, 2003, at 11:03 AM, Matt Benson wrote:

> I worked for a long time to bastardize the ANTLR-based
> refactoring project Transmogrify into doing what I
> wanted, but eventually ran across the following set of
> articles which basically convinced me that
> Transmogrify was not as good a starting point as I
> could find:
>
> http://developer.java.sun.com/developer/technicalArticles/Parser/
>
> I then resolved to study and understand ANTLR before
> attempting to tackle this problem.  At one point
> Terence was tossing around the idea of having his grad
> students implement something similar.  There seems to
> be quite a demand for a powerful, versatile, Java
> parsing package with AST and symbol table construction
> that can be included in an IDE or used otherwise.  I
> know Bogdan Mitu and probably others had worked on
> incremental lexing/parsing, which would be a handy, if
> not essential feature for such a package.  It all
> seems like a fairly tall order.
>
> Ter, do you have any comments about the articles I
> mentioned above?  I may have asked before but I don't
> recall whether the question may have been lost in the
> shuffle.
>
> -Matt
>
> --- Jim O'Connor <Jim.OConnor at microfocus.com> wrote:
>> Hi All,
>>   In short, what is the best/easiest/most complete
>> Java Cross Referencer
>> that you have seen/written/used?
>>
>> http://home.austin.rr.com/kjohnston/javasrc.htm
>> http://javasrc.sourceforge.net/
>>   The ANTLR based Javasrc is very good.  The main
>> limitations are two fold.
>> You have to have some intrinsic knowledge of the
>> hierarchy of classes to
>> effectively parse a project ( i.e. the two-pass
>> system).  The other
>> limitation is that it doesn't support *.class files.
>>  I realize this can be
>> corrected by "loading" the class into the symbol
>> table beforehand myself.  I
>> am not averse to using this project.  I wanted to
>> pose the question, "Is
>> there something more complete and easier?".
>>
>>
>> http://sourceforge.net/projects/barat
>>   Barat appears to solve the problems above.  It
>> handles the class files and
>> needs no ordering of operations.  It is much more
>> difficult to work with.
>> It is based on JavaCC.  The grammar spits out a java
>> file that must be
>> compiled using the GJ compiler.
>>
>>   The ideal solution would  distill the appropriate
>> information from the
>> jar/class files, parse the *.java files, and resolve
>> the references.  Barat
>> has a good explanation its "difficulties" with
>> recursively going after
>> refernced types when parsing a particular class.
>> I'll stop the specs here.
>> Any ideas?
>>
>> Jim
>>
>>
>>
>> Your use of Yahoo! Groups is subject to
>> http://docs.yahoo.com/info/terms/
>>
>>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
>
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com pure link sharing




 

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




More information about the antlr-interest mailing list