Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 45805 invoked by uid 500); 26 Oct 2001 13:16:51 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 45728 invoked from network); 26 Oct 2001 13:16:51 -0000 Subject: Re: [PATCH] new optional ReplaceRegExp task From: Matthew Inger To: bodewig@bost.de Cc: Ant Development In-Reply-To: References: <3B798BBD.1080107@sedonacorp.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.16.99+cvs.2001.10.18.15.19 (Preview Release) Date: 26 Oct 2001 09:23:09 -0400 Message-Id: <1004102590.16546.167.camel@sawgrass.sedonageo.com> Mime-Version: 1.0 X-Filter-Version: 1.3 (netra1) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I am willing to help with what i can. On Fri, 2001-10-26 at 06:05, Stefan Bodewig wrote: > The last ant-dev mail I have received has been sent Tue, 23 Oct 2001 > 13:36:55 -0500 (which is around 40 hours ago) - since I'm subscribed > with my apache.org address, which in turn will forward it elsewhere, > I suffer from the Apache mail problems with double impact ... > > If you want to reach me faster, use my work address . > > I've committed a major improvement of yesterday's regexp stuff. > > On 25 Oct 2001, Stefan Bodewig wrote: > > > TODO: > > > > * Adding testcases for the various match options > > > > * Adding testcases for the substitution stuff > > > > * Unify substitution syntax to use \1 for references, no matter > > which regexp implementation is used > > > > * Make the task actually work > > Done. > > Deciding to use \1 in the substitutions is a bit arbitrary, as ORO > uses $1, while JDK 1.4 uses $(1) and Jakarta Regexp's RE.subst method > doesn't support them at all - but the task now works for all three > implementations. I used the \1 form as this is what the > currently uses as well. > > > * Documentation for the task in Ant's normal HTML form. > > Still to do and important. > > > * Deciding whether we really want , > > and or can come up with > > something shorter than those. > > still open. > > > * Provide a wrapper for classes that only implement the Matcher > > interface by stealing code from > > RegexpPatternMapper.replaceReferences > > I've started to do that and came across some shortcomings of our > current regexp interfaces - we don't support repeated matching and > don't provide access to start/end indices of matches. Therefore the > wrapper's substitute method doesn't work, this will be fixed after a > bit contemplating over the RegexpMatcher interface. > > > * Make the regexp mapper use the new Regexp interface > > > > * (later) migrate all tasks that use ORO to the new Regexp classes > > This is a bit of a lower priority to me, as I want to get the > framework right first. I also want to look into all the other regexp > replace tasks that have been contributed (Matthew has not been the > only one 8-) to see whether we should merge in some ideas of the other > tasks. > > Stefan -- Matt Inger (matt.inger@sedonacorp.com) Sedona Corporation 455 S. Gulph Road, Suite 300 King of Prussia, PA 19406 (484) 679-2213 "Self-respect - the secure feeling that no one, as yet, is suspicious." -H.L. Mencken