Guest User

Untitled

a guest
Nov 23rd, 2018
228
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [user@localhost]$ perl -e "use re 'debug'; my $s = q[I(2,3).I.I]; my $call = qr[I (?: \(\d (?:, \d)*\) )?]x; my $name = qr[ (?:$call \.)* (I) ]x; print qq(Matched $1.\n) if $s =~ m/$name/x;"
  2.  
  3. Compiling REx "I (?: \(\d (?:, \d)*\) )?"
  4. Final program:
  5. 1: EXACT <I> (3)
  6. 3: CURLYX[0]{0,1} (18)
  7. 5: EXACT <(> (7)
  8. 7: POSIXU[\d] (8)
  9. 8: CURLYM[0]{0,INFTY} (15)
  10. 10: EXACT <,> (12)
  11. 12: POSIXU[\d] (13)
  12. 13: SUCCEED (0)
  13. 14: NOTHING (15)
  14. 15: EXACT <)> (17)
  15. 17: WHILEM (0)
  16. 18: NOTHING (19)
  17. 19: END (0)
  18. anchored "I" at 0..0 (checking anchored) minlen 1
  19. Compiling REx " (?:(?^x:I (?: \(\d (?:, \d)*\) )?) \.)* (I) "
  20. synthetic stclass "ANYOF[I]".
  21. Final program:
  22. 1: CURLYX[0]{0,INFTY} (24)
  23. 3: EXACT <I> (5)
  24. 5: CURLYX[0]{0,1} (20)
  25. 7: EXACT <(> (9)
  26. 9: POSIXU[\d] (10)
  27. 10: CURLYM[0]{0,INFTY} (17)
  28. 12: EXACT <,> (14)
  29. 14: POSIXU[\d] (15)
  30. 15: SUCCEED (0)
  31. 16: NOTHING (17)
  32. 17: EXACT <)> (19)
  33. 19: WHILEM (0)
  34. 20: NOTHING (21)
  35. 21: EXACT <.> (23)
  36. 23: WHILEM[1/3] (0)
  37. 24: NOTHING (25)
  38. 25: OPEN1 (27)
  39. 27: EXACT <I> (29)
  40. 29: CLOSE1 (31)
  41. 31: END (0)
  42. floating "I" at 0..2147483647 (checking floating) stclass ANYOF[I] minlen 1
  43. Matching REx " (?:(?^x:I (?: \(\d (?:, \d)*\) )?) \.)* (I) " against "I(2,3).I.I"
  44. Intuit: trying to determine minimum start position...
  45. doing 'check' fbm scan, [0..10] gave 0
  46. Found floating substr "I" at offset 0 (rx_origin now 0)...
  47. (multiline anchor test skipped)
  48. looking for class: start_shift: 0 check_at: 0 rx_origin: 0 endpos: 1
  49. Does not contradict STCLASS...
  50. Intuit: Successfully guessed: match at offset 0
  51. Matching stclass ANYOF[I] against "I(2,3).I.I" (10 bytes)
  52. 0 <> <I(2,3).I.I> | 0| 1:CURLYX[0]{0,INFTY}(24)
  53. 0 <> <I(2,3).I.I> | 1| 23:WHILEM[1/3](0)
  54. | 1| WHILEM: matched 0 out of 0..32767
  55. 0 <> <I(2,3).I.I> | 2| 3:EXACT <I>(5)
  56. 1 <I> <(2,3).I.I> | 2| 5:CURLYX[0]{0,1}(20)
  57. 1 <I> <(2,3).I.I> | 3| 19:WHILEM(0)
  58. | 3| WHILEM: matched 0 out of 0..1
  59. 1 <I> <(2,3).I.I> | 4| 7:EXACT <(>(9)
  60. 2 <I(> <2,3).I.I> | 4| 9:POSIXU[\d](10)
  61. 3 <I(2> <,3).I.I> | 4| 10:CURLYM[0]{0,INFTY}(17)
  62. 3 <I(2> <,3).I.I> | 5| 12:EXACT <,>(14)
  63. 4 <I(2,> <3).I.I> | 5| 14:POSIXU[\d](15)
  64. 5 <I(2,3> <).I.I> | 5| 15:SUCCEED(0)
  65. | 5| SUCCEED: subpattern success...
  66. | 4| CURLYM now matched 1 times, len=2...
  67. 5 <I(2,3> <).I.I> | 5| 12:EXACT <,>(14)
  68. | 5| failed...
  69. | 4| CURLYM trying tail with matches=1...
  70. 5 <I(2,3> <).I.I> | 5| 17:EXACT <)>(19)
  71. 6 <I(2,3)> <.I.I> | 5| 19:WHILEM(0)
  72. | 5| WHILEM: matched 1 out of 0..1
  73. 6 <I(2,3)> <.I.I> | 6| 20:NOTHING(21)
  74. 6 <I(2,3)> <.I.I> | 6| 21:EXACT <.>(23)
  75. 7 <I(2,3).> <I.I> | 6| 23:WHILEM[1/3](0)
  76. | 6| WHILEM: matched 1 out of 0..32767
  77. 7 <I(2,3).> <I.I> | 7| 3:EXACT <I>(5)
  78. 8 <I(2,3).I> <.I> | 7| 5:CURLYX[0]{0,1}(20)
  79. 8 <I(2,3).I> <.I> | 8| 19:WHILEM(0)
  80. | 8| WHILEM: matched 0 out of 0..1
  81. 8 <I(2,3).I> <.I> | 9| 7:EXACT <(>(9)
  82. | 9| failed...
  83. | 8| WHILEM: failed, trying continuation...
  84. 8 <I(2,3).I> <.I> | 9| 20:NOTHING(21)
  85. 8 <I(2,3).I> <.I> | 9| 21:EXACT <.>(23)
  86. 9 <I(2,3).I.> <I> | 9| 23:WHILEM[1/3](0)
  87. | 9| WHILEM: matched 2 out of 0..32767
  88. 9 <I(2,3).I.> <I> | 10| 3:EXACT <I>(5)
  89. 10 <I(2,3).I.I> <> | 10| 5:CURLYX[0]{0,1}(20)
  90. 10 <I(2,3).I.I> <> | 11| 19:WHILEM(0)
  91. | 11| WHILEM: matched 0 out of 0..1
  92. 10 <I(2,3).I.I> <> | 12| 7:EXACT <(>(9)
  93. | 12| failed...
  94. | 11| WHILEM: failed, trying continuation...
  95. 10 <I(2,3).I.I> <> | 12| 20:NOTHING(21)
  96. 10 <I(2,3).I.I> <> | 12| 21:EXACT <.>(23)
  97. | 12| failed...
  98. | 11| failed...
  99. | 10| failed...
  100. | 9| WHILEM: failed, trying continuation...
  101. 9 <I(2,3).I.> <I> | 10| 24:NOTHING(25)
  102. 9 <I(2,3).I.> <I> | 10| 25:OPEN1(27)
  103. 9 <I(2,3).I.> <I> | 10| 27:EXACT <I>(29)
  104. 10 <I(2,3).I.I> <> | 10| 29:CLOSE1(31)
  105. 10 <I(2,3).I.I> <> | 10| 31:END(0)
  106. Match successful!
  107. Matched I.
  108. Freeing REx: " (?:(?^x:I (?: \(\d (?:, \d)*\) )?) \.)* (I) "
  109. Freeing REx: "I (?: \(\d (?:, \d)*\) )?"
RAW Paste Data