Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
Review: Approve The regex tests seem to now pass on my side. -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-994610 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
Validation queue job bug-994610-2012-05-08T14-42-54.852Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-994610 into lp:zorba has been updated. Status: Approved = Merged For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/bug-994610 into lp:zorba. Requested reviews: Ghislain Fourny (gislenius) Paul J. Lucas (paul-lucas) Related bugs: Bug #974477 in Zorba: Invalid regex character class not reported with ICU https://bugs.launchpad.net/zorba/+bug/974477 Bug #994610 in Zorba: Regex tests fail using latest ICU version https://bugs.launchpad.net/zorba/+bug/994610 For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 1. Added fix for [\s] -- should now always throw FORX0002. 2. I think all regex tests pass using both pre- and post-4.0 of ICU. -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/util/regex.cpp' --- src/util/regex.cpp 2012-05-03 12:31:51 + +++ src/util/regex.cpp 2012-05-04 16:10:25 + @@ -123,74 +123,104 @@ continue; } got_backslash = false; - switch ( *xq_c ) { -case 'c': // NameChar - *icu_re += [ bs_c ]; - continue; -case 'C': // [^\c] - *icu_re += [^ bs_c ]; - continue; -case 'i': // initial NameChar - *icu_re += [ bs_i ]; - continue; -case 'I': // [^\i] - *icu_re += [^ bs_i ]; - continue; -case '0': -case '1': -case '2': -case '3': -case '4': -case '5': -case '6': -case '7': -case '8': -case '9': - backref_no = *xq_c - '0'; - if ( !backref_no ) // \0 is illegal -throw INVALID_RE_EXCEPTION( xq_re, ZED( BackRef0Illegal ) ); - if ( in_char_class ) { -// -// XQuery 3.0 FO 5.6.1: Within a character class expression, -// \ followed by a digit is invalid. -// -throw INVALID_RE_EXCEPTION( - xq_re, ZED( BackRefIllegalInCharClass ) -); - } - in_backref = true; - // no break; -case '$': -case '(': -case ')': -case '*': -case '+': -case '-': -case '.': -case '?': -case 'd': // [0-9] -case 'D': // [^\d] -case 'n': // newline -case 'p': // category escape -case 'P': // [^\p] -case 'r': // carriage return -case 's': // whitespace -case 'S': // [^\s] -case 't': // tab -case 'w': // word char -case 'W': // [^\w] -case '[': -case '\\': -case ']': -case '^': -case '{': -case '|': -case '}': - *icu_re += '\\'; - break; -default: - throw INVALID_RE_EXCEPTION( xq_re, ZED( BadRegexEscape_3 ), *xq_c ); - } + + if ( in_char_class ) { +// +// When in a character class, only single-character escapes are +// permitted. +// +switch ( *xq_c ) { + case '(': + case ')': + case '*': + case '+': + case '-': + case '.': + case 'n': // newline + case 'r': // carriage return + case 't': // tab + case '[': + case '\\': + case ']': + case '^': + case '{': + case '|': + case '}': +*icu_re += '\\'; +break; + default: +throw INVALID_RE_EXCEPTION( xq_re, ZED( BadRegexEscape_3 ), *xq_c ); +} + } else { +switch ( *xq_c ) { + case 'c': // NameChar +*icu_re += [ bs_c ]; +continue; + case 'C': // [^\c] +*icu_re += [^ bs_c ]; +continue; + case 'i': // initial NameChar +*icu_re += [ bs_i ]; +continue; + case 'I': // [^\i] +*icu_re += [^ bs_i ]; +continue; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': +backref_no = *xq_c - '0'; +if ( !backref_no ) // \0 is illegal + throw INVALID_RE_EXCEPTION( xq_re, ZED( BackRef0Illegal ) ); +if ( in_char_class ) { + // + // XQuery 3.0 FO 5.6.1: Within a character class expression, + // \ followed by a digit is invalid. + // + throw INVALID_RE_EXCEPTION( +xq_re, ZED( BackRefIllegalInCharClass ) + ); +} +in_backref = true; +// no break; + case '$': + case '(': + case ')': + case '*': + case '+': + case '-': + case '.': + case '?': + case 'd': // [0-9] + case 'D': // [^\d] + case
Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
Review: Approve -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-994610 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-994610-2012-05-04T23-48-03.876Z/log.html -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
Validation queue job bug-994610-2012-05-04T23-48-03.876Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
Voting does not meet specified criteria. Required: Approve 1, Disapprove 1, Needs Fixing 1, Pending 1. Got: 1 Approve, 1 Pending. -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-994610 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-994610 into lp:zorba has been updated. Status: Approved = Needs review For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 -- https://code.launchpad.net/~paul-lucas/zorba/bug-994610/+merge/104769 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp