PageRenderTime 89ms CodeModel.GetById 34ms RepoModel.GetById 5ms app.codeStats 0ms

/CS/migrated/tags/PRE_EVENT_OVERHAUL_2005/docs/html/api/regexp_8h-source.html

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