[Issue 7045] AssertError in std.regex on line 1573

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 1 17:23:57 PST 2011


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


Trass3r <mrmocool at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrmocool at gmx.de


--- Comment #2 from Trass3r <mrmocool at gmx.de> 2011-12-01 17:22:52 PST ---
Why so complicated?

import std.regex;
void main()
{
    auto pattern =
regex(r"^(import|file|binary|config)\s+([^\(]+)\(?([^\)]*)\)?\s*$");
}

Taken from rdmd.

It fails cause it rejects \(
I suggest to turn line 1573 of regex.d (after case State.Escape:
switch(current))
into 'assert(0, "Unsupported escape character \\"~cast(char)current);' so one
gets a proper error message.

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