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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1055 - (show annotations)
Tue Oct 16 15:53:30 2012 UTC (7 years, 1 month ago) by chpe
File size: 5198 byte(s)
pcre32: Add 32-bit library

Create libpcre32 that operates on 32-bit characters (UTF-32).

This turned out to be surprisingly simple after the UTF-16 support
was introduced; mostly just extra ifdefs and adjusting and adding
some tests.
1 .TH PCRE_DFA_EXEC 3 "24 June 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_dfa_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 int *\fIworkspace\fP, int \fIwscount\fP);
17 .PP
18 .B int pcre16_dfa_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 int *\fIworkspace\fP, int \fIwscount\fP);
25 .PP
26 .B int pcre32_dfa_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 int *\fIworkspace\fP, int \fIwscount\fP);
33 .
34 .SH DESCRIPTION
35 .rs
36 .sp
37 This function matches a compiled regular expression against a given subject
38 string, using an alternative matching algorithm that scans the subject string
39 just once (\fInot\fP Perl-compatible). Note that the main, Perl-compatible,
40 matching function is \fBpcre[16|32]_exec()\fP. The arguments for this function
41 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
53 \fIworkspace\fP Points to a vector of ints used as working space
54 \fIwscount\fP Number of elements in the vector
55 .sp
56 The options are:
57 .sp
58 PCRE_ANCHORED Match only at the first position
59 PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
60 PCRE_BSR_UNICODE \eR matches all Unicode line endings
61 PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
62 PCRE_NEWLINE_ANYCRLF Recognize CR, LF, & CRLF as newline sequences
63 PCRE_NEWLINE_CR Recognize CR as the only newline sequence
64 PCRE_NEWLINE_CRLF Recognize CRLF as the only newline sequence
65 PCRE_NEWLINE_LF Recognize LF as the only newline sequence
66 PCRE_NOTBOL Subject is not the beginning of a line
67 PCRE_NOTEOL Subject is not the end of a line
68 PCRE_NOTEMPTY An empty string is not a valid match
69 PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
70 is not a valid match
71 PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
72 PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
73 validity (only relevant if PCRE_UTF16
74 was set at compile time)
75 PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
76 validity (only relevant if PCRE_UTF32
77 was set at compile time)
78 PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
79 validity (only relevant if PCRE_UTF8
80 was set at compile time)
81 PCRE_PARTIAL ) Return PCRE_ERROR_PARTIAL for a partial
82 PCRE_PARTIAL_SOFT ) match if no full matches are found
83 PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
84 even if there is a full match as well
85 PCRE_DFA_SHORTEST Return only the shortest match
86 PCRE_DFA_RESTART Restart after a partial match
87 .sp
88 There are restrictions on what may appear in a pattern when using this matching
89 function. Details are given in the
90 .\" HREF
91 \fBpcrematching\fP
92 .\"
93 documentation. For details of partial matching, see the
94 .\" HREF
95 \fBpcrepartial\fP
96 .\"
97 page.
98 .P
99 A \fBpcre[16|32]_extra\fP structure contains the following fields:
100 .sp
101 \fIflags\fP Bits indicating which fields are set
102 \fIstudy_data\fP Opaque data from \fBpcre[16|32]_study()\fP
103 \fImatch_limit\fP Limit on internal resource use
104 \fImatch_limit_recursion\fP Limit on internal recursion depth
105 \fIcallout_data\fP Opaque data passed back to callouts
106 \fItables\fP Points to character tables or is NULL
107 \fImark\fP For passing back a *MARK pointer
108 \fIexecutable_jit\fP Opaque data from JIT compilation
109 .sp
110 The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
111 PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
112 PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT. For this
113 matching function, the \fImatch_limit\fP and \fImatch_limit_recursion\fP fields
114 are not used, and must not be set. The PCRE_EXTRA_EXECUTABLE_JIT flag and
115 the corresponding variable are ignored.
116 .P
117 There is a complete description of the PCRE native API in the
118 .\" HREF
119 \fBpcreapi\fP
120 .\"
121 page and a description of the POSIX API in the
122 .\" HREF
123 \fBpcreposix\fP
124 .\"
125 page.

Properties

Name Value
svn:eol-style native
svn:keywords "Author Date Id Revision Url"

  ViewVC Help
Powered by ViewVC 1.1.5