You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-user@jakarta.apache.org by jon * <jo...@latchkey.com> on 2000/05/09 19:19:47 UTC
Re: RECompiler - copy on write?
on 5/9/2000 10:20 AM, Ales Novak <al...@netbeans.com> wrote:
> I have been using following schema in an older version:
huh? older version of what?
> RECompiler rc = new RECompiler();
> REProgram pr1 = rc.compile("...");
> RE re1 = new RE(pr1);
> REProgram pr2 = rc.compile("...");
> RE re2 = new RE(pr2);
> REProgram pr3 = rc.compile("...");
> RE re3 = new RE(pr3);
>
> The code which has allowed this was at RECompiler.compile():
> // Return the result
> char[] ins = new char[lenInstruction];
> System.arraycopy(instruction, 0, ins, 0, lenInstruction);
> return new REProgram(ins);
> a newer code is
> // Return the result
> return new REProgram(instruction, lenInstruction);
>
> That is my re1, re2, re3 - are working with the same program :-(.
>
> Is it a bug or feature?
no idea. send a patch for what you think is right.
> Another poblem - I have a patch in the RE class - matchNodes() - OP_BOL and
> OP_EOL
> if MATCH_MULTILINE is specified - I would like to post them - what am I to
> do?
send the patch to this list.
> Third - I have done some extensions which allow to search in (except String)
> also InputStream, Reader, and char array.
> Is someone interested in?
of course.
-jon
--
Java Servlet Based - Open Source | Collab.Net
Bug/Issue Tracking System | now hiring smart people
<http://scarab.tigris.org/> | <http://Collab.Net/jobs/>