cons-discuss
[Top][All Lists]
Advanced

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

Java dependencies (was: Future of cons?)


From: vbar
Subject: Java dependencies (was: Future of cons?)
Date: 28 May 2002 16:03:09 -0000

Steven Knihgt wrote:
>> Is there a Python parser for Java? I couldn't find one for 
>> Perl - there are parsers, but no Java grammar for them...
> I don't know of a ready-made Java parser in Python.  I assume 
> you're asking for purposes of determining class dependencies, 
> to figure out what .jar files will be created from a given 
> update?
Yes, and even before that, a parse is necessary to determine
which .class files will a .java file compile into...

> How does Ant do this?  Does it automatically figure out class
It doesn't... :-(

> dependencies?  Or does it rely on the dependencies being 
> listed manually in the XML config file?
Yes, plus it assumes $classdir/pkg/name/some.class to depend
on $srcdir/pkg/name/some.java - which, as far as I'm concerned,
is not nearly enough (it's not even necessarily true)...

> Note that if there are some Java objects for parsing class 
Yes, there's ANTLR - I tried to use it. It warns (about 
possible internal errors) when parsing it's own generated code,
but basically seems good enough... OTOH I think it's unfair to 
choose Java as an implementation language for a multi-language 
build tool just because it's Java making the most trouble... :-)

> and/or jar files, porting SCons to Jython (Python implemented 
> in Java) should be easily doable, and reportedly provides 
> very good integration with Java classes.
That's an interesting possibility...

> that I've heard and read about.  I invite corrections if I've 
> mistaken anything in my description.)
I suppose you meant "source files", not "class files" in the quote above - 
.class files actually don't contain all the 
dependencies of the source (notably, symbolic constants leave 
only their value in .class). Building Java applications is 
a very interesting problem...

  Bye
    Vasek



reply via email to

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