digitalmars.D.learn - Regex
- Vladimir Voinkov (1/1) Jul 09 2009 std.regex can't be used in compile time function call. It's quite frustr...
- BLS (2/3) Jul 09 2009 see dsource.org .. afaik there is a compile time regex project. hth
- Robert Fraser (7/12) Jul 09 2009 http://www.dsource.org/projects/scregexp
- BLS (6/21) Jul 10 2009 Ouch!
- Vladimir Voinkov (2/19) Jul 11 2009 I have seen the article and really inspired by the language might. That ...
- Lutger (4/27) Jul 11 2009 Because it compiles the regex, but matching is still done at runtime? Or...
std.regex can't be used in compile time function call. It's quite frustrating...
Jul 09 2009
Vladimir Voinkov wrote:std.regex can't be used in compile time function call. It's quite frustrating...see dsource.org .. afaik there is a compile time regex project. hth
Jul 09 2009
BLS wrote:Vladimir Voinkov wrote:http://www.dsource.org/projects/scregexp But the generated functions aren't CTFE-compatible AFAIK. A CTFE regex engine would be um... "tricky" to say the least. About 50GB of memory tricky (on DMD, LDC has a GC... though, it's still just as slow with CTFE). Really, if you need that level of code manipulation, a preprocessor is probably a better choice.std.regex can't be used in compile time function call. It's quite frustrating...see dsource.org .. afaik there is a compile time regex project. hth
Jul 09 2009
Robert Fraser wrote:BLS wrote:Ouch! Remaining question :Vladimir Voinkov wrote:http://www.dsource.org/projects/scregexp But the generated functions aren't CTFE-compatible AFAIK. A CTFE regex engine would be um... "tricky" to say the least. About 50GB of memory tricky (on DMD, LDC has a GC... though, it's still just as slow with CTFE). Really, if you need that level of code manipulation, a preprocessor is probably a better choice.std.regex can't be used in compile time function call. It's quite frustrating...see dsource.org .. afaik there is a compile time regex project. hthWhy this* don't work for you ? * http://www.digitalmars.com/d/2.0/templates-revisited.html (middle of the document / Regular Expression Compiler)std.regex can't be used in compile time function call....
Jul 10 2009
I have seen the article and really inspired by the language might. That is why I'm surprised b the std.regex, the library codeveloped by Andrei! Thanks for the scregexp link. Looks promising.Ouch! Remaining question : >>> std.regex can't be used in compile time function call.... Why this* don't work for you ? * http://www.digitalmars.com/d/2.0/templates-revisited.html (middle of the document / Regular Expression Compiler)see dsource.org .. afaik there is a compile time regex project. hthhttp://www.dsource.org/projects/scregexp But the generated functions aren't CTFE-compatible AFAIK. A CTFE regex engine would be um... "tricky" to say the least. About 50GB of memory tricky (on DMD, LDC has a GC... though, it's still just as slow with CTFE). Really, if you need that level of code manipulation, a preprocessor is probably a better choice.
Jul 11 2009
BLS wrote:Robert Fraser wrote:Because it compiles the regex, but matching is still done at runtime? Or is it CTFE compilable? iirc CTFE wasn't around at the time this regex compiler was written.BLS wrote:Ouch! Remaining question : >>> std.regex can't be used in compile time function call.... Why this* don't work for you ? * http://www.digitalmars.com/d/2.0/templates-revisited.html (middle of the document / Regular Expression Compiler)Vladimir Voinkov wrote:http://www.dsource.org/projects/scregexp But the generated functions aren't CTFE-compatible AFAIK. A CTFE regex engine would be um... "tricky" to say the least. About 50GB of memory tricky (on DMD, LDC has a GC... though, it's still just as slow with CTFE). Really, if you need that level of code manipulation, a preprocessor is probably a better choice.std.regex can't be used in compile time function call. It's quite frustrating...see dsource.org .. afaik there is a compile time regex project. hth
Jul 11 2009