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


--- Comment #0 from kennytm gmail.com 2012-02-05 01:51:58 PST ---
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



--- Comment #1 from Dmitry Olshansky <dmitry.olsh gmail.com> 2012-04-17
02:08:05 PDT ---
Created an attachment (id=1095)
Stripped down regex parser #2

-- 
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


--- Comment #2 from Dmitry Olshansky <dmitry.olsh gmail.com> 2012-04-17
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



--- Comment #3 from Dmitry Olshansky <dmitry.olsh gmail.com> 2012-11-30
12:33:39 PST ---
(In reply to comment #2)
 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
----------------------------------------------------------------------------
   Attachment #1095|0                           |1
        is obsolete|                            |


--- Comment #4 from Dmitry Olshansky <dmitry.olsh gmail.com> 2013-03-12
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


--- Comment #5 from Dmitry Olshansky <dmitry.olsh gmail.com> 2013-05-12
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