From: "Sean Russell" <ser / efn.org>
>
[...]
> You'll notice that Ruby doesn't use the Perl regexp code, 
> or the GNU regexp library.

Isn't this the GNU version?
http://www.ruby-lang.org/~knu/cgi-bin/cvsweb.cgi/ruby/regex.c?rev=1.54&content-type=text/x-cvsweb-markup

There are a few #if RUBY's in there but not that many.

There is also an 800+ and a 1200+ line function, with switch
statements inside of switch statements inside of switch
statements.  :-)
                                     statements.
...Plus a healthy sprinkling of
                                goto

I am trying my hand at rewriting it, although still in straight 'C'.
What got me interested in undertaking the rewrite is:

  - I'd love to see the (?{ruby code}), (??{postponed regexp}),
    (?(condition)...), (?<=pattern) and (?<!pattern) extensions
    in ruby... and doing surgery on the GNU version doesn't look
    like fun...
  - My own edification: I want to see how test-first design evolves
    something like an re engine.  Plus, I've written a simple re
    engine before, and am doubtful the 'full' version really need
    be as complex as the GNU one looks.  (But if I am wrong I will
    have definitely learned something too. :-)
  - The rewrite would have a (fully) Ruby-compatible license.
  - The rewrite will be, I hope, very well factored, easy to
    maintain, modify, and extend; and thoroughly--well, "really
    heavily"--unit-tested...

...but then, I've only been working a couple days on it so far,
so it is at present categorically "vaporware". . .

But this does give me the chance to ask, and now would seem to
be a good time to do so: Is anyone else out there also working
on an re engine rewrite?  Wouldn't want to duplicate a lot of
work(!)

And also, although this is harder to ask, what do the core
Ruby developers think about the idea of an re engine rewrite?
Does it seem reasonable as an approach, or would it be 
preferable for whatever reason to pursue adding extensions to
the existing GNU code?  (And is there any chance such 
extensions, or the rewrite, might be considered for adoption
in the official Ruby sources anyway?)

Thanks for your feedback.

Regards,

Bill