RE: [PATCH] New RExecTask

2003-05-01 Thread Jene Jasper

Create an enhancement request in Bugzilla
http://nagoya.apache.org/bugzilla/, attach your patch and the new files.

-Oorspronkelijk bericht-
Van: Rey Francois [mailto:[EMAIL PROTECTED]
Verzonden: donderdag 1 mei 2003 14:53
Aan: Rey Francois; '[EMAIL PROTECTED] '
Onderwerp: RE: [PATCH] New RExecTask


Sorry about all the spam, don't really know why the zip file is not being
sent through each time.
Last try before I give up, this time attaching the files themselves.


-Original Message-
From: Rey Francois 
Sent: 30 April 2003 17:31
To: '[EMAIL PROTECTED] '
Subject: [PATCH] New RExecTask



I have implemented a new RExecTask which I believe can be of use to others.
I wasn't that difficult: I took the TelnetTask as a model and transformed it
into an RExecTask.

Note:
- these patches have been made against Ant 1.5.3
- I used "diff -c" to create them (the -u option is not available on my
platform). In any case I also included the modified files.
- the new task also makes use of the NetComponents
(http://www.savarese.org/oro/downloads/index.html#NetComponents).

Enjoy,

Fr.



RE: Patch JavaCC - KEEP_LINE_COLUMN, JJTree - OUTPUT_FILE and new tas kdef JJDoc

2003-04-04 Thread Jene Jasper
I noticed that the patch for JavaCC 2.1/3.0 changes is commited to CVS.

Would it be useful if I add an updated patch.txt to bug 18602 for
JavaCC.java 
and JJTree.java after the changes are available in a nightly build ??

Jene.

-Oorspronkelijk bericht-
Van: Stefan Bodewig [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 2 april 2003 12:08
Aan: [EMAIL PROTECTED]
Onderwerp: Re: Patch JavaCC - KEEP_LINE_COLUMN, JJTree - OUTPUT_FILE and
new tas kdef JJDoc


On Wed, 2 Apr 2003, Jene Jasper <[EMAIL PROTECTED]> wrote:

> Thus I will try to check in a patch for JavaCC 2.1/3.0 changes
> against the latest snapshot around Monday.

CVS HEAD hasn't changed for quite some time, shouldn't be a problem.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Patch JavaCC - KEEP_LINE_COLUMN, JJTree - OUTPUT_FILE and new tas kdef JJDoc

2003-04-02 Thread Jene Jasper

>>On Wed, 2 Apr 2003, Jene Jasper <[EMAIL PROTECTED]> wrote:

>> Does it make a difference if I make the patch on my latest revision
>> or the snapshot of April 1st?

>It might be easier to do if you diffed against CVS HEAD, but ...

>> I don't think it will involve the same lines of code.

>in this case, patch might work with some fuzzyness.

>You could try to apply your patch against a CVS HEAD version to be
>sure.

>Stefan

I having some problems getting anonymous cvs to work tunneling through my
firewall with PuTTy.
Thus I will try to check in a patch for JavaCC 2.1/3.0 changes against the
latest snapshot around Monday.

Jene.


RE: Patch JavaCC - KEEP_LINE_COLUMN, JJTree - OUTPUT_FILE and new tas kdef JJDoc

2003-04-02 Thread Jene Jasper
>>On Wed, 2 Apr 2003, Jene Jasper <[EMAIL PROTECTED]> wrote:

>> As mentioned yesterday, I have made some changes to the JavaCC and
>> JJTree taskdefs and added a new taskdef for JJDoc. I have included
>> the patch.txt for the changes.  But what is the best way to deliver
>> the new files JJDoc.java and jjdoc.html ?

>Create an enhancement request in Bugzilla, attach this patch and the
>two new files.

>Does your patch include the JavaCC 3.0/2.1 changes?  I'd like to
>tackle that separately if possible.

We are thinking along the same line. That is why I created this separate
patch.

And about the patch for the JavaCC 3.0/2.1 changes, I have the following
question:
Does it make a difference if I make the patch on my latest revision or the
snapshot of April 1st?
I don't think it will involve the same lines of code.

Jene.



RE: The JavaCC and JJTree tasks....

2003-04-02 Thread Jene Jasper
Tom,

I noticed your changes. I already downloaded JavaCC 3.0. 

Enabling the taskdefs to work with both versions seems pretty straight
forward. 

But I think it could be useful to make the taskdefs also work when both
versions are available. In which case there should be an optional attribute
to force the taskdef to use a specific version. If the attribute isn't
present the taskdef will figure out the required package name. If both are
available should it then default to 2.1 or 3.0.

Any suggestions for the attribute name: javaccversion "2.1" or "3.0" or
package "com" or "org" ?

Sincerely yours,

Jene.
On Tue, 2003-04-01 at 10:05, Jene Jasper wrote:
> I have some patches coming up for JavaCC and JJTree concerning some
missing
> parameters and also an enhancement for a JJDoc taskdef (code is finished,
> only cvs -diff left on a nightly snapshot).
> 
> I could look into a patch for version 3.0 added support this coming
weekend.

That's cool... you saw my changes for JavaCC 3.0, right?  Just a package
name change?  Sounds like you're further along than I am

Yours,

tom


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Patch JavaCC - KEEP_LINE_COLUMN, JJTree - OUTPUT_FILE and new tas kdef JJDoc

2003-04-02 Thread Jene Jasper
;)",
 Project.MSG_VERBOSE);
 return;
 }
