/[pcre]/code/trunk/doc/pcre_jit_exec.3
ViewVC logotype

Contents of /code/trunk/doc/pcre_jit_exec.3

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1194 - (show annotations)
Wed Oct 31 17:42:29 2012 UTC (6 years, 7 months ago) by ph10
File size: 4213 byte(s)
More documentation updates
1 .TH PCRE_EXEC 3 "31 October 2012" "PCRE 8.30"
2 .SH NAME
3 PCRE - Perl-compatible regular expressions
4 .SH SYNOPSIS
5 .rs
6 .sp
7 .B #include <pcre.h>
8 .PP
9 .SM
10 .B int pcre_jit_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
11 .ti +5n
12 .B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
13 .ti +5n
14 .B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
15 .ti +5n
16 .B pcre_jit_stack *\fIjstack\fP);
17 .PP
18 .B int pcre16_jit_exec(const pcre16 *\fIcode\fP, "const pcre16_extra *\fIextra\fP,"
19 .ti +5n
20 .B "PCRE_SPTR16 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
21 .ti +5n
22 .B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
23 .ti +5n
24 .B pcre_jit_stack *\fIjstack\fP);
25 .PP
26 .B int pcre32_jit_exec(const pcre32 *\fIcode\fP, "const pcre32_extra *\fIextra\fP,"
27 .ti +5n
28 .B "PCRE_SPTR32 \fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
29 .ti +5n
30 .B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP,
31 .ti +5n
32 .B pcre_jit_stack *\fIjstack\fP);
33 .
34 .SH DESCRIPTION
35 .rs
36 .sp
37 This function matches a compiled regular expression that has been successfully
38 studied with one of the JIT options against a given subject string, using a
39 matching algorithm that is similar to Perl's. It is a "fast path" interface to
40 JIT, and it bypasses some of the sanity checks that \fBpcre_exec()\fP applies.
41 It returns offsets to captured substrings. Its arguments are:
42 .sp
43 \fIcode\fP Points to the compiled pattern
44 \fIextra\fP Points to an associated \fBpcre[16|32]_extra\fP structure,
45 or is NULL
46 \fIsubject\fP Points to the subject string
47 \fIlength\fP Length of the subject string, in bytes
48 \fIstartoffset\fP Offset in bytes in the subject at which to
49 start matching
50 \fIoptions\fP Option bits
51 \fIovector\fP Points to a vector of ints for result offsets
52 \fIovecsize\fP Number of elements in the vector (a multiple of 3)
53 \fIjstack\fP Pointer to a JIT stack
54 .sp
55 The allowed options are:
56 .sp
57 PCRE_NOTBOL Subject string is not the beginning of a line
58 PCRE_NOTEOL Subject string is not the end of a line
59 PCRE_NOTEMPTY An empty string is not a valid match
60 PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
61 is not a valid match
62 PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
63 validity (only relevant if PCRE_UTF16
64 was set at compile time)
65 PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
66 validity (only relevant if PCRE_UTF32
67 was set at compile time)
68 PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
69 validity (only relevant if PCRE_UTF8
70 was set at compile time)
71 PCRE_PARTIAL ) Return PCRE_ERROR_PARTIAL for a partial
72 PCRE_PARTIAL_SOFT ) match if no full matches are found
73 PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
74 if that is found before a full match
75 .sp
76 However, the PCRE_NO_UTF[8|16|32]_CHECK options have no effect, as this check
77 is never applied. For details of partial matching, see the
78 .\" HREF
79 \fBpcrepartial\fP
80 .\"
81 page. A \fBpcre_extra\fP structure contains the following fields:
82 .sp
83 \fIflags\fP Bits indicating which fields are set
84 \fIstudy_data\fP Opaque data from \fBpcre[16|32]_study()\fP
85 \fImatch_limit\fP Limit on internal resource use
86 \fImatch_limit_recursion\fP Limit on internal recursion depth
87 \fIcallout_data\fP Opaque data passed back to callouts
88 \fItables\fP Points to character tables or is NULL
89 \fImark\fP For passing back a *MARK pointer
90 \fIexecutable_jit\fP Opaque data from JIT compilation
91 .sp
92 The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
93 PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
94 PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT.
95 .P
96 There is a complete description of the PCRE native API in the
97 .\" HREF
98 \fBpcreapi\fP
99 .\"
100 page and a description of the JIT API in the
101 .\" HREF
102 \fBpcrejit\fP
103 .\"
104 page.

  ViewVC Help
Powered by ViewVC 1.1.5