Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 34ae14235711d1471f043ac894a061f9 > files > 350

libicu-doc-3.6-5.16.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.6: UParseError Struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li id="current"><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<h1>UParseError Struct Reference</h1><!-- doxytag: class="UParseError" -->A <a class="el" href="structUParseError.html">UParseError</a> struct is used to returned detailed information about parsing errors.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="parseerr_8h-source.html">parseerr.h</a>&gt;</code>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structUParseError.html#0086c27a9fac26c11a107a6adeb487e3">line</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The line on which the error occured.  <a href="#0086c27a9fac26c11a107a6adeb487e3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structUParseError.html#d041cdc0dd4aa665f1e9100fd172b248">offset</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The character offset to the error.  <a href="#d041cdc0dd4aa665f1e9100fd172b248"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">UChar&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structUParseError.html#08c829365ce674b26f947a73e2caa29d">preContext</a> [U_PARSE_CONTEXT_LEN]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Textual context before the error.  <a href="#08c829365ce674b26f947a73e2caa29d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">UChar&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structUParseError.html#7b2b33e387b090e5e9f197b9ccbb163e">postContext</a> [U_PARSE_CONTEXT_LEN]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The error itself and/or textual context after the error.  <a href="#7b2b33e387b090e5e9f197b9ccbb163e"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A <a class="el" href="structUParseError.html">UParseError</a> struct is used to returned detailed information about parsing errors. 
<p>
It is used by ICU parsing engines that parse long rules, patterns, or programs, where the text being parsed is long enough that more information than a UErrorCode is needed to localize the error.<p>
The line, offset, and context fields are optional; parsing engines may choose not to use to use them.<p>
The preContext and postContext strings include some part of the context surrounding the error. If the source text is "let for=7" and "for" is the error (e.g., because it is a reserved word), then some examples of what a parser might produce are the following:<p>
<pre>
 preContext   postContext
 ""           ""            The parser does not support context
 "let "       "=7"          Pre- and post-context only
 "let "       "for=7"       Pre- and post-context and error text
 ""           "for"         Error text only
 </pre><p>
Examples of engines which use <a class="el" href="structUParseError.html">UParseError</a> (or may use it in the future) are <a class="el" href="classTransliterator.html">Transliterator</a>, <a class="el" href="classRuleBasedBreakIterator.html">RuleBasedBreakIterator</a>, and <a class="el" href="classRegexPattern.html">RegexPattern</a>.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000198">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="parseerr_8h-source.html#l00056">56</a> of file <a class="el" href="parseerr_8h-source.html">parseerr.h</a>.<hr><h2>Field Documentation</h2>
<a class="anchor" name="0086c27a9fac26c11a107a6adeb487e3"></a><!-- doxytag: member="UParseError::line" ref="0086c27a9fac26c11a107a6adeb487e3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="structUParseError.html#0086c27a9fac26c11a107a6adeb487e3">UParseError::line</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The line on which the error occured. 
<p>
If the parser uses this field, it sets it to the line number of the source text line on which the error appears, which will be be a value &gt;= 1. If the parse does not support line numbers, the value will be &lt;= 0. <dl compact><dt><b><a class="el" href="stable.html#_stable000199">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="parseerr_8h-source.html#l00065">65</a> of file <a class="el" href="parseerr_8h-source.html">parseerr.h</a>.
</div>
</div><p>
<a class="anchor" name="d041cdc0dd4aa665f1e9100fd172b248"></a><!-- doxytag: member="UParseError::offset" ref="d041cdc0dd4aa665f1e9100fd172b248" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="structUParseError.html#d041cdc0dd4aa665f1e9100fd172b248">UParseError::offset</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The character offset to the error. 
<p>
If the line field is &gt;= 1, then this is the offset from the start of the line. Otherwise, this is the offset from the start of the text. If the parser does not support this field, it will have a value &lt; 0. <dl compact><dt><b><a class="el" href="stable.html#_stable000200">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="parseerr_8h-source.html#l00074">74</a> of file <a class="el" href="parseerr_8h-source.html">parseerr.h</a>.
</div>
</div><p>
<a class="anchor" name="7b2b33e387b090e5e9f197b9ccbb163e"></a><!-- doxytag: member="UParseError::postContext" ref="7b2b33e387b090e5e9f197b9ccbb163e" args="[U_PARSE_CONTEXT_LEN]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UChar <a class="el" href="structUParseError.html#7b2b33e387b090e5e9f197b9ccbb163e">UParseError::postContext</a>[U_PARSE_CONTEXT_LEN]          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The error itself and/or textual context after the error. 
<p>
Null-terminated. The empty string if not supported by parser. <dl compact><dt><b><a class="el" href="stable.html#_stable000202">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="parseerr_8h-source.html#l00088">88</a> of file <a class="el" href="parseerr_8h-source.html">parseerr.h</a>.
</div>
</div><p>
<a class="anchor" name="08c829365ce674b26f947a73e2caa29d"></a><!-- doxytag: member="UParseError::preContext" ref="08c829365ce674b26f947a73e2caa29d" args="[U_PARSE_CONTEXT_LEN]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UChar <a class="el" href="structUParseError.html#08c829365ce674b26f947a73e2caa29d">UParseError::preContext</a>[U_PARSE_CONTEXT_LEN]          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Textual context before the error. 
<p>
Null-terminated. The empty string if not supported by parser. <dl compact><dt><b><a class="el" href="stable.html#_stable000201">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="parseerr_8h-source.html#l00081">81</a> of file <a class="el" href="parseerr_8h-source.html">parseerr.h</a>.
</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="parseerr_8h-source.html">parseerr.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:56 2011 for ICU 3.6 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>