summaryrefslogtreecommitdiff
path: root/testdata/testoutput15
blob: 8c5985d066c8dbcf4d69eb151b6702c89f821a96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# These are:
#
# (1) Tests of the match-limiting features. The results are different for
# interpretive or JIT matching, so this test should not be run with JIT. The
# same tests are run using JIT in test 17.

# (2) Other tests that must not be run with JIT.

/(a+)*zz/I
Capturing subpattern count = 1
Starting code units: a z 
Last code unit = 'z'
Subject length lower bound = 2
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\=find_limits
Minimum match limit = 8
Minimum recursion limit = 6
 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  aaaaaaaaaaaaaz\=find_limits
Minimum match limit = 32768
Minimum recursion limit = 29
No match

!((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)!I
Capturing subpattern count = 1
May match empty string
Subject length lower bound = 0
   /* this is a C style comment */\=find_limits
Minimum match limit = 120
Minimum recursion limit = 6
 0: /* this is a C style comment */
 1: /* this is a C style comment */

/^(?>a)++/
    aa\=find_limits
Minimum match limit = 5
Minimum recursion limit = 2
 0: aa
    aaaaaaaaa\=find_limits
Minimum match limit = 12
Minimum recursion limit = 2
 0: aaaaaaaaa
    
/(a)(?1)++/
    aa\=find_limits
Minimum match limit = 7
Minimum recursion limit = 4
 0: aa
 1: a
    aaaaaaaaa\=find_limits
Minimum match limit = 21
Minimum recursion limit = 4
 0: aaaaaaaaa
 1: a

/a(?:.)*?a/ims
    abbbbbbbbbbbbbbbbbbbbba\=find_limits
Minimum match limit = 65
Minimum recursion limit = 2
 0: abbbbbbbbbbbbbbbbbbbbba
    
/a(?:.(*THEN))*?a/ims
    abbbbbbbbbbbbbbbbbbbbba\=find_limits
Minimum match limit = 86
Minimum recursion limit = 45
 0: abbbbbbbbbbbbbbbbbbbbba

/a(?:.(*THEN:ABC))*?a/ims
    abbbbbbbbbbbbbbbbbbbbba\=find_limits
Minimum match limit = 86
Minimum recursion limit = 45
 0: abbbbbbbbbbbbbbbbbbbbba

/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
     aabbccddee\=find_limits
Minimum match limit = 7
Minimum recursion limit = 2
 0: aabbccddee

/^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
     aabbccddee\=find_limits
Minimum match limit = 17
Minimum recursion limit = 16
 0: aabbccddee
 1: aa
 2: bb
 3: cc
 4: dd
 5: ee

/^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
     aabbccddee\=find_limits
Minimum match limit = 13
Minimum recursion limit = 10
 0: aabbccddee
 1: aa
 2: cc
 3: ee

/(*LIMIT_MATCH=12bc)abc/
Failed: error 160 at offset 17: (*VERB) not recognized or malformed

/(*LIMIT_MATCH=4294967290)abc/
Failed: error 160 at offset 24: (*VERB) not recognized or malformed

/(*LIMIT_RECURSION=4294967280)abc/I
Capturing subpattern count = 0
Recursion limit = 4294967280
First code unit = 'a'
Last code unit = 'c'
Subject length lower bound = 3

/(a+)*zz/
    aaaaaaaaaaaaaz
No match
    aaaaaaaaaaaaaz\=match_limit=3000
Failed: error -47: match limit exceeded

/(a+)*zz/
    aaaaaaaaaaaaaz\=recursion_limit=10
Failed: error -53: recursion limit exceeded

/(*LIMIT_MATCH=3000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 3000
Starting code units: a z 
Last code unit = 'z'
Subject length lower bound = 2
    aaaaaaaaaaaaaz
Failed: error -47: match limit exceeded
    aaaaaaaaaaaaaz\=match_limit=60000
Failed: error -47: match limit exceeded

/(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 3000
Starting code units: a z 
Last code unit = 'z'
Subject length lower bound = 2
    aaaaaaaaaaaaaz
Failed: error -47: match limit exceeded

/(*LIMIT_MATCH=60000)(a+)*zz/I
Capturing subpattern count = 1
Match limit = 60000
Starting code units: a z 
Last code unit = 'z'
Subject length lower bound = 2
    aaaaaaaaaaaaaz
No match
    aaaaaaaaaaaaaz\=match_limit=3000
Failed: error -47: match limit exceeded

/(*LIMIT_RECURSION=10)(a+)*zz/I
Capturing subpattern count = 1
Recursion limit = 10
Starting code units: a z 
Last code unit = 'z'
Subject length lower bound = 2
    aaaaaaaaaaaaaz
Failed: error -53: recursion limit exceeded
    aaaaaaaaaaaaaz\=recursion_limit=1000
Failed: error -53: recursion limit exceeded

/(*LIMIT_RECURSION=10)(*LIMIT_RECURSION=1000)(a+)*zz/I
Capturing subpattern count = 1
Recursion limit = 1000
Starting code units: a z 
Last code unit = 'z'
Subject length lower bound = 2
    aaaaaaaaaaaaaz
No match

/(*LIMIT_RECURSION=1000)(a+)*zz/I
Capturing subpattern count = 1
Recursion limit = 1000
Starting code units: a z 
Last code unit = 'z'
Subject length lower bound = 2
    aaaaaaaaaaaaaz
No match
    aaaaaaaaaaaaaz\=recursion_limit=10
Failed: error -53: recursion limit exceeded
    
# These three have infinitely nested recursions. 
    
/((?2))((?1))/
    abc
Failed: error -52: nested recursion at the same subject position

/((?(R2)a+|(?1)b))()/
    aaaabcde
Failed: error -52: nested recursion at the same subject position

/(?(R)a*(?1)|((?R))b)/
    aaaabcde
Failed: error -52: nested recursion at the same subject position
    
# The allusedtext modifier does not work with JIT, which does not maintain
# the leftchar/rightchar data.

/abc(?=xyz)/allusedtext
    abcxyzpqr
 0: abcxyz
       >>>
    abcxyzpqr\=aftertext
 0: abcxyz
       >>>
 0+ xyzpqr
    
/(?<=pqr)abc(?=xyz)/allusedtext
    xyzpqrabcxyzpqr
 0: pqrabcxyz
    <<<   >>>
    xyzpqrabcxyzpqr\=aftertext
 0: pqrabcxyz
    <<<   >>>
 0+ xyzpqr
    
/a\b/
    a.\=allusedtext
 0: a.
     >
    a\=allusedtext  
 0: a

/abc\Kxyz/
    abcxyz\=allusedtext
 0: abcxyz
    <<<   

/abc(?=xyz(*ACCEPT))/
    abcxyz\=allusedtext
 0: abcxyz
       >>>

/abc(?=abcde)(?=ab)/allusedtext
    abcabcdefg
 0: abcabcde
       >>>>>
    
# These tests provoke recursion loops, which give a different error message
# when JIT is used.

/(?R)/I
Capturing subpattern count = 0
May match empty string
Subject length lower bound = 0
    abcd
Failed: error -52: nested recursion at the same subject position

/(a|(?R))/I
Capturing subpattern count = 1
May match empty string
Subject length lower bound = 0
    abcd
 0: a
 1: a
    defg 
Failed: error -52: nested recursion at the same subject position

/(ab|(bc|(de|(?R))))/I
Capturing subpattern count = 3
May match empty string
Subject length lower bound = 0
    abcd
 0: ab
 1: ab
    fghi 
Failed: error -52: nested recursion at the same subject position

/(ab|(bc|(de|(?1))))/I
Capturing subpattern count = 3
May match empty string
Subject length lower bound = 0
    abcd
 0: ab
 1: ab
    fghi 
Failed: error -52: nested recursion at the same subject position

/x(ab|(bc|(de|(?1)x)x)x)/I
Capturing subpattern count = 3
First code unit = 'x'
Subject length lower bound = 3
    xab123
 0: xab
 1: ab
    xfghi 
Failed: error -52: nested recursion at the same subject position

/(?!\w)(?R)/
    abcd
Failed: error -52: nested recursion at the same subject position
    =abc 
Failed: error -52: nested recursion at the same subject position

/(?=\w)(?R)/
    =abc 
Failed: error -52: nested recursion at the same subject position
    abcd
Failed: error -52: nested recursion at the same subject position

/(?<!\w)(?R)/
    abcd
Failed: error -52: nested recursion at the same subject position

/(?<=\w)(?R)/
    abcd
Failed: error -52: nested recursion at the same subject position

/(a+|(?R)b)/
    aaa
 0: aaa
 1: aaa
    bbb 
Failed: error -52: nested recursion at the same subject position

/[^\xff]((?1))/BI
------------------------------------------------------------------
        Bra
        [^\x{ff}]
        CBra 1
        Recurse
        Ket
        Ket
        End
------------------------------------------------------------------
Capturing subpattern count = 1
Subject length lower bound = 1
    abcd
Failed: error -52: nested recursion at the same subject position
    
# These tests don't behave the same with JIT 

/\w+(?C1)/BI,no_auto_possess
------------------------------------------------------------------
        Bra
        \w+
        Callout 1 8 0
        Ket
        End
------------------------------------------------------------------
Capturing subpattern count = 0
Options: no_auto_possess
Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P 
  Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z 
Subject length lower bound = 1
    abc\=callout_fail=1
--->abc
  1 ^  ^    
  1 ^ ^     
  1 ^^      
  1  ^ ^    
  1  ^^     
  1   ^^    
No match

/(*NO_AUTO_POSSESS)\w+(?C1)/BI
------------------------------------------------------------------
        Bra
        \w+
        Callout 1 26 0
        Ket
        End
------------------------------------------------------------------
Capturing subpattern count = 0
Compile options: <none>
Overall options: no_auto_possess
Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P 
  Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z 
Subject length lower bound = 1
    abc\=callout_fail=1
--->abc
  1 ^  ^    
  1 ^ ^     
  1 ^^      
  1  ^ ^    
  1  ^^     
  1   ^^    
No match

# End of testinput15