+
 cmdl.createArgument().setValue(target.getAbsolutePath());
 
 final Path classpath = cmdl.createClasspath(getProject());
@@ -266,6 +288,54 @@
 }
 } catch (IOException e) {
 throw new BuildException("Failed to launch JJTree", e);
+}
+}
+
+private String createOutputFileName(File target, String
optionalOutputFile, String outputDirectory)
+{
+String jjtreeFile = target.getAbsolutePath().replace('\\','/');
+
+if ((optionalOutputFile == null) || optionalOutputFile.equals(""))
+{
+int filePos = jjtreeFile.lastIndexOf("/");
+
+if (filePos >= 0)
+{
+jjtreeFile = jjtreeFile.substring(filePos + 1);
+}
+
+int suffixPos = jjtreeFile.lastIndexOf('.');
+
+if (suffixPos == -1)
+{
+optionalOutputFile = jjtreeFile + DEFAULT_SUFFIX;
+}
+else
+{
+String currentSuffix = jjtreeFile.substring(suffixPos);
+
+if (currentSuffix.equals(DEFAULT_SUFFIX))
+{
+optionalOutputFile = jjtreeFile + DEFAULT_SUFFIX;
+}
+else
+{
+optionalOutputFile = jjtreeFile.substring(0, suffixPos)
+ DEFAULT_SUFFIX;
+}
+}
+}
+else
+{
+optionalOutputFile = optionalOutputFile.replace('\\','/');
+}
+
+if ((outputDirectory == null) || outputDirectory.equals(""))
+{
+return (getProject().getBaseDir() + "/" +
optionalOutputFile).replace('\\', '/');
+}
+else
+{
+return (outputDirectory + "/" +
optionalOutputFile).replace('\\', '/');
 }
 }
 }

Index: src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
===
RCS file:
D:\usr\local\cvsroot/ant/src/main/org/apache/tools/ant/taskdefs/optional/jav
acc/JavaCC.java,v
retrieving revision 1.1
diff -u -r1.1 JavaCC.java
--- src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
2003/03/01 16:17:34 1.1
+++ src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
2003/04/01 17:13:34
@@ -96,6 +96,7 @@
 private static final String SANITY_CHECK   = "SANITY_CHECK";
 private static final String FORCE_LA_CHECK = "FORCE_LA_CHECK";
 private static final String CACHE_TOKENS   = "CACHE_TOKENS";
+private static final String KEEP_LINE_COLUMN   =
"KEEP_LINE_COLUMN";
 
 private final Hashtable optionalAttrs = new Hashtable();
 
@@ -245,6 +246,13 @@
  */
 public void setCachetokens(boolean cacheTokens) {
 optionalAttrs.put(CACHE_TOKENS, new Boolean(cacheTokens));
+}
+
+/**
+ * Sets the KEEP_LINE_COLUMN grammar option.
+ */
+public void setKeeplinecolumn(boolean keepLineColumn) {
+optionalAttrs.put(KEEP_LINE_COLUMN, new Boolean(keepLineColumn));
 }
 
 /**

*CVS exited normally with code 1*

===

>I have some patches coming up for JavaCC and JJTree concerning some missing
>parameters and also an enhancement for a JJDoc taskdef (code is finished,
>only cvs -diff left on a nightly snapshot).

>I could look into a patch for version 3.0 added support this coming
weekend.

>Jene Jasper.

On 01 Apr 2003, Tom Copeland <[EMAIL PROTECTED]> wrote:

>> If possible we should support both (and I think there already is a
>> bugzilla report to that effect, including a patch IIRC).
> 
> I poked around Bugzilla for a bit and couldn't find anything.

I was wrong.  There is one for JDepend, which has similar problems
(changed directory structure in new release).

> Anyhow, sounds like you have this one under control...

Not really. 8-)  A patch that would enable the tasks to work with
either version would be appreciated.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: The JavaCC and JJTree tasks....

2003-04-01 Thread Jene Jasper
I have some patches coming up for JavaCC and JJTree concerning some missing
parameters and also an enhancement for a JJDoc taskdef (code is finished,
only cvs -diff left on a nightly snapshot).

I could look into a patch for version 3.0 added support this coming weekend.

Jene Jasper.

-Oorspronkelijk bericht-
Van: Stefan Bodewig [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 1 april 2003 16:57
Aan: [EMAIL PROTECTED]
Onderwerp: Re: The JavaCC and JJTree tasks


On 01 Apr 2003, Tom Copeland <[EMAIL PROTECTED]> wrote:

>> If possible we should support both (and I think there already is a
>> bugzilla report to that effect, including a patch IIRC).
> 
> I poked around Bugzilla for a bit and couldn't find anything.

I was wrong.  There is one for JDepend, which has similar problems
(changed directory structure in new release).

> Anyhow, sounds like you have this one under control...

Not really. 8-)  A patch that would enable the tasks to work with
either version would be appreciated.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]