Good point.  I got caught up in the term "filter" and
didn't consider the situations when the effect of the
filter was a transformation.  That is the kind of
thing I was looking for, an example of filter behavior
that would be impossible to intelligently invert. 
Until now I have been unsure whether the class could
be written.  Inverting a removal filter would be
complex but intelligent results probably could be
achieved.  I was thinking along the lines of grep and
grep -v when I came up with this.  On the other hand,
transformations would probably not yield output
comparable to the input and thus would probably result
in nothing but garbage when inverted.  Consider that
matter dropped, then.

Now to have holes shot in my other suggestion:  why
not create FilterReaders around the Perl5Tools,
AwkTools, etc. in Jakarta ORO?

-Matt


--- Stefan Moebius <[EMAIL PROTECTED]> wrote:
> Does this make sense for anything but removal
> filters? How would you
> expect the inverse of a "replace foo by bar" filter
> to work?
> 
> Stefan
> 
> --- Matt Benson <[EMAIL PROTECTED]> wrote:
> > An InverseFilterReader would do exactly the
> opposite
> > of a specified FilterReader.  For example, the
> > StripJavaComments FilterReader in Ant strips away
> Java
> > comments.  An InverseFilterReader wrapping a
> > StripJavaComments FilterReader would strip away
> > everything BUT Java comments.  I think
> implementation
> > might be any of tricky, slow, or memory-intensive,
> but
> > the number of existing FilterReaders would be
> > instantly doubled if this class were written.
> > 
> > -Matt
> > 
> > 
> > --- Magesh Umasankar <[EMAIL PROTECTED]> wrote:
> > > ----- Original Message ----- 
> > > From: "Matt Benson" <[EMAIL PROTECTED]>
> > > 
> > > 
> > > > Nice thought here--why not adapt the various
> > > angles of
> > > > Jakarta ORO as FilterReaders?  Another class I
> > > have
> > > > thought of writing for quite some time, but
> whose
> > > > implementation would be quite tricky, is an
> > > > InverseFilterReader which would perform the
> > > opposite
> > > > of a contained FilterReader.  
> > > 
> > > I don't quite follow - will you please expand
> > > on what you propose as an InverseFilterReader?
> > > 
> > > > 
> > > > -Matt
> > > 
> > > Cheers,
> > > Magesh
> > > 
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:  
> > > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > 
> > 
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> > http://mailplus.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:  
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> 
> 
> =====
> Stefan Moebius       <[EMAIL PROTECTED]> 
>   Wurzener Str. 43        +49 351 8475827
>   01127 Dresden           +49 172 8739617
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> http://mailplus.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

Reply via email to