I haven't followed the discussion closely, and I cannot really comment on the core regex functionality, but I did actually use FReD as a replacement of a buggy std.regex once.

In that case I wanted to have a lazily created static regex, but I did not find an official way to test whether a Regex has been initialized:

        static Regex!char re;
        if(!isInitializedRE(re))
                re = regex(r"^(.*)\(([0-9]+)\):(.*)$");

So I implemented isInitializedRE() as "re.ir !is null" for std.regex and "re.captures() > 0" for fred, but that fails for being a "drop-in replacement".

I think, both versions use implementation specifics, maybe there should be a documented way to test for being initialized.

I also noticed, that "auto match(R, RegEx)(R input, RegEx re);" appears twice in the documentation, same for "bmatch". I guess they should not appear together with the string versions.

Rainer

On 22.10.2011 18:21, Jesse Phillips wrote:
Please note that the review will be ending this weekend in just 32 hours.
At which point voting will begin, please do not wait for voting to
criticize the library.

Updating Documentation: http://blackwhale.github.com/

On Sat, 08 Oct 2011 19:56:32 +0000, Jesse Phillips wrote:

Hello everyone,

I have taken the role of review manager of the std.regex replacement by
Dmitry Olshansky. The review period begins now 2011-10-8 and will end on
2011-10-23 at midnight UTC. A voting thread to include into Phobos will
be held after review assuming such is appropriate. The Voting period is
one week.

Please note that you can try FRed as part of Phobos (Code) or by itself
(Package of FReD) which includes docs.

Doc:

http://nascent.freeshell.org/fred/doc/

Code:

https://github.com/blackwhale/phobos MASTER

Package of FReD:

https://github.com/downloads/blackwhale/FReD/FReD.zip

Remember this will be replacing the current std.regex and is intended to
be a drop in replacement. This project is also part of GSoC.

Dmitry, I ask that you apply this patch to posix.mak (adding to internal
modules).

--- a/posix.mak +++ b/posix.mak @@ -184,7 +184,8 @@ std/c/, fenv locale
math process stdarg stddef stdio stdlib
  time wcharh)
  EXTRA_MODULES += $(EXTRA_DOCUMENTABLES) $(addprefix
  \
         std/internal/math/, biguintcore biguintnoasm biguintx86 \
-       gammafunction errorfunction) std/internal/processinit +
gammafunction errorfunction) std/internal/processinit \
+       std/internal/uni std/internal/uni_tab

  # Aggregate all D modules relevant to this build D_MODULES = crc32
  $(STD_MODULES) $(EXTRA_MODULES) $(STD_NET_MODULES)

Reply via email to