[Issue 10781] ctRegex! throws a huge error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 11 13:45:01 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10781


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

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


--- Comment #1 from Dmitry Olshansky <dmitry.olsh at 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: -------


More information about the Digitalmars-d-bugs mailing list