X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=pcre3.git;a=blobdiff_plain;f=testdata%2Ftestoutput2;h=85c565d1326efa9ab0eff30a4fadf14e7aa17b33;hp=16e5c6804af3955552b52d76d5f3b068d6156ddb;hb=50aa7778a6bb8b81a9e03e8744f797362183772e;hpb=36d56c1e13c6d0159d44a9c1c93a610d0981bc06 diff --git a/testdata/testoutput2 b/testdata/testoutput2 index 16e5c68..85c565d 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -561,7 +561,7 @@ Failed: assertion expected after (?( at offset 3 Failed: reference to non-existent subpattern at offset 7 /(?(?testsavedregex +Compiled pattern written to testsavedregex +Study data written to testsavedregex + /abc/IS>testsavedregex Capturing subpattern count = 0 No options @@ -6336,6 +6349,7 @@ No need char /^(?Pa)?(?(A)a|b)/I Capturing subpattern count = 1 +Max back reference = 1 Named capturing subpatterns: A 1 Options: anchored @@ -6353,6 +6367,7 @@ No match /(?:(?(ZZ)a|b)(?PX))+/I Capturing subpattern count = 1 +Max back reference = 1 Named capturing subpatterns: ZZ 1 No options @@ -6370,6 +6385,7 @@ Failed: reference to non-existent subpattern at offset 9 /(?:(?(ZZ)a|b)(?(ZZ)a|b)(?PX))+/I Capturing subpattern count = 1 +Max back reference = 1 Named capturing subpatterns: ZZ 1 No options @@ -6381,6 +6397,7 @@ Need char = 'X' /(?:(?(ZZ)a|\(b\))\\(?PX))+/I Capturing subpattern count = 1 +Max back reference = 1 Named capturing subpatterns: ZZ 1 No options @@ -9118,10 +9135,10 @@ Failed: subpattern name expected at offset 3 Failed: subpattern name expected at offset 3 /\k/ -Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 2 +Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 1 /\kabc/ -Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 5 +Failed: \k is not followed by a braced, angle-bracketed, or quoted name at offset 1 /(?P=)/ Failed: subpattern name expected at offset 4 @@ -9169,7 +9186,7 @@ Failed: unknown POSIX class name at offset 6 Failed: unknown POSIX class name at offset 3 /(^(a|b\g<-1'c))/ -Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15 +Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 8 /^(?+1)(?x|y){0}z/ xzxx @@ -10226,6 +10243,7 @@ No starting char list (?(1)|.) # check that there was an empty component /xiIS Capturing subpattern count = 1 +Max back reference = 1 Options: anchored caseless extended No first char Need char = ':' @@ -10255,6 +10273,7 @@ Failed: different names for subpatterns of the same number are not allowed at of b(? (?')|(?")) ) (?('quote')[a-z]+|[0-9]+)/JIx Capturing subpattern count = 6 +Max back reference = 1 Named capturing subpatterns: apostrophe 2 apostrophe 5 @@ -10317,6 +10336,7 @@ No match End ------------------------------------------------------------------ Capturing subpattern count = 4 +Max back reference = 4 Named capturing subpatterns: D 4 D 1 @@ -10364,6 +10384,7 @@ No match End ------------------------------------------------------------------ Capturing subpattern count = 4 +Max back reference = 1 Named capturing subpatterns: A 1 A 4 @@ -10486,6 +10507,7 @@ No starting char list /()i(?(1)a)/SI Capturing subpattern count = 1 +Max back reference = 1 No options No first char Need char = 'i' @@ -14076,10 +14098,10 @@ Failed: group name must start with a non-digit at offset 3 Failed: group name must start with a non-digit at offset 4 /\g'3gh'/ -Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 7 +Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 2 /\g<5fg>/ -Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 7 +Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 2 /(?(<4gh>)abc)/ Failed: group name must start with a non-digit at offset 4 @@ -14173,6 +14195,131 @@ Failed: parentheses are too deeply nested (stack check) at offset 0 /(((((a)))))/Q ** Missing 0 or 1 after /Q +/^\w+(?>\s*)(?<=\w)/BZ +------------------------------------------------------------------ + Bra + ^ + \w+ + Once_NC + \s*+ + Ket + AssertB + Reverse + \w + Ket + Ket + End +------------------------------------------------------------------ + +/\othing/ +Failed: missing opening brace after \o at offset 1 + +/\o{}/ +Failed: digits missing in \x{} or \o{} at offset 1 + +/\o{whatever}/ +Failed: non-octal character in \o{} (closing brace missing?) at offset 3 + +/\xthing/ + +/\x{}/ +Failed: digits missing in \x{} or \o{} at offset 3 + +/\x{whatever}/ +Failed: non-hex character in \x{} (closing brace missing?) at offset 3 + +"((?=(?(?=(?(?=(?(?=()))))))))" + a + 0: + 1: + 2: + +"(?(?=)==)(((((((((?=)))))))))" + a +No match + +/^(?:(a)|b)(?(1)A|B)/I +Capturing subpattern count = 1 +Max back reference = 1 +Options: anchored +No first char +No need char + aA123\O3 +Matched, but too many substrings + 0: aA + aA123\O6 + 0: aA + 1: a + +'^(?:(?a)|b)(?()A|B)' + aA123\O3 +Matched, but too many substrings + 0: aA + aA123\O6 + 0: aA + 1: a + +'^(?)(?:(?a)|b)(?()A|B)'J + aA123\O3 +Matched, but too many substrings + 0: aA + aA123\O6 +Matched, but too many substrings + 0: aA + 1: + +'^(?:(?X)|)(?:(?a)|b)\k{AA}'J + aa123\O3 +Matched, but too many substrings + 0: aa + aa123\O6 +Matched, but too many substrings + 0: aa + 1: + +/(?(?J)(?1(111111)11|)1|1|)(?()1)/ + +/(?(?=0)?)+/ +Failed: nothing to repeat at offset 7 + +/(?(?=0)(?=00)?00765)/ + 00765 + 0: 00765 + +/(?(?=0)(?=00)?00765|(?!3).56)/ + 00765 + 0: 00765 + 456 + 0: 456 + ** Failers +No match + 356 +No match + +'^(a)*+(\w)' + g + 0: g + 1: + 2: g + g\O3 +Matched, but too many substrings + 0: g + +'^(?:a)*+(\w)' + g + 0: g + 1: g + g\O3 +Matched, but too many substrings + 0: g + +//C + \O\C+ +Callout 255: last capture = -1 +---> + +0 ^ +Matched, but too many substrings + "((?2){0,1999}())?" /((?+1)(\1))/BZ @@ -14190,6 +14337,241 @@ Failed: parentheses are too deeply nested (stack check) at offset 0 End ------------------------------------------------------------------ +/(?(?!)a|b)/ + bbb + 0: b + aaa +No match + +"((?2)+)((?1))" + +"(?(?.*!.*)?)" +Failed: assertion expected after (?( at offset 3 + +"X((?2)()*+){2}+"BZ +------------------------------------------------------------------ + Bra + X + Once + CBra 1 + Recurse + Braposzero + SCBraPos 2 + KetRpos + Ket + CBra 1 + Recurse + Braposzero + SCBraPos 2 + KetRpos + Ket + Ket + Ket + End +------------------------------------------------------------------ + +"X((?2)()*+){2}"BZ +------------------------------------------------------------------ + Bra + X + CBra 1 + Recurse + Braposzero + SCBraPos 2 + KetRpos + Ket + CBra 1 + Recurse + Braposzero + SCBraPos 2 + KetRpos + Ket + Ket + End +------------------------------------------------------------------ + +"(?<=((?2))((?1)))" +Failed: lookbehind assertion is not fixed length at offset 17 + +/(?<=\Ka)/g+ + aaaaa + 0: a + 0+ aaaa + 0: a + 0+ aaaa + 0: a + 0+ aaa + 0: a + 0+ aa + 0: a + 0+ a + 0: a + 0+ + +/(?<=\Ka)/G+ + aaaaa + 0: a + 0+ aaaa + 0: a + 0+ aaa + 0: a + 0+ aa + 0: a + 0+ a + 0: a + 0+ + +/((?2){73}(?2))((?1))/ + +/.((?2)(?R)\1)()/BZ +------------------------------------------------------------------ + Bra + Any + Once + CBra 1 + Recurse + Recurse + \1 + Ket + Ket + CBra 2 + Ket + Ket + End +------------------------------------------------------------------ + +/(?1)()((((((\1++))\x85)+)|))/ + +/(\9*+(?2);\3++()2|)++{/ +Failed: reference to non-existent subpattern at offset 22 + +/\V\x85\9*+((?2)\3++()2)*:2/ +Failed: reference to non-existent subpattern at offset 26 + +/(((?(R)){0,2}) (?''((?'R')((?'R')))))/J + +/(((?(X)){0,2}) (?''((?'X')((?'X')))))/J + +/(((?(R)){0,2}) (?''((?'X')((?'R')))))/ + "(?J)(?'d'(?'d'\g{d}))" +".*?\h.+.\.+\R*?\xd(?i)(?=!(?=b`b`b`\`b\xa9b!)`\a`bbbbbbbbbbbbb`bbbbbbbbbbbb*R\x85bbbbbbb\C?{((?2)(?))(( +\H){8(?<=(?1){29}\xa8bbbb\x16\xd\xc6^($(?1)/ + +/a[[:punct:]b]/BZ +------------------------------------------------------------------ + Bra + a + [!-/:-@[-`b{-~] + Ket + End +------------------------------------------------------------------ + /-- End of testinput2 --/