Bug 12105 – ctRegex errors

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-07T23:22:00Z
Last change time
2015-02-10T15:09:37Z
Keywords
pull
Assigned to
dmitry.olsh
Creator
temtaime

Comments

Comment #0 by temtaime — 2014-02-07T23:22:32Z
import std.regex; auto r = ctRegex!`.+?(?<!\\)a`; void main() {} Gives: src\phobos\std\regex.d-mixin-5859(5943): Error: found 'else' instead of statement import std.regex; StaticRegex!char[1] tokenRegex = [ ctRegex!`` ]; void main() {} On windows gives strange errors to curl(it is neccessary to compile with -O -noboundscheck -release) curl.lib Warning 2: File Not Found curl.lib curl.lib Warning 2: File Not Found curl.lib DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_easy_init DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_easy_setopt DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_easy_strerror DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_slist_append DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_easy_duphandle DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_easy_perform DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_slist_free_all DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_easy_cleanup DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_global_init DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_version_info DMD\windows\bin\..\lib\phobos.lib(curl) Error 42: Symbol Undefined _curl_global_cleanup
Comment #1 by dmitry.olsh — 2014-02-08T02:36:30Z
Somewhat reduced, the lookaround and lazy repetition are required: import std.regex; auto r = ctRegex!`.*?(?!)`; void main() {} The second case looks like a compiler bug, especially since it requires some combination of flags.
Comment #2 by dmitry.olsh — 2014-02-22T13:26:38Z
Comment #3 by github-bugzilla — 2014-02-23T11:49:16Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/873a440fd44a52dd84600d572f62175b4b9b0551 std.regex - fix issue 12105 Handle the case where a lazy quantified loop will have pessimistic empty "quick test", for example in front of a lookaround. https://github.com/D-Programming-Language/phobos/commit/afd910e924eb60b0c53e8ec3c9bfc6cde4a8db2a Merge pull request #1959 from blackwhale/issue-12105 std.regex - fix issue 12105
Comment #4 by electrolysis.jp+d — 2015-02-10T15:09:37Z
*** Issue 14159 has been marked as a duplicate of this issue. ***