[GSOC idea] enhance regular expressions?
bearophile
bearophileHUGS at lycos.com
Mon Mar 28 14:47:21 PDT 2011
Dmitry Olshansky:
> http://dsource.org/projects/dmdscript-2. Note that I haven't touched it
> in couple of dmd releases, it may need cosmetic fixes.
I will try it.
> http://swtch.com/~rsc/regexp/regexp1.html, it could be a starting point,
Before fully embracing the contents of that page, look at its critics too.
> 3) When I saw Don's comments on fixing CTFE, I remembered something D
> can do _better_ than most others mainstream compiled languages -
> metaprogramming. So having a StaticRegex compiled at compile-time
> (inevitable calambour) would give us an edge over comparative
> implementations.
But it inflates the binary too, if overused, because each RE pattern becomes a compiled function (or more than one).
> Another thing to sort out is style: are we sticking with ECMA or
> switching to Perl / GNU? Shall we provide also different versions of
> syntax?
One RE syntax in a language is more than enough :-) But there are some features of the Python REs that I'd like to see bolted-on to the ECMA REs used by D. So I suggest a superset of ECMA.
Bye,
bearophile
More information about the Digitalmars-d
mailing list