From: Simon Strandgaard Date: 2003-11-19T23:17:16+09:00 Subject: Re: $& write-protected? On Wed, 19 Nov 2003 23:01:50 +0900, ts wrote: >>>>>> "S" == Simon Strandgaard writes: > > S> I want my regexp engine to be compatible with Ruby's, therefore I want to > S> exercise the engine with the Rubicon testsuite. But rubicon uses $& and > S> $1-$9. I can substitute all occurencies of $& and $1-$9 in rubicon. > > Be carefull with this test : it was designed for the *current* regexp > engine, this means, for example, that these tests must be modified for > Onigurama. Because Oniguruma will give different results. I have about 150 testcases which I both test with Ruby's current regexp engine and against my own engine. So far my engine is fully compatible. Perhaps I should also run the tests agains Oniguruma. Do you know if Oniguruma can coexist with Ruby's current regexp engine? > S> [RCR] remove write-protection of $&, $1-$9, $', $`, $+ > > No need for this : just write an C extension which do this, and use this > extension *only* for testing your regexp engine. > > Nobody, except you, need to modify these variables. Great, so it *is* possible.. I will look at it tomorrow (C++SWIG). -- Simon Strandgaard