www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7440] New: ctRegex does not work when using alternatives ('|') involving a '+' inside non-capturing group ('(?:…)')

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7440

           Summary: ctRegex does not work when using alternatives ('|')
                    involving a '+' inside non-capturing group ('(?:…)')
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: kennytm gmail.com



Test case:

------------------------------------------------------------------------------
import std.regex;

// using capturing group has no problem.
enum bug7440a_1_workaround = ctRegex!`(b*|d+)`;
enum bug7440a_2_workaround = ctRegex!`(a|b+)`;
enum bug7440a_3_workaround = ctRegex!`(a|[^a]+)`;

// using '|' inside a '(?:...)' may cause InfiniteEnd or some other error.
enum bug7440a_1 = ctRegex!`(?:b*|d+)`;
enum bug7440a_2 = ctRegex!`(?:a|b+)`;
enum bug7440a_3 = ctRegex!`(?:a|[^a]+)`;
------------------------------------------------------------------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 05 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7440




02:08:05 PDT ---
Created an attachment (id=1095)


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 17 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7440


Dmitry Olshansky <dmitry.olsh gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh gmail.com
          Component|Phobos                      |DMD



02:11:15 PDT ---
Not a Phobos bug. It's in CTFE side of things. Nowadays it triggers assert.
Judging by the assert firing off it's a likely duplicate of Issue 7810.
Issue 7810 also features smaller test case.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 17 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7440




12:33:39 PST ---

 Not a Phobos bug. It's in CTFE side of things. Nowadays it triggers assert.
 Judging by the assert firing off it's a likely duplicate of Issue 7810.
 Issue 7810 also features smaller test case.
Now 7810 is fixed and I see that this bug is a different beast, will look into reducing it more. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 30 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7440


Dmitry Olshansky <dmitry.olsh gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------

        is obsolete|                            |



04:35:47 PDT ---
(From update of attachment 1095)
Now this snippet works, there is another bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 12 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7440


Dmitry Olshansky <dmitry.olsh gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



14:03:13 PDT ---
Has more tests but with the same root cause as 9634.

*** This issue has been marked as a duplicate of issue 9634 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 12 2013