1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space: csutil/regexp.h Source File (Crystal Space Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
<tr height="59">
<td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
<td class="head"><h2>Public API Reference</h2></td>
</tr>
<tr height="11">
<td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
</tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.4.5 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li id="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>File Members</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="dir__2Fvar_2Ftmp_2Ftmp0_2FCS_2Finclude_2Fcsutil_2F.html">csutil</a></div>
<h1>regexp.h</h1><a href="regexp_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> Copyright (C) 2004 by Frank Richter</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment"> This library is free software; you can redistribute it and/or</span>
<a name="l00005"></a>00005 <span class="comment"> modify it under the terms of the GNU Library General Public</span>
<a name="l00006"></a>00006 <span class="comment"> License as published by the Free Software Foundation; either</span>
<a name="l00007"></a>00007 <span class="comment"> version 2 of the License, or (at your option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment"> This library is distributed in the hope that it will be useful,</span>
<a name="l00010"></a>00010 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00011"></a>00011 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00012"></a>00012 <span class="comment"> Library General Public License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment"> You should have received a copy of the GNU Library General Public</span>
<a name="l00015"></a>00015 <span class="comment"> License along with this library; if not, write to the Free</span>
<a name="l00016"></a>00016 <span class="comment"> Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00017"></a>00017 <span class="comment">*/</span>
<a name="l00018"></a>00018
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef __CS_UTIL_REGEXP_H__</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_UTIL_REGEXP_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "csextern.h"</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="array_8h.html">csutil/array.h</a>"</span>
<a name="l00028"></a>00028
<a name="l00032"></a><a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcf">00032</a> <span class="keyword">enum</span> <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcf">csRegExpMatchError</a>
<a name="l00033"></a>00033 {
<a name="l00035"></a>00035 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcfc87cb0cc2940668442cb1ad5ad5c2ccd">csrxNoError</a>,
<a name="l00037"></a>00037 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcfbe4d1d5b96f7ef754e8ab9bdcd985cd5">csrxNoMatch</a>,
<a name="l00043"></a>00043 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcf46f1c616f7f5f8258cac7cd35bf7321d">csrxBadBraces</a>,
<a name="l00047"></a>00047 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcfa4cdaa50bb5b0cbe351135612fbebf6e">csrxBadPattern</a>,
<a name="l00052"></a>00052 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcfbd9cb58b2b4254b74a83659d764efcaa">csrxBadRepetition</a>,
<a name="l00057"></a>00057 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcfd18ce8645be0e77e046ecafca0dc4a61">csrxErrCollate</a>,
<a name="l00061"></a>00061 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcff0eb536058c02be7c55881ae862c80c3">csrxErrCharType</a>,
<a name="l00065"></a>00065 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcfcab0cb08dbf04097137e48c512c4d894">csrxErrEscape</a>,
<a name="l00069"></a>00069 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcfdbd7f35ad24e5a9e70b3b372587c0f99">csrxErrSubReg</a>,
<a name="l00073"></a>00073 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcf27088679526aaf53e5ea7983dba5290c">csrxErrBrackets</a>,
<a name="l00078"></a>00078 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcf1f78c63ea243a188ce7c8d846115260a">csrxErrParentheses</a>,
<a name="l00082"></a>00082 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcfcac200cd39fbbca380fe15c34ec45376">csrxErrBraces</a>,
<a name="l00086"></a>00086 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcff3e12e184ae4e20cf12790ea1937b1a6">csrxErrRange</a>,
<a name="l00090"></a>00090 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcf1b29111cc7cbde9e0868ca7191b29c20">csrxErrSpace</a>,
<a name="l00094"></a>00094 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcf6f93565d1cc2e712e6f7b9fe627b1803">csrxErrUnknown</a>
<a name="l00095"></a>00095 };
<a name="l00096"></a>00096
<a name="l00100"></a><a class="code" href="regexp_8h.html#12106bd32cd20d8544f56e3773698956">00100</a> <span class="keyword">enum</span> <a class="code" href="regexp_8h.html#12106bd32cd20d8544f56e3773698956">csRegExpMatchFlags</a>
<a name="l00101"></a>00101 {
<a name="l00105"></a>00105 <a class="code" href="regexp_8h.html#12106bd32cd20d8544f56e37736989566d954099961c4321c4b5df50e86e103e">csrxIgnoreCase</a> = 1,
<a name="l00114"></a>00114 <a class="code" href="regexp_8h.html#12106bd32cd20d8544f56e3773698956647d905b77f03f4819277133cf690058">csrxNewLine</a> = 2,
<a name="l00120"></a>00120 <a class="code" href="regexp_8h.html#12106bd32cd20d8544f56e377369895645a2700a801c1be57c769f4d6f7e8176">csrxNotBOL</a> = 4,
<a name="l00125"></a>00125 <a class="code" href="regexp_8h.html#12106bd32cd20d8544f56e37736989563bffd2e95c7676f508986331aeb3b030">csrxNotEOL</a> = 8
<a name="l00126"></a>00126 };
<a name="l00127"></a>00127
<a name="l00131"></a><a class="code" href="structcsRegExpMatch.html">00131</a> <span class="keyword">struct </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="structcsRegExpMatch.html">csRegExpMatch</a>
<a name="l00132"></a>00132 {
<a name="l00134"></a><a class="code" href="structcsRegExpMatch.html#df3801651ec3a9bb226f2b2893f649e4">00134</a> size_t startOffset;
<a name="l00139"></a><a class="code" href="structcsRegExpMatch.html#8e2f5076d211d3ec478684dcf700d2ff">00139</a> size_t endOffset;
<a name="l00140"></a>00140 };
<a name="l00141"></a>00141
<a name="l00153"></a><a class="code" href="classcsRegExpMatcher.html">00153</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT csRegExpMatcher
<a name="l00154"></a>00154 {
<a name="l00155"></a>00155 <span class="keywordtype">void</span>* regex;
<a name="l00156"></a>00156 <span class="keywordtype">char</span>* pattern;
<a name="l00157"></a>00157 <span class="keywordtype">int</span> compiledFlags;
<a name="l00158"></a>00158 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcf">csRegExpMatchError</a> compileError;
<a name="l00159"></a>00159 <span class="keywordtype">bool</span> extendedRE;
<a name="l00160"></a>00160
<a name="l00161"></a>00161 <span class="keywordtype">bool</span> Compile (<span class="keywordtype">int</span> flags, <span class="keywordtype">bool</span> nosub);
<a name="l00162"></a>00162
<a name="l00163"></a>00163 <span class="keyword">public</span>:
<a name="l00170"></a>00170 csRegExpMatcher (<span class="keyword">const</span> <span class="keywordtype">char</span>* pattern, <span class="keywordtype">bool</span> extendedRE = <span class="keyword">false</span>);
<a name="l00171"></a>00171
<a name="l00173"></a>00173 csRegExpMatcher (<span class="keyword">const</span> csRegExpMatcher& other);
<a name="l00174"></a>00174
<a name="l00176"></a>00176 ~csRegExpMatcher ();
<a name="l00177"></a>00177
<a name="l00179"></a>00179 csRegExpMatcher& operator= (<span class="keyword">const</span> csRegExpMatcher &other);
<a name="l00180"></a>00180
<a name="l00190"></a>00190 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcf">csRegExpMatchError</a> Match (<span class="keyword">const</span> <span class="keywordtype">char</span>* string, <span class="keywordtype">int</span> flags = 0);
<a name="l00191"></a>00191
<a name="l00203"></a>00203 <a class="code" href="regexp_8h.html#e06d72e17be205e23424c52a54b6cfcf">csRegExpMatchError</a> Match (<span class="keyword">const</span> <span class="keywordtype">char</span>* string,
<a name="l00204"></a>00204 csArray<csRegExpMatch>& matches, <span class="keywordtype">int</span> flags = 0);
<a name="l00205"></a>00205 };
<a name="l00206"></a>00206
<a name="l00207"></a>00207 <span class="preprocessor">#endif // __CS_UTIL_REGEXP_H__</span>
</pre></div><hr size="1"><address><small>Generated for Crystal Space by
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.4.5
</small></address> </div></body> </html>
|