Would there be interest in a SERIOUS compile-time regex parser?
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Sat Oct 21 02:43:50 PDT 2006
Don Clugston wrote:
>
> It would behave *exactly* like the existing std.regexp, except that
> compilation into the internal form would happen via template
> metaprogramming, so that
> (1) all errors would be caught at compile time, and
> (2) there'd be a minor speedup because the compilation step would not
> happen at runtime, and
> (3) otherwise it wouldn't be any faster than the existing regexp.
> However, there'd be no template code bloat, either.
>
Whoa, "internal form" and "bytecoded program"? Out of curiosity, for
those ignorant on the matter, like me, what kind of processing is done
when creating a regexp, in terms of this internal form you speak of? Is
it converted to a simple internal form, or something more complex?
Bytecoded program seems pretty complex stuff, especially for a regexp
(isn't the translation direct) ?
--
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list