pcre_jit_exec.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <html>
  2. <head>
  3. <title>pcre_jit_exec specification</title>
  4. </head>
  5. <body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
  6. <h1>pcre_jit_exec man page</h1>
  7. <p>
  8. Return to the <a href="index.html">PCRE index page</a>.
  9. </p>
  10. <p>
  11. This page is part of the PCRE HTML documentation. It was generated automatically
  12. from the original man page. If there is any nonsense in it, please consult the
  13. man page, in case the conversion went wrong.
  14. <br>
  15. <br><b>
  16. SYNOPSIS
  17. </b><br>
  18. <P>
  19. <b>#include &#60;pcre.h&#62;</b>
  20. </P>
  21. <P>
  22. <b>int pcre_jit_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
  23. <b> const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
  24. <b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
  25. <b> pcre_jit_stack *<i>jstack</i>);</b>
  26. <br>
  27. <br>
  28. <b>int pcre16_jit_exec(const pcre16 *<i>code</i>, const pcre16_extra *<i>extra</i>,</b>
  29. <b> PCRE_SPTR16 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
  30. <b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
  31. <b> pcre_jit_stack *<i>jstack</i>);</b>
  32. <br>
  33. <br>
  34. <b>int pcre32_jit_exec(const pcre32 *<i>code</i>, const pcre32_extra *<i>extra</i>,</b>
  35. <b> PCRE_SPTR32 <i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
  36. <b> int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>,</b>
  37. <b> pcre_jit_stack *<i>jstack</i>);</b>
  38. </P>
  39. <br><b>
  40. DESCRIPTION
  41. </b><br>
  42. <P>
  43. This function matches a compiled regular expression that has been successfully
  44. studied with one of the JIT options against a given subject string, using a
  45. matching algorithm that is similar to Perl's. It is a "fast path" interface to
  46. JIT, and it bypasses some of the sanity checks that <b>pcre_exec()</b> applies.
  47. It returns offsets to captured substrings. Its arguments are:
  48. <pre>
  49. <i>code</i> Points to the compiled pattern
  50. <i>extra</i> Points to an associated <b>pcre[16|32]_extra</b> structure,
  51. or is NULL
  52. <i>subject</i> Points to the subject string
  53. <i>length</i> Length of the subject string, in bytes
  54. <i>startoffset</i> Offset in bytes in the subject at which to
  55. start matching
  56. <i>options</i> Option bits
  57. <i>ovector</i> Points to a vector of ints for result offsets
  58. <i>ovecsize</i> Number of elements in the vector (a multiple of 3)
  59. <i>jstack</i> Pointer to a JIT stack
  60. </pre>
  61. The allowed options are:
  62. <pre>
  63. PCRE_NOTBOL Subject string is not the beginning of a line
  64. PCRE_NOTEOL Subject string is not the end of a line
  65. PCRE_NOTEMPTY An empty string is not a valid match
  66. PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
  67. is not a valid match
  68. PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
  69. validity (only relevant if PCRE_UTF16
  70. was set at compile time)
  71. PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
  72. validity (only relevant if PCRE_UTF32
  73. was set at compile time)
  74. PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
  75. validity (only relevant if PCRE_UTF8
  76. was set at compile time)
  77. PCRE_PARTIAL ) Return PCRE_ERROR_PARTIAL for a partial
  78. PCRE_PARTIAL_SOFT ) match if no full matches are found
  79. PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
  80. if that is found before a full match
  81. </pre>
  82. However, the PCRE_NO_UTF[8|16|32]_CHECK options have no effect, as this check
  83. is never applied. For details of partial matching, see the
  84. <a href="pcrepartial.html"><b>pcrepartial</b></a>
  85. page. A <b>pcre_extra</b> structure contains the following fields:
  86. <pre>
  87. <i>flags</i> Bits indicating which fields are set
  88. <i>study_data</i> Opaque data from <b>pcre[16|32]_study()</b>
  89. <i>match_limit</i> Limit on internal resource use
  90. <i>match_limit_recursion</i> Limit on internal recursion depth
  91. <i>callout_data</i> Opaque data passed back to callouts
  92. <i>tables</i> Points to character tables or is NULL
  93. <i>mark</i> For passing back a *MARK pointer
  94. <i>executable_jit</i> Opaque data from JIT compilation
  95. </pre>
  96. The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
  97. PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
  98. PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT.
  99. </P>
  100. <P>
  101. There is a complete description of the PCRE native API in the
  102. <a href="pcreapi.html"><b>pcreapi</b></a>
  103. page and a description of the JIT API in the
  104. <a href="pcrejit.html"><b>pcrejit</b></a>
  105. page.
  106. <p>
  107. Return to the <a href="index.html">PCRE index page</a>.
  108. </p>