Thread overview
[Issue 10781] ctRegex! throws a huge error
Aug 08, 2013
milvakili
Aug 11, 2013
Dmitry Olshansky
Sep 07, 2013
Dmitry Olshansky
August 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10781


milvakili <maliyatbaz@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|general                     |DMD
            Version|unspecified                 |D2
         AssignedTo|thomas-dloop@kuehne.cn      |nobody@puremagic.com
            Product|DStress                     |D
   Target Milestone|---                         |2.059


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 11, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10781


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh@gmail.com


--- Comment #1 from Dmitry Olshansky <dmitry.olsh@gmail.com> 2013-08-11 13:45:00 PDT ---
Note that lookahead is now supported in latest git: https://github.com/D-Programming-Language/phobos/pull/1465

More to the point after this pull https://github.com/D-Programming-Language/phobos/pull/1459

It lists the reason of failure clearly. Huge mess produced by compiler afterwards is not tackled yet.

For example the following:

auto c1 = ctRegex!("a(?<=bc)b");

Produces:
std\regex.d(4329): Error: "Lookbehind is not supported yet"
std\regex.d(4242):        called from here: this.ctGenGroup(ir, result.addr)
std\regex.d(4734):        called from here: this.ctGenBlock(ir, 0)
std\regex.d(4783):        called from here: context.ctGenRegEx(re.ir)
std\regex.d(6460):        called from here: ctGenRegExCode(Regex(null,
[Bytecode(2147483745u), Bytecode(2634022914u), Bytecode(1u), Bytecode(1u),
Bytecode(2147483746u), Bytecode(2147483747u), Bytecode(2650800130u),
Bytecode(2147483746u), B
tecode(2550136832u)], null, 1u, 0u, 0u, 7u, 0u, null, null,
ShiftOr([4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4
94967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967
95u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u,
294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
429496
295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967294u, 4294967293u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
42949
7295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u
 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294
67295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295
, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
429
967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
429496729
u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 42
4967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
42949672
5u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u, 4294967295u,
4294967295u, 4
94967295u, 4294967295u, 4294967295u], 97u, 2u)))
std\regex.d(6484): Error: template instance std.regex.ctRegexImpl!("a(?<=bc)b",
[]) error instantiating
test_reg.d(20):        instantiated from here: ctRegex!"a(?<=bc)b"
test_reg.d(20): Error: template instance std.regex.ctRegex!"a(?<=bc)b" error
instantiating

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 15, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10781


Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei@erdani.com
         AssignedTo|nobody@puremagic.com        |dmitry.olsh@gmail.com
           Severity|normal                      |blocker


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 07, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10781


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from Dmitry Olshansky <dmitry.olsh@gmail.com> 2013-09-07 15:33:02 PDT ---
Should no longer hit this horrible error message as all of features are handled by ctRegex.

I'll open a separate entry on CTFE unhandled exception pretty printing.

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