You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Paul Nasrat <pa...@truemesh.com> on 2003/07/10 11:32:28 UTC

javacc task for 3.1

Here is a small patch to add the javacc.jar to the search list for the
javacc task.  This makes the task work with sane layouts such as
/usr/share/java/javacc.jar or lib/javacc.jar (eg for JPackage).

Please apply - tested with JavaCC 3.1.

Paul Nasrat

Re: javacc task for 3.1

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 10 Jul 2003, Paul Nasrat <pa...@truemesh.com> wrote:

> Take two - I've actually tested this one rather than thinking I have
> :)

Cool, changes committed.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: javacc task for 3.1

Posted by Paul Nasrat <pa...@truemesh.com>.
On Thu, Jul 10, 2003 at 01:04:52PM +0200, Stefan Bodewig wrote:
> On Thu, 10 Jul 2003, Paul Nasrat <pa...@truemesh.com> wrote:
> 
> > Here is a small patch to add the javacc.jar to the search list for
> > the javacc task.
 
Take two - I've actually tested this one rather than thinking I have :)

Apologies for wrapping:

[paul@uruk xjavadoc-1.0]$ ant -Djavacchome=/usr/share/java jjtree
Buildfile: build.xml
 
...
 
jjtree:
 
copy-grammar:
     [copy] Copying 1 file to
/local/home/paul/rpm/BUILD/xjavadoc-1.0/target/src/xjavadoc
   [jjtree] Java Compiler Compiler Version 3.1 (Tree Builder)
   [jjtree] (type "jjtree" with no arguments for help)
   [jjtree] Reading from file
/local/home/paul/rpm/BUILD/xjavadoc-1.0/target/src/xjavadoc/nodeparser.jjt

...

Paul

Re: javacc task for 3.1

Posted by Paul Nasrat <pa...@truemesh.com>.
On Thu, Jul 10, 2003 at 01:04:52PM +0200, Stefan Bodewig wrote:
> On Thu, 10 Jul 2003, Paul Nasrat <pa...@truemesh.com> wrote:

> This is by far not enough, you'd get a major version from
> getMajorVersionNumber of 4, which in turn would cause getMainClass to
> fail.

My bad.  I really didn't look at the code closely enough.

> > This makes the task work with sane layouts such as
> > /usr/share/java/javacc.jar or lib/javacc.jar (eg for JPackage).
> 
> Taking /usr/share/java as an example, you'd have to set the task's
> javacchome attribute to "/usr/share/java/" with your patch, right?
> Line 339 in JavaCC.java will cause javacc to be invoked with
> -Dinstall.root=/usr/share/java - are you sure it will work properly
> with this?

Hmm, no you are right, I kludged lib/bin/javacc and then didn't look at
my patch closely enough.

I'll have another poke now.

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: javacc task for 3.1

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 10 Jul 2003, Paul Nasrat <pa...@truemesh.com> wrote:

> Here is a small patch to add the javacc.jar to the search list for
> the javacc task.

This is by far not enough, you'd get a major version from
getMajorVersionNumber of 4, which in turn would cause getMainClass to
fail.

> This makes the task work with sane layouts such as
> /usr/share/java/javacc.jar or lib/javacc.jar (eg for JPackage).

Taking /usr/share/java as an example, you'd have to set the task's
javacchome attribute to "/usr/share/java/" with your patch, right?
Line 339 in JavaCC.java will cause javacc to be invoked with
-Dinstall.root=/usr/share/java - are you sure it will work properly
with this?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org