github的一些开源项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1074 lines
30 KiB

  1. # There are two sorts of patterns in this test. A number of them are
  2. # representative patterns whose lengths and offsets are checked. This is just a
  3. # doublecheck test to ensure the sizes don't go horribly wrong when something
  4. # is changed. The operation of these patterns is checked in other tests.
  5. #
  6. # This file also contains tests whose output varies with code unit size and/or
  7. # link size. Unicode support is required for these tests. There are separate
  8. # output files for each code unit size and link size.
  9. #pattern fullbincode,memory
  10. /((?i)b)/
  11. Memory allocation - compiled block : 184
  12. Memory allocation - code portion : 48
  13. ------------------------------------------------------------------
  14. 0 9 Bra
  15. 2 5 CBra 1
  16. 5 /i b
  17. 7 5 Ket
  18. 9 9 Ket
  19. 11 End
  20. ------------------------------------------------------------------
  21. /(?s)(.*X|^B)/
  22. Memory allocation - compiled block : 212
  23. Memory allocation - code portion : 76
  24. ------------------------------------------------------------------
  25. 0 16 Bra
  26. 2 7 CBra 1
  27. 5 AllAny*
  28. 7 X
  29. 9 5 Alt
  30. 11 ^
  31. 12 B
  32. 14 12 Ket
  33. 16 16 Ket
  34. 18 End
  35. ------------------------------------------------------------------
  36. /(?s:.*X|^B)/
  37. Memory allocation - compiled block : 208
  38. Memory allocation - code portion : 72
  39. ------------------------------------------------------------------
  40. 0 15 Bra
  41. 2 6 Bra
  42. 4 AllAny*
  43. 6 X
  44. 8 5 Alt
  45. 10 ^
  46. 11 B
  47. 13 11 Ket
  48. 15 15 Ket
  49. 17 End
  50. ------------------------------------------------------------------
  51. /^[[:alnum:]]/
  52. Memory allocation - compiled block : 196
  53. Memory allocation - code portion : 60
  54. ------------------------------------------------------------------
  55. 0 12 Bra
  56. 2 ^
  57. 3 [0-9A-Za-z]
  58. 12 12 Ket
  59. 14 End
  60. ------------------------------------------------------------------
  61. /#/Ix
  62. Memory allocation - compiled block : 156
  63. Memory allocation - code portion : 20
  64. ------------------------------------------------------------------
  65. 0 2 Bra
  66. 2 2 Ket
  67. 4 End
  68. ------------------------------------------------------------------
  69. Capture group count = 0
  70. May match empty string
  71. Options: extended
  72. Subject length lower bound = 0
  73. /a#/Ix
  74. Memory allocation - compiled block : 164
  75. Memory allocation - code portion : 28
  76. ------------------------------------------------------------------
  77. 0 4 Bra
  78. 2 a
  79. 4 4 Ket
  80. 6 End
  81. ------------------------------------------------------------------
  82. Capture group count = 0
  83. Options: extended
  84. First code unit = 'a'
  85. Subject length lower bound = 1
  86. /x?+/
  87. Memory allocation - compiled block : 164
  88. Memory allocation - code portion : 28
  89. ------------------------------------------------------------------
  90. 0 4 Bra
  91. 2 x?+
  92. 4 4 Ket
  93. 6 End
  94. ------------------------------------------------------------------
  95. /x++/
  96. Memory allocation - compiled block : 164
  97. Memory allocation - code portion : 28
  98. ------------------------------------------------------------------
  99. 0 4 Bra
  100. 2 x++
  101. 4 4 Ket
  102. 6 End
  103. ------------------------------------------------------------------
  104. /x{1,3}+/
  105. Memory allocation - compiled block : 176
  106. Memory allocation - code portion : 40
  107. ------------------------------------------------------------------
  108. 0 7 Bra
  109. 2 x
  110. 4 x{0,2}+
  111. 7 7 Ket
  112. 9 End
  113. ------------------------------------------------------------------
  114. /(x)*+/
  115. Memory allocation - compiled block : 188
  116. Memory allocation - code portion : 52
  117. ------------------------------------------------------------------
  118. 0 10 Bra
  119. 2 Braposzero
  120. 3 5 CBraPos 1
  121. 6 x
  122. 8 5 KetRpos
  123. 10 10 Ket
  124. 12 End
  125. ------------------------------------------------------------------
  126. /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
  127. Memory allocation - compiled block : 356
  128. Memory allocation - code portion : 220
  129. ------------------------------------------------------------------
  130. 0 52 Bra
  131. 2 ^
  132. 3 47 CBra 1
  133. 6 5 CBra 2
  134. 9 a+
  135. 11 5 Ket
  136. 13 13 CBra 3
  137. 16 [ab]+?
  138. 26 13 Ket
  139. 28 13 CBra 4
  140. 31 [bc]+
  141. 41 13 Ket
  142. 43 5 CBra 5
  143. 46 \w*+
  144. 48 5 Ket
  145. 50 47 Ket
  146. 52 52 Ket
  147. 54 End
  148. ------------------------------------------------------------------
  149. "8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
  150. Memory allocation - compiled block : 3432
  151. Memory allocation - code portion : 3296
  152. ------------------------------------------------------------------
  153. 0 821 Bra
  154. 2 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
  155. 820 \b
  156. 821 821 Ket
  157. 823 End
  158. ------------------------------------------------------------------
  159. "\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b"
  160. Memory allocation - compiled block : 3392
  161. Memory allocation - code portion : 3256
  162. ------------------------------------------------------------------
  163. 0 811 Bra
  164. 2 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
  165. 810 \b
  166. 811 811 Ket
  167. 813 End
  168. ------------------------------------------------------------------
  169. /(a(?1)b)/
  170. Memory allocation - compiled block : 200
  171. Memory allocation - code portion : 64
  172. ------------------------------------------------------------------
  173. 0 13 Bra
  174. 2 9 CBra 1
  175. 5 a
  176. 7 2 Recurse
  177. 9 b
  178. 11 9 Ket
  179. 13 13 Ket
  180. 15 End
  181. ------------------------------------------------------------------
  182. /(a(?1)+b)/
  183. Memory allocation - compiled block : 216
  184. Memory allocation - code portion : 80
  185. ------------------------------------------------------------------
  186. 0 17 Bra
  187. 2 13 CBra 1
  188. 5 a
  189. 7 4 SBra
  190. 9 2 Recurse
  191. 11 4 KetRmax
  192. 13 b
  193. 15 13 Ket
  194. 17 17 Ket
  195. 19 End
  196. ------------------------------------------------------------------
  197. /a(?P<name1>b|c)d(?P<longername2>e)/
  198. Memory allocation - compiled block : 348
  199. Memory allocation - code portion : 108
  200. ------------------------------------------------------------------
  201. 0 24 Bra
  202. 2 a
  203. 4 5 CBra 1
  204. 7 b
  205. 9 4 Alt
  206. 11 c
  207. 13 9 Ket
  208. 15 d
  209. 17 5 CBra 2
  210. 20 e
  211. 22 5 Ket
  212. 24 24 Ket
  213. 26 End
  214. ------------------------------------------------------------------
  215. /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/
  216. Memory allocation - compiled block : 300
  217. Memory allocation - code portion : 128
  218. ------------------------------------------------------------------
  219. 0 29 Bra
  220. 2 18 Bra
  221. 4 a
  222. 6 12 CBra 1
  223. 9 c
  224. 11 5 CBra 2
  225. 14 d
  226. 16 5 Ket
  227. 18 12 Ket
  228. 20 18 Ket
  229. 22 5 CBra 3
  230. 25 a
  231. 27 5 Ket
  232. 29 29 Ket
  233. 31 End
  234. ------------------------------------------------------------------
  235. /(?P<a>a)...(?P=a)bbb(?P>a)d/
  236. Memory allocation - compiled block : 256
  237. Memory allocation - code portion : 108
  238. ------------------------------------------------------------------
  239. 0 24 Bra
  240. 2 5 CBra 1
  241. 5 a
  242. 7 5 Ket
  243. 9 Any
  244. 10 Any
  245. 11 Any
  246. 12 \1
  247. 14 bbb
  248. 20 2 Recurse
  249. 22 d
  250. 24 24 Ket
  251. 26 End
  252. ------------------------------------------------------------------
  253. /abc(?C255)de(?C)f/
  254. Memory allocation - compiled block : 236
  255. Memory allocation - code portion : 100
  256. ------------------------------------------------------------------
  257. 0 22 Bra
  258. 2 abc
  259. 8 Callout 255 10 1
  260. 12 de
  261. 16 Callout 0 16 1
  262. 20 f
  263. 22 22 Ket
  264. 24 End
  265. ------------------------------------------------------------------
  266. /abcde/auto_callout
  267. Memory allocation - compiled block : 292
  268. Memory allocation - code portion : 156
  269. ------------------------------------------------------------------
  270. 0 36 Bra
  271. 2 Callout 255 0 1
  272. 6 a
  273. 8 Callout 255 1 1
  274. 12 b
  275. 14 Callout 255 2 1
  276. 18 c
  277. 20 Callout 255 3 1
  278. 24 d
  279. 26 Callout 255 4 1
  280. 30 e
  281. 32 Callout 255 5 0
  282. 36 36 Ket
  283. 38 End
  284. ------------------------------------------------------------------
  285. /\x{100}/utf
  286. Memory allocation - compiled block : 164
  287. Memory allocation - code portion : 28
  288. ------------------------------------------------------------------
  289. 0 4 Bra
  290. 2 \x{100}
  291. 4 4 Ket
  292. 6 End
  293. ------------------------------------------------------------------
  294. /\x{1000}/utf
  295. Memory allocation - compiled block : 164
  296. Memory allocation - code portion : 28
  297. ------------------------------------------------------------------
  298. 0 4 Bra
  299. 2 \x{1000}
  300. 4 4 Ket
  301. 6 End
  302. ------------------------------------------------------------------
  303. /\x{10000}/utf
  304. Memory allocation - compiled block : 164
  305. Memory allocation - code portion : 28
  306. ------------------------------------------------------------------
  307. 0 4 Bra
  308. 2 \x{10000}
  309. 4 4 Ket
  310. 6 End
  311. ------------------------------------------------------------------
  312. /\x{100000}/utf
  313. Memory allocation - compiled block : 164
  314. Memory allocation - code portion : 28
  315. ------------------------------------------------------------------
  316. 0 4 Bra
  317. 2 \x{100000}
  318. 4 4 Ket
  319. 6 End
  320. ------------------------------------------------------------------
  321. /\x{10ffff}/utf
  322. Memory allocation - compiled block : 164
  323. Memory allocation - code portion : 28
  324. ------------------------------------------------------------------
  325. 0 4 Bra
  326. 2 \x{10ffff}
  327. 4 4 Ket
  328. 6 End
  329. ------------------------------------------------------------------
  330. /\x{110000}/utf
  331. Failed: error 134 at offset 9: character code point value in \x{} or \o{} is too large
  332. /[\x{ff}]/utf
  333. Memory allocation - compiled block : 164
  334. Memory allocation - code portion : 28
  335. ------------------------------------------------------------------
  336. 0 4 Bra
  337. 2 \x{ff}
  338. 4 4 Ket
  339. 6 End
  340. ------------------------------------------------------------------
  341. /[\x{100}]/utf
  342. Memory allocation - compiled block : 164
  343. Memory allocation - code portion : 28
  344. ------------------------------------------------------------------
  345. 0 4 Bra
  346. 2 \x{100}
  347. 4 4 Ket
  348. 6 End
  349. ------------------------------------------------------------------
  350. /\x80/utf
  351. Memory allocation - compiled block : 164
  352. Memory allocation - code portion : 28
  353. ------------------------------------------------------------------
  354. 0 4 Bra
  355. 2 \x{80}
  356. 4 4 Ket
  357. 6 End
  358. ------------------------------------------------------------------
  359. /\xff/utf
  360. Memory allocation - compiled block : 164
  361. Memory allocation - code portion : 28
  362. ------------------------------------------------------------------
  363. 0 4 Bra
  364. 2 \x{ff}
  365. 4 4 Ket
  366. 6 End
  367. ------------------------------------------------------------------
  368. /\x{0041}\x{2262}\x{0391}\x{002e}/I,utf
  369. Memory allocation - compiled block : 188
  370. Memory allocation - code portion : 52
  371. ------------------------------------------------------------------
  372. 0 10 Bra
  373. 2 A\x{2262}\x{391}.
  374. 10 10 Ket
  375. 12 End
  376. ------------------------------------------------------------------
  377. Capture group count = 0
  378. Options: utf
  379. First code unit = 'A'
  380. Last code unit = '.'
  381. Subject length lower bound = 4
  382. /\x{D55c}\x{ad6d}\x{C5B4}/I,utf
  383. Memory allocation - compiled block : 180
  384. Memory allocation - code portion : 44
  385. ------------------------------------------------------------------
  386. 0 8 Bra
  387. 2 \x{d55c}\x{ad6d}\x{c5b4}
  388. 8 8 Ket
  389. 10 End
  390. ------------------------------------------------------------------
  391. Capture group count = 0
  392. Options: utf
  393. First code unit = \x{d55c}
  394. Last code unit = \x{c5b4}
  395. Subject length lower bound = 3
  396. /\x{65e5}\x{672c}\x{8a9e}/I,utf
  397. Memory allocation - compiled block : 180
  398. Memory allocation - code portion : 44
  399. ------------------------------------------------------------------
  400. 0 8 Bra
  401. 2 \x{65e5}\x{672c}\x{8a9e}
  402. 8 8 Ket
  403. 10 End
  404. ------------------------------------------------------------------
  405. Capture group count = 0
  406. Options: utf
  407. First code unit = \x{65e5}
  408. Last code unit = \x{8a9e}
  409. Subject length lower bound = 3
  410. /[\x{100}]/utf
  411. Memory allocation - compiled block : 164
  412. Memory allocation - code portion : 28
  413. ------------------------------------------------------------------
  414. 0 4 Bra
  415. 2 \x{100}
  416. 4 4 Ket
  417. 6 End
  418. ------------------------------------------------------------------
  419. /[Z\x{100}]/utf
  420. Memory allocation - compiled block : 212
  421. Memory allocation - code portion : 76
  422. ------------------------------------------------------------------
  423. 0 16 Bra
  424. 2 [Z\x{100}]
  425. 16 16 Ket
  426. 18 End
  427. ------------------------------------------------------------------
  428. /^[\x{100}\E-\Q\E\x{150}]/utf
  429. Memory allocation - compiled block : 188
  430. Memory allocation - code portion : 52
  431. ------------------------------------------------------------------
  432. 0 10 Bra
  433. 2 ^
  434. 3 [\x{100}-\x{150}]
  435. 10 10 Ket
  436. 12 End
  437. ------------------------------------------------------------------
  438. /^[\QĀ\E-\QŐ\E]/utf
  439. Memory allocation - compiled block : 188
  440. Memory allocation - code portion : 52
  441. ------------------------------------------------------------------
  442. 0 10 Bra
  443. 2 ^
  444. 3 [\x{100}-\x{150}]
  445. 10 10 Ket
  446. 12 End
  447. ------------------------------------------------------------------
  448. /^[\QĀ\E-\QŐ\E/utf
  449. Failed: error 106 at offset 13: missing terminating ] for character class
  450. /[\p{L}]/
  451. Memory allocation - compiled block : 184
  452. Memory allocation - code portion : 48
  453. ------------------------------------------------------------------
  454. 0 9 Bra
  455. 2 [\p{L}]
  456. 9 9 Ket
  457. 11 End
  458. ------------------------------------------------------------------
  459. /[\p{^L}]/
  460. Memory allocation - compiled block : 184
  461. Memory allocation - code portion : 48
  462. ------------------------------------------------------------------
  463. 0 9 Bra
  464. 2 [\P{L}]
  465. 9 9 Ket
  466. 11 End
  467. ------------------------------------------------------------------
  468. /[\P{L}]/
  469. Memory allocation - compiled block : 184
  470. Memory allocation - code portion : 48
  471. ------------------------------------------------------------------
  472. 0 9 Bra
  473. 2 [\P{L}]
  474. 9 9 Ket
  475. 11 End
  476. ------------------------------------------------------------------
  477. /[\P{^L}]/
  478. Memory allocation - compiled block : 184
  479. Memory allocation - code portion : 48
  480. ------------------------------------------------------------------
  481. 0 9 Bra
  482. 2 [\p{L}]
  483. 9 9 Ket
  484. 11 End
  485. ------------------------------------------------------------------
  486. /[abc\p{L}\x{0660}]/utf
  487. Memory allocation - compiled block : 224
  488. Memory allocation - code portion : 88
  489. ------------------------------------------------------------------
  490. 0 19 Bra
  491. 2 [a-c\p{L}\x{660}]
  492. 19 19 Ket
  493. 21 End
  494. ------------------------------------------------------------------
  495. /[\p{Nd}]/utf
  496. Memory allocation - compiled block : 184
  497. Memory allocation - code portion : 48
  498. ------------------------------------------------------------------
  499. 0 9 Bra
  500. 2 [\p{Nd}]
  501. 9 9 Ket
  502. 11 End
  503. ------------------------------------------------------------------
  504. /[\p{Nd}+-]+/utf
  505. Memory allocation - compiled block : 220
  506. Memory allocation - code portion : 84
  507. ------------------------------------------------------------------
  508. 0 18 Bra
  509. 2 [+\-\p{Nd}]++
  510. 18 18 Ket
  511. 20 End
  512. ------------------------------------------------------------------
  513. /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
  514. Memory allocation - compiled block : 196
  515. Memory allocation - code portion : 60
  516. ------------------------------------------------------------------
  517. 0 12 Bra
  518. 2 /i A\x{391}\x{10427}\x{ff3a}\x{1fb0}
  519. 12 12 Ket
  520. 14 End
  521. ------------------------------------------------------------------
  522. /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
  523. Memory allocation - compiled block : 196
  524. Memory allocation - code portion : 60
  525. ------------------------------------------------------------------
  526. 0 12 Bra
  527. 2 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
  528. 12 12 Ket
  529. 14 End
  530. ------------------------------------------------------------------
  531. /[\x{105}-\x{109}]/i,utf
  532. Memory allocation - compiled block : 184
  533. Memory allocation - code portion : 48
  534. ------------------------------------------------------------------
  535. 0 9 Bra
  536. 2 [\x{104}-\x{109}]
  537. 9 9 Ket
  538. 11 End
  539. ------------------------------------------------------------------
  540. /( ( (?(1)0|) )* )/x
  541. Memory allocation - compiled block : 240
  542. Memory allocation - code portion : 104
  543. ------------------------------------------------------------------
  544. 0 23 Bra
  545. 2 19 CBra 1
  546. 5 Brazero
  547. 6 13 SCBra 2
  548. 9 6 Cond
  549. 11 1 Cond ref
  550. 13 0
  551. 15 2 Alt
  552. 17 8 Ket
  553. 19 13 KetRmax
  554. 21 19 Ket
  555. 23 23 Ket
  556. 25 End
  557. ------------------------------------------------------------------
  558. /( (?(1)0|)* )/x
  559. Memory allocation - compiled block : 220
  560. Memory allocation - code portion : 84
  561. ------------------------------------------------------------------
  562. 0 18 Bra
  563. 2 14 CBra 1
  564. 5 Brazero
  565. 6 6 SCond
  566. 8 1 Cond ref
  567. 10 0
  568. 12 2 Alt
  569. 14 8 KetRmax
  570. 16 14 Ket
  571. 18 18 Ket
  572. 20 End
  573. ------------------------------------------------------------------
  574. /[a]/
  575. Memory allocation - compiled block : 164
  576. Memory allocation - code portion : 28
  577. ------------------------------------------------------------------
  578. 0 4 Bra
  579. 2 a
  580. 4 4 Ket
  581. 6 End
  582. ------------------------------------------------------------------
  583. /[a]/utf
  584. Memory allocation - compiled block : 164
  585. Memory allocation - code portion : 28
  586. ------------------------------------------------------------------
  587. 0 4 Bra
  588. 2 a
  589. 4 4 Ket
  590. 6 End
  591. ------------------------------------------------------------------
  592. /[\xaa]/
  593. Memory allocation - compiled block : 164
  594. Memory allocation - code portion : 28
  595. ------------------------------------------------------------------
  596. 0 4 Bra
  597. 2 \x{aa}
  598. 4 4 Ket
  599. 6 End
  600. ------------------------------------------------------------------
  601. /[\xaa]/utf
  602. Memory allocation - compiled block : 164
  603. Memory allocation - code portion : 28
  604. ------------------------------------------------------------------
  605. 0 4 Bra
  606. 2 \x{aa}
  607. 4 4 Ket
  608. 6 End
  609. ------------------------------------------------------------------
  610. /[^a]/
  611. Memory allocation - compiled block : 164
  612. Memory allocation - code portion : 28
  613. ------------------------------------------------------------------
  614. 0 4 Bra
  615. 2 [^a]
  616. 4 4 Ket
  617. 6 End
  618. ------------------------------------------------------------------
  619. /[^a]/utf
  620. Memory allocation - compiled block : 164
  621. Memory allocation - code portion : 28
  622. ------------------------------------------------------------------
  623. 0 4 Bra
  624. 2 [^a]
  625. 4 4 Ket
  626. 6 End
  627. ------------------------------------------------------------------
  628. /[^\xaa]/
  629. Memory allocation - compiled block : 164
  630. Memory allocation - code portion : 28
  631. ------------------------------------------------------------------
  632. 0 4 Bra
  633. 2 [^\x{aa}]
  634. 4 4 Ket
  635. 6 End
  636. ------------------------------------------------------------------
  637. /[^\xaa]/utf
  638. Memory allocation - compiled block : 164
  639. Memory allocation - code portion : 28
  640. ------------------------------------------------------------------
  641. 0 4 Bra
  642. 2 [^\x{aa}]
  643. 4 4 Ket
  644. 6 End
  645. ------------------------------------------------------------------
  646. #pattern -memory
  647. /[^\d]/utf,ucp
  648. ------------------------------------------------------------------
  649. 0 9 Bra
  650. 2 [^\p{Nd}]
  651. 9 9 Ket
  652. 11 End
  653. ------------------------------------------------------------------
  654. /[[:^alpha:][:^cntrl:]]+/utf,ucp
  655. ------------------------------------------------------------------
  656. 0 13 Bra
  657. 2 [\P{L}\P{Cc}]++
  658. 13 13 Ket
  659. 15 End
  660. ------------------------------------------------------------------
  661. /[[:^cntrl:][:^alpha:]]+/utf,ucp
  662. ------------------------------------------------------------------
  663. 0 13 Bra
  664. 2 [\P{Cc}\P{L}]++
  665. 13 13 Ket
  666. 15 End
  667. ------------------------------------------------------------------
  668. /[[:alpha:]]+/utf,ucp
  669. ------------------------------------------------------------------
  670. 0 10 Bra
  671. 2 [\p{L}]++
  672. 10 10 Ket
  673. 12 End
  674. ------------------------------------------------------------------
  675. /[[:^alpha:]\S]+/utf,ucp
  676. ------------------------------------------------------------------
  677. 0 13 Bra
  678. 2 [\P{L}\P{Xsp}]++
  679. 13 13 Ket
  680. 15 End
  681. ------------------------------------------------------------------
  682. /abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/
  683. ------------------------------------------------------------------
  684. 0 60 Bra
  685. 2 abc
  686. 8 5 CBra 1
  687. 11 d
  688. 13 4 Alt
  689. 15 e
  690. 17 9 Ket
  691. 19 *THEN
  692. 20 x
  693. 22 12 CBra 2
  694. 25 123
  695. 31 *THEN
  696. 32 4
  697. 34 24 Alt
  698. 36 567
  699. 42 5 CBra 3
  700. 45 b
  701. 47 4 Alt
  702. 49 q
  703. 51 9 Ket
  704. 53 *THEN
  705. 54 xx
  706. 58 36 Ket
  707. 60 60 Ket
  708. 62 End
  709. ------------------------------------------------------------------
  710. /(((a\2)|(a*)\g<-1>))*a?/
  711. ------------------------------------------------------------------
  712. 0 35 Bra
  713. 2 Brazero
  714. 3 28 SCBra 1
  715. 6 12 CBra 2
  716. 9 7 CBra 3
  717. 12 a
  718. 14 \2
  719. 16 7 Ket
  720. 18 11 Alt
  721. 20 5 CBra 4
  722. 23 a*
  723. 25 5 Ket
  724. 27 20 Recurse
  725. 29 23 Ket
  726. 31 28 KetRmax
  727. 33 a?+
  728. 35 35 Ket
  729. 37 End
  730. ------------------------------------------------------------------
  731. /((?+1)(\1))/
  732. ------------------------------------------------------------------
  733. 0 16 Bra
  734. 2 12 CBra 1
  735. 5 7 Recurse
  736. 7 5 CBra 2
  737. 10 \1
  738. 12 5 Ket
  739. 14 12 Ket
  740. 16 16 Ket
  741. 18 End
  742. ------------------------------------------------------------------
  743. "(?1)(?#?'){2}(a)"
  744. ------------------------------------------------------------------
  745. 0 13 Bra
  746. 2 6 Recurse
  747. 4 6 Recurse
  748. 6 5 CBra 1
  749. 9 a
  750. 11 5 Ket
  751. 13 13 Ket
  752. 15 End
  753. ------------------------------------------------------------------
  754. /.((?2)(?R)|\1|$)()/
  755. ------------------------------------------------------------------
  756. 0 24 Bra
  757. 2 Any
  758. 3 7 CBra 1
  759. 6 19 Recurse
  760. 8 0 Recurse
  761. 10 4 Alt
  762. 12 \1
  763. 14 3 Alt
  764. 16 $
  765. 17 14 Ket
  766. 19 3 CBra 2
  767. 22 3 Ket
  768. 24 24 Ket
  769. 26 End
  770. ------------------------------------------------------------------
  771. /.((?3)(?R)()(?2)|\1|$)()/
  772. ------------------------------------------------------------------
  773. 0 31 Bra
  774. 2 Any
  775. 3 14 CBra 1
  776. 6 26 Recurse
  777. 8 0 Recurse
  778. 10 3 CBra 2
  779. 13 3 Ket
  780. 15 10 Recurse
  781. 17 4 Alt
  782. 19 \1
  783. 21 3 Alt
  784. 23 $
  785. 24 21 Ket
  786. 26 3 CBra 3
  787. 29 3 Ket
  788. 31 31 Ket
  789. 33 End
  790. ------------------------------------------------------------------
  791. /(?1)()((((((\1++))\x85)+)|))/
  792. ------------------------------------------------------------------
  793. 0 50 Bra
  794. 2 4 Recurse
  795. 4 3 CBra 1
  796. 7 3 Ket
  797. 9 39 CBra 2
  798. 12 32 CBra 3
  799. 15 27 CBra 4
  800. 18 22 CBra 5
  801. 21 15 CBra 6
  802. 24 10 CBra 7
  803. 27 5 Once
  804. 29 \1+
  805. 32 5 Ket
  806. 34 10 Ket
  807. 36 15 Ket
  808. 38 \x{85}
  809. 40 22 KetRmax
  810. 42 27 Ket
  811. 44 2 Alt
  812. 46 34 Ket
  813. 48 39 Ket
  814. 50 50 Ket
  815. 52 End
  816. ------------------------------------------------------------------
  817. # Check the absolute limit on nesting (?| etc. This varies with code unit
  818. # width because the workspace is a different number of bytes. It will fail
  819. # with link size 2 in 8-bit and 16-bit but not in 32-bit.
  820. /(?|(?|(?J:(?|(?x:(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|(?|
  821. )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
  822. /parens_nest_limit=1000,-fullbincode
  823. # Use "expand" to create some very long patterns with nested parentheses, in
  824. # order to test workspace overflow. Again, this varies with code unit width,
  825. # and even when it fails in two modes, the error offset differs. It also varies
  826. # with link size - hence multiple tests with different values.
  827. /(?'ABC'\[[bar](]{792}*THEN:\[A]{255}\[)]{793}/expand,-fullbincode,parens_nest_limit=1000
  828. /(?'ABC'\[[bar](]{793}*THEN:\[A]{255}\[)]{794}/expand,-fullbincode,parens_nest_limit=1000
  829. /(?'ABC'\[[bar](]{1793}*THEN:\[A]{255}\[)]{1794}/expand,-fullbincode,parens_nest_limit=2000
  830. Failed: error 186 at offset 12820: regular expression is too complicated
  831. /(?(1)(?1)){8,}+()/debug
  832. ------------------------------------------------------------------
  833. 0 79 Bra
  834. 2 70 Once
  835. 4 6 Cond
  836. 6 1 Cond ref
  837. 8 74 Recurse
  838. 10 6 Ket
  839. 12 6 Cond
  840. 14 1 Cond ref
  841. 16 74 Recurse
  842. 18 6 Ket
  843. 20 6 Cond
  844. 22 1 Cond ref
  845. 24 74 Recurse
  846. 26 6 Ket
  847. 28 6 Cond
  848. 30 1 Cond ref
  849. 32 74 Recurse
  850. 34 6 Ket
  851. 36 6 Cond
  852. 38 1 Cond ref
  853. 40 74 Recurse
  854. 42 6 Ket
  855. 44 6 Cond
  856. 46 1 Cond ref
  857. 48 74 Recurse
  858. 50 6 Ket
  859. 52 6 Cond
  860. 54 1 Cond ref
  861. 56 74 Recurse
  862. 58 6 Ket
  863. 60 10 SBraPos
  864. 62 6 SCond
  865. 64 1 Cond ref
  866. 66 74 Recurse
  867. 68 6 Ket
  868. 70 10 KetRpos
  869. 72 70 Ket
  870. 74 3 CBra 1
  871. 77 3 Ket
  872. 79 79 Ket
  873. 81 End
  874. ------------------------------------------------------------------
  875. Capture group count = 1
  876. Max back reference = 1
  877. May match empty string
  878. Subject length lower bound = 0
  879. abcd
  880. 0:
  881. 1:
  882. /(?(1)|a(?1)b){2,}+()/debug
  883. ------------------------------------------------------------------
  884. 0 43 Bra
  885. 2 34 Once
  886. 4 4 Cond
  887. 6 1 Cond ref
  888. 8 8 Alt
  889. 10 a
  890. 12 38 Recurse
  891. 14 b
  892. 16 12 Ket
  893. 18 16 SBraPos
  894. 20 4 SCond
  895. 22 1 Cond ref
  896. 24 8 Alt
  897. 26 a
  898. 28 38 Recurse
  899. 30 b
  900. 32 12 Ket
  901. 34 16 KetRpos
  902. 36 34 Ket
  903. 38 3 CBra 1
  904. 41 3 Ket
  905. 43 43 Ket
  906. 45 End
  907. ------------------------------------------------------------------
  908. Capture group count = 1
  909. Max back reference = 1
  910. May match empty string
  911. Subject length lower bound = 0
  912. abcde
  913. No match
  914. /((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug
  915. ------------------------------------------------------------------
  916. 0 133 Bra
  917. 2 41 CBra 1
  918. 5 2 Recurse
  919. 7 88 Recurse
  920. 9 93 Recurse
  921. 11 98 Recurse
  922. 13 103 Recurse
  923. 15 108 Recurse
  924. 17 113 Recurse
  925. 19 118 Recurse
  926. 21 123 Recurse
  927. 23 123 Recurse
  928. 25 118 Recurse
  929. 27 113 Recurse
  930. 29 108 Recurse
  931. 31 103 Recurse
  932. 33 98 Recurse
  933. 35 93 Recurse
  934. 37 88 Recurse
  935. 39 2 Recurse
  936. 41 0 Recurse
  937. 43 41 Ket
  938. 45 41 SCBra 1
  939. 48 2 Recurse
  940. 50 88 Recurse
  941. 52 93 Recurse
  942. 54 98 Recurse
  943. 56 103 Recurse
  944. 58 108 Recurse
  945. 60 113 Recurse
  946. 62 118 Recurse
  947. 64 123 Recurse
  948. 66 123 Recurse
  949. 68 118 Recurse
  950. 70 113 Recurse
  951. 72 108 Recurse
  952. 74 103 Recurse
  953. 76 98 Recurse
  954. 78 93 Recurse
  955. 80 88 Recurse
  956. 82 2 Recurse
  957. 84 0 Recurse
  958. 86 41 KetRmax
  959. 88 3 CBra 2
  960. 91 3 Ket
  961. 93 3 CBra 3
  962. 96 3 Ket
  963. 98 3 CBra 4
  964. 101 3 Ket
  965. 103 3 CBra 5
  966. 106 3 Ket
  967. 108 3 CBra 6
  968. 111 3 Ket
  969. 113 3 CBra 7
  970. 116 3 Ket
  971. 118 3 CBra 8
  972. 121 3 Ket
  973. 123 3 CBra 9
  974. 126 3 Ket
  975. 128 3 CBra 10
  976. 131 3 Ket
  977. 133 133 Ket
  978. 135 End
  979. ------------------------------------------------------------------
  980. Capture group count = 10
  981. May match empty string
  982. Subject length lower bound = 0
  983. /([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
  984. Failed: error 114 at offset 509: missing closing parenthesis
  985. /([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))/-fullbincode
  986. #pattern -fullbincode
  987. /\[()]{65535}/expand
  988. # End of testinput8