Leo Sutic observed:
> Just a comment: Instead of using exceptions, how about this:
>     public interface MatchObserver {
>        public void onMatch (long offset, byte b, String pattern);
>    }

Excellent comment; even better.  :-)  And since we're not interrupting the
I/O stream with the exception, we can probably get rid of the byte.

An alternative would be to add an Observer (actually, wouldn't that be a
Listener, to remain consistent with Java terminology? :-)) with the pattern,
although it seems that none of the regex engines support compiling multiple
patterns, which I find truely bizzare.  That would allow the Listener code
to execute as each pattern is found in the stream.

I would expect further interface tweaking, but the first thing we need is
code capable of supporting this construct.

        --- Noel


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

Reply via email to