cp-tools-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Cp-tools-discuss] Contributions: java parser; java annotation tool.


From: Julian Scheid
Subject: Re: [Cp-tools-discuss] Contributions: java parser; java annotation tool.
Date: Sat, 13 Jul 2002 12:06:39 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530

C. Scott Ananian wrote:
I read somewhere that gjdoc deliberately does *not* use a full java parser
because of speed concerns, but I thought I'd note that a tested and
working grammar for Java 1.4 --- as well as one for 1.4 + the JSE-14 "gj"
extensions --- licensed under the GPL is available from:
  http://www.cs.princeton.edu/~appel/modern/java/CUP/javagrm.tar.gz

I know CUP and used it a couple of time. I originally planned to use it
for gjdoc, it would have been an elegant solution - but as you said, it
turned out to be way too slow for the task. The current solution is kind
of a hack, but it gets the job done fast. And IMO speed is important
considering that some people want to use it for documenting huge source
trees on a daily basis or even more frequent.

I used this to create an annotation tool for java sources which is
currently distributed only as part of the FLEX Java compiler
  http://flexc.lcs.mit.edu
but is also under the GPL and might make a dandy classpath-tool, if
the consensus is that it is worthwhile enough for me to clean
up/package/contribute.  Sample output is at:
  
http://www.flex-compiler.lcs.mit.edu/Harpoon/srcdoc/harpoon/ClassFile/HClass.html

Cool stuff, you got my vote!

In other news, the lack of a javadoc tool that works with "generic java"
(Java 1.4 + JSE-14, "Java 1.5") has been a sore point for those of us who
like using parameterized types on a daily basis:
   http://forum.java.sun.com/thread.jsp?forum=316&thread=215781
I'm considering extending gjdoc for my own use to allow me to maintain
javadoc for my FLEX project (which recently moved to generic java).
Do those on the list think this is something worthwhile for the mainstream
tree (looking forward to generic types' eventual inclusion in Java 1.x)
or needn't I worry about making my gjdoc hacks pretty?

Would be a nice thing to have support for this. I'm the original author of
most of the scanning code, so if I can be of any help with this please come
back to me.

However I fear that adding generics support will also make it necessary to
extend the Javadoc API with "proprietary" interface methods for passing
the additional type information. When generics support is incorporated into
the language one day, Sun will also extend the Javadoc API and we may have
to rewrite these parts of the code to match their spec, unless of course
they opt to use our extensions.

In any case, we should be careful to maintain compatibility with the
standard API so that non-generics-aware doclets will still work.

Julian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]