PageRenderTime 85ms CodeModel.GetById 16ms app.highlight 57ms RepoModel.GetById 1ms app.codeStats 0ms

/fparsec/main/Doc/html/reference/error.html

http://github.com/sandersn/fing
HTML | 955 lines | 932 code | 17 blank | 6 comment | 0 complexity | 26a00c1049e17ca4ac4ce91fcf8ec2e5 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2<html xmlns="http://www.w3.org/1999/xhtml">
  3<head>
  4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5 <title>FParsec.Error</title>
  6 <link rel="stylesheet" type="text/css" media="all" href="../css/style.css" /> 
  7 <link rel="stylesheet" type="text/css" media="screen" href="../css/screen-sidebar.css" title="Sidebar" /> 
  8 <link rel="alternate stylesheet" type="text/css" media="screen" href="../css/screen-no-sidebar.css" title="No sidebar" /> 
  9 <!--[if IE]>
 10 <link rel="stylesheet" type="text/css" media="all" href="../css/style-ie.css" /> 
 11 <![endif]-->
 12 <!--[if IE 6]>
 13 <link rel="stylesheet" type="text/css" media="all" href="../css/style-ie6.css" /> 
 14 <![endif]-->
 15 <link rel="stylesheet" type="text/css" media="print" href="../css/print.css" />
 16</head>
 17<body>
 18 <div id="fixed-layer">
 19 <div id="fixed-wrapper">
 20 <div id="sidebar">
 21  <div id="breadcrumbs-dummy"><span class="breadcrumbs">&nbsp;</span></div>
 22  <div id="nav-tree">
 23   <table class="nav n1">
 24    <tbody class="nav-open n1">
 25     <tr class="nav-entry n1 _1">
 26      <td class="nav-number n1"></td>
 27      <td class="nav-title n1"><a href="../index.html">FParsec Documentation</a></td>
 28     </tr>
 29     <tr class="nav-sub-entries n1 _1">
 30      <td class="nav-sub-entries-number n1"></td>
 31      <td class="nav-sub-entries n1">
 32       <table class="nav n2">
 33        <tbody class="nav-before-open n2">
 34         <tr class="nav-entry n2 _1">
 35          <td class="nav-number n2"><a href="../tutorial.html"><span class="section-number">1</span><span class="nav-space"></span></a></td>
 36          <td class="nav-title n2"><a href="../tutorial.html">Tutorial</a></td>
 37         </tr>
 38        </tbody>
 39        <tbody class="nav-open n2">
 40         <tr class="nav-entry n2 _2">
 41          <td class="nav-number n2"><a href="index.html"><span class="section-number">2</span><span class="nav-space"></span></a></td>
 42          <td class="nav-title n2"><a href="index.html">Reference</a></td>
 43         </tr>
 44         <tr class="nav-sub-entries n2 _2">
 45          <td class="nav-sub-entries-number n2"></td>
 46          <td class="nav-sub-entries n2">
 47           <table class="nav n3">
 48            <tbody class="nav-before-open n3">
 49             <tr class="nav-entry n3 _1">
 50              <td class="nav-number n3"><a href="parser-overview.html"><span class="section-number">1</span><span class="nav-space"></span></a></td>
 51              <td class="nav-title n3"><a href="parser-overview.html">Parser overview</a></td>
 52             </tr>
 53             <tr class="nav-entry n3 _2">
 54              <td class="nav-number n3"><a href="primitives.html"><span class="section-number">2</span><span class="nav-space"></span></a></td>
 55              <td class="nav-title n3"><a href="primitives.html">FParsec.Primitives</a></td>
 56             </tr>
 57             <tr class="nav-entry n3 _3">
 58              <td class="nav-number n3"><a href="charparsers.html"><span class="section-number">3</span><span class="nav-space"></span></a></td>
 59              <td class="nav-title n3"><a href="charparsers.html">FParsec.CharParsers</a></td>
 60             </tr>
 61             <tr class="nav-entry n3 _4">
 62              <td class="nav-number n3">
 63               <a href="operatorprecedenceparser.html"><span class="section-number">4</span><span class="nav-space"></span></a>
 64              </td>
 65              <td class="nav-title n3"><a href="operatorprecedenceparser.html">FParsec.OperatorPrecedenceParser</a></td>
 66             </tr>
 67            </tbody>
 68            <tbody class="nav-open selected n3">
 69             <tr class="nav-entry selected n3 _5">
 70              <td class="nav-number selected n3"><a href="#"><span class="section-number">5</span><span class="nav-space"></span></a></td>
 71              <td class="nav-title selected n3"><a href="#">FParsec.Error</a></td>
 72             </tr>
 73             <tr class="nav-sub-entries selected n3 _5">
 74              <td class="nav-sub-entries-number selected n3"></td>
 75              <td class="nav-sub-entries selected n3">
 76               <table class="nav n4">
 77                <tbody class="nav-before-open n4">
 78                 <tr class="nav-entry n4 _1">
 79                  <td class="nav-number n4"><a href="#interface"><span class="section-number">1</span><span class="nav-space"></span></a></td>
 80                  <td class="nav-title n4"><a href="#interface">Interface</a></td>
 81                 </tr>
 82                 <tr class="nav-entry n4 _2">
 83                  <td class="nav-number n4"><a href="#members"><span class="section-number">2</span><span class="nav-space"></span></a></td>
 84                  <td class="nav-title n4"><a href="#members">Members</a></td>
 85                 </tr>
 86                </tbody>
 87               </table>
 88              </td>
 89             </tr>
 90            </tbody>
 91            <tbody class="nav-after-open n3">
 92             <tr class="nav-entry n3 _6">
 93              <td class="nav-number n3"><a href="state.html"><span class="section-number">6</span><span class="nav-space"></span></a></td>
 94              <td class="nav-title n3"><a href="state.html">FParsec.State</a></td>
 95             </tr>
 96             <tr class="nav-entry n3 _7">
 97              <td class="nav-number n3"><a href="position.html"><span class="section-number">7</span><span class="nav-space"></span></a></td>
 98              <td class="nav-title n3"><a href="position.html">FParsec.Position</a></td>
 99             </tr>
100             <tr class="nav-entry n3 _8">
101              <td class="nav-number n3"><a href="charstream.html"><span class="section-number">8</span><span class="nav-space"></span></a></td>
102              <td class="nav-title n3"><a href="charstream.html">FParsec.CharStream</a></td>
103             </tr>
104            </tbody>
105           </table>
106          </td>
107         </tr>
108        </tbody>
109       </table>
110      </td>
111     </tr>
112    </tbody>
113   </table>
114  </div>
115 </div>
116 </div>
117 </div>
118 <div id="wrapper">   
119 <div id="main">
120 <div id="main-content"> 
121 <div id="breadcrumbs">
122  <span class="breadcrumbs">
123   <span id="breadcrumbs-parents"><a href="../index.html">FParsec Documentation</a><span class="breadcrumbs-sep"> > </span><a href="index.html">Reference</a></span><span class="breadcrumbs-sep"> > </span>FParsec.Error
124  </span>
125 </div>  
126 <div class="section s2">
127  <h1 class="title h2"><span class="section-number">2.5</span> FParsec.Error</h1>
128  <div id="interface" class="section s3">
129   <h2 class="title h3"><span class="section-number">2.5.1</span> Interface</h2>
130   <div class="intro i3">
131    <div class="para _1">
132<pre class="code fsharp"><span class="ck">module</span> <span class="ci">FParsec</span><span class="cm">.</span><span class="ci">Error</span>
133
134<span class="ck">type</span> <a id="interface.ErrorMessage:B:" href="#members.ErrorMessage"><span class="interface-member-marker"><span class="ci">ErrorMessage</span></span></a> <span class="co">=</span>
135     <span class="cp">|</span> <a id="interface.Expected:B:" href="#members.Expected"><span class="interface-member-marker"><span class="ci">Expected</span></span></a>           <span class="ck">of</span> <span class="ci">string</span>
136     <span class="cp">|</span> <a id="interface.ExpectedString:B:" href="#members.ExpectedString"><span class="interface-member-marker"><span class="ci">ExpectedString</span></span></a>     <span class="ck">of</span> <span class="ci">string</span>
137     <span class="cp">|</span> <a id="interface.ExpectedStringCI:B:" href="#members.ExpectedStringCI"><span class="interface-member-marker"><span class="ci">ExpectedStringCI</span></span></a>   <span class="ck">of</span> <span class="ci">string</span>
138     <span class="cp">|</span> <a id="interface.Unexpected:B:" href="#members.Unexpected"><span class="interface-member-marker"><span class="ci">Unexpected</span></span></a>         <span class="ck">of</span> <span class="ci">string</span>
139     <span class="cp">|</span> <a id="interface.UnexpectedString:B:" href="#members.UnexpectedString"><span class="interface-member-marker"><span class="ci">UnexpectedString</span></span></a>   <span class="ck">of</span> <span class="ci">string</span>
140     <span class="cp">|</span> <a id="interface.UnexpectedStringCI:B:" href="#members.UnexpectedStringCI"><span class="interface-member-marker"><span class="ci">UnexpectedStringCI</span></span></a> <span class="ck">of</span> <span class="ci">string</span>
141     <span class="cp">|</span> <a id="interface.Message:B:" href="#members.Message"><span class="interface-member-marker"><span class="ci">Message</span></span></a>            <span class="ck">of</span> <span class="ci">string</span>
142     <span class="cp">|</span> <a id="interface.CompoundError:B:" href="#members.CompoundError"><span class="interface-member-marker"><span class="ci">CompoundError</span></span></a>      <span class="ck">of</span> <span class="ci">string</span> <span class="cp">*</span> <a href="position.html"><span class="ci">Position</span></a> <span class="cp">*</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
143     <span class="cp">|</span> <a id="interface.BacktrackPoint:B:" href="#members.BacktrackPoint"><span class="interface-member-marker"><span class="ci">BacktrackPoint</span></span></a>     <span class="ck">of</span> <a href="position.html"><span class="ci">Position</span></a> <span class="cp">*</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
144     <span class="cp">|</span> <a id="interface.OtherError:B:" href="#members.OtherError"><span class="interface-member-marker"><span class="ci">OtherError</span></span></a>         <span class="ck">of</span> <a href="http://msdn.microsoft.com/en-us/library/system.icomparable.aspx"><span class="ci">System</span><span class="cm">.</span><span class="ci">IComparable</span></a>
145
146<span class="cp">[&lt;</span><span class="ci">CompilationRepresentation</span><span class="cp">(</span><span class="ci">CompilationRepresentationFlags</span><span class="cm">.</span><span class="ci">UseNullAsTrueValue</span><span class="cp">)</span><span class="cp">;</span>
147  <span class="ci">CustomEquality</span><span class="cp">;</span> <span class="ci">CustomComparison</span><span class="cp">&gt;]</span>
148<span class="ck">type</span> <a id="interface.ErrorMessageList:B:" href="#members.ErrorMessageList"><span class="interface-member-marker"><span class="ci">ErrorMessageList</span></span></a> <span class="co">=</span>
149    <span class="cp">|</span> <a id="interface.AddErrorMessage:B:" href="#members.AddErrorMessage"><span class="interface-member-marker"><span class="ci">AddErrorMessage</span></span></a> <span class="ck">of</span> <a href="#members.ErrorMessage"><span class="ci">ErrorMessage</span></a> <span class="cp">*</span> <span class="ci">ErrorMessageList</span>
150    <span class="cp">|</span> <a id="interface.NoErrorMessages:B:" href="#members.NoErrorMessages"><span class="interface-member-marker"><span class="ci">NoErrorMessages</span></span></a>
151    <span class="ck">with</span>
152         <span class="ck">member</span> <a id="interface.ToSet:B:" href="#members.ToSet"><span class="interface-member-marker"><span class="ci">ToSet</span></span></a><span class="cp">:</span> <span class="ci">unit</span> <span class="cr">-&gt;</span> <span class="ci">Set</span><span class="cp">&lt;</span><a href="#members.ErrorMessage"><span class="ci">ErrorMessage</span></a><span class="cp">&gt;</span>
153         <span class="ck">static</span> <span class="ck">member</span> <a id="interface.OfSeq:B:" href="#members.OfSeq"><span class="interface-member-marker"><span class="ci">OfSeq</span></span></a><span class="cp">:</span> <span class="ci">seq</span><span class="cp">&lt;</span><a href="#members.ErrorMessage"><span class="ci">ErrorMessage</span></a><span class="cp">&gt;</span> <span class="cr">-&gt;</span> <span class="ci">ErrorMessageList</span>
154
155         <span class="ck">override</span> <span class="ci">Equals</span><span class="cp">:</span> <span class="ci">obj</span> <span class="cr">-&gt;</span> <span class="ci">bool</span>
156         <span class="ck">override</span> <span class="ci">GetHashCode</span><span class="cp">:</span> <span class="ci">unit</span> <span class="cr">-&gt;</span> <span class="ci">int</span>
157         <span class="ck">interface</span> <a href="http://msdn.microsoft.com/en-us/library/system.icomparable.aspx"><span class="ci">System</span><span class="cm">.</span><span class="ci">IComparable</span></a>
158
159<span class="ck">val</span> <a id="interface.expectedError:B:" href="#members.expectedError"><span class="interface-member-marker"><span class="ci">expectedError</span></span></a><span class="cp">:</span>           <span class="ci">string</span> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
160<span class="ck">val</span> <a id="interface.expectedStringError:B:" href="#members.expectedStringError"><span class="interface-member-marker"><span class="ci">expectedStringError</span></span></a><span class="cp">:</span>     <span class="ci">string</span> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
161<span class="ck">val</span> <a id="interface.expectedStringCIError:B:" href="#members.expectedStringCIError"><span class="interface-member-marker"><span class="ci">expectedStringCIError</span></span></a><span class="cp">:</span>   <span class="ci">string</span> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
162<span class="ck">val</span> <a id="interface.unexpectedError:B:" href="#members.unexpectedError"><span class="interface-member-marker"><span class="ci">unexpectedError</span></span></a><span class="cp">:</span>         <span class="ci">string</span> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
163<span class="ck">val</span> <a id="interface.unexpectedStringError:B:" href="#members.unexpectedStringError"><span class="interface-member-marker"><span class="ci">unexpectedStringError</span></span></a><span class="cp">:</span>   <span class="ci">string</span> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
164<span class="ck">val</span> <a id="interface.unexpectedStringCIError:B:" href="#members.unexpectedStringCIError"><span class="interface-member-marker"><span class="ci">unexpectedStringCIError</span></span></a><span class="cp">:</span> <span class="ci">string</span> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
165<span class="ck">val</span> <a id="interface.messageError:B:" href="#members.messageError"><span class="interface-member-marker"><span class="ci">messageError</span></span></a><span class="cp">:</span>            <span class="ci">string</span> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
166<span class="ck">val</span> <a id="interface.otherError:B:" href="#members.otherError"><span class="interface-member-marker"><span class="ci">otherError</span></span></a><span class="cp">:</span>              <span class="ci">obj</span>    <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
167
168<span class="ck">val</span> <a id="interface.compoundError:B:" href="#members.compoundError"><span class="interface-member-marker"><span class="ci">compoundError</span></span></a><span class="cp">:</span>   <span class="ci">string</span> <span class="cr">-&gt;</span> <a href="state.html"><span class="ci">State</span></a><span class="cp">&lt;</span><span class="ctv">'u</span><span class="cp">&gt;</span> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
169<span class="ck">val</span> <a id="interface.backtrackError:B:" href="#members.backtrackError"><span class="interface-member-marker"><span class="ci">backtrackError</span></span></a><span class="cp">:</span>            <a href="state.html"><span class="ci">State</span></a><span class="cp">&lt;</span><span class="ctv">'u</span><span class="cp">&gt;</span> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
170
171<span class="ck">val</span> <a id="interface.concatErrorMessages:B:" href="#members.concatErrorMessages"><span class="interface-member-marker"><span class="ci">concatErrorMessages</span></span></a><span class="cp">:</span>
172        <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
173
174<span class="ck">val</span> <span class="ck">inline</span> <a id="interface.mergeErrors:B:" href="#members.mergeErrors"><span class="interface-member-marker"><span class="ci">mergeErrors</span></span></a><span class="cp">:</span>
175        <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a> <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
176
177<span class="ck">val</span> <a id="interface.mergeErrorsIfNeeded:B:" href="#members.mergeErrorsIfNeeded"><span class="interface-member-marker"><span class="ci">mergeErrorsIfNeeded</span></span></a><span class="cp">:</span>
178        <span class="ci">oldState</span><span class="cp">:</span> <a href="state.html"><span class="ci">State</span></a><span class="cp">&lt;</span><span class="ctv">'u</span><span class="cp">&gt;</span> <span class="cr">-&gt;</span> <span class="ci">oldError</span><span class="cp">:</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
179     <span class="cr">-&gt;</span> <span class="ci">newState</span><span class="cp">:</span> <a href="state.html"><span class="ci">State</span></a><span class="cp">&lt;</span><span class="ctv">'u</span><span class="cp">&gt;</span> <span class="cr">-&gt;</span> <span class="ci">newError</span><span class="cp">:</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
180     <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
181
182<span class="ck">val</span> <a id="interface.mergeErrorsIfNeeded3:B:" href="#members.mergeErrorsIfNeeded3"><span class="interface-member-marker"><span class="ci">mergeErrorsIfNeeded3</span></span></a><span class="cp">:</span>
183        <span class="ci">oldestState</span><span class="cp">:</span> <a href="state.html"><span class="ci">State</span></a><span class="cp">&lt;</span><span class="ctv">'u</span><span class="cp">&gt;</span> <span class="cr">-&gt;</span> <span class="ci">oldestError</span><span class="cp">:</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
184     <span class="cr">-&gt;</span> <span class="ci">oldState</span><span class="cp">:</span>    <a href="state.html"><span class="ci">State</span></a><span class="cp">&lt;</span><span class="ctv">'u</span><span class="cp">&gt;</span> <span class="cr">-&gt;</span> <span class="ci">oldError</span><span class="cp">:</span>    <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
185     <span class="cr">-&gt;</span> <span class="ci">newState</span><span class="cp">:</span>    <a href="state.html"><span class="ci">State</span></a><span class="cp">&lt;</span><span class="ctv">'u</span><span class="cp">&gt;</span> <span class="cr">-&gt;</span> <span class="ci">newError</span><span class="cp">:</span>    <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
186     <span class="cr">-&gt;</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
187
188<span class="cp">[&lt;</span><span class="ci">Sealed</span><span class="cp">&gt;]</span>
189<span class="ck">type</span> <a id="interface.ParserError:B:" href="#members.ParserError"><span class="interface-member-marker"><span class="ci">ParserError</span></span></a> <span class="co">=</span>
190  <a id="interface.new:B:" href="#members.new"><span class="interface-member-marker"><span class="ck">new</span></span></a><span class="cp">:</span> <a href="position.html"><span class="ci">Position</span></a> <span class="cp">*</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a> <span class="cr">-&gt;</span> <span class="ci">ParserError</span>
191
192  <span class="ck">member</span> <a id="interface.Position:B:" href="#members.Position"><span class="interface-member-marker"><span class="ci">Position</span></span></a><span class="cp">:</span> <a href="position.html"><span class="ci">Position</span></a>
193  <span class="ck">member</span> <a id="interface.member-ErrorMessageList:B:" href="#members.member-ErrorMessageList"><span class="interface-member-marker"><span class="ci">ErrorMessageList</span></span></a><span class="cp">:</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
194<a id="interface.ToString:47:WriteTo"></a>
195  <span class="ck">override</span> <a id="interface.ToString:B:" href="#members.ToString"><span class="interface-member-marker"><span class="ci">ToString</span></span></a><span class="cp">:</span> <span class="ci">unit</span> <span class="cr">-&gt;</span> <span class="ci">string</span>
196  <span class="ck">member</span> <a id="interface.ToString_CharStream:B:" href="#members.ToString_CharStream"><span class="interface-member-marker"><span class="ci">ToString</span></span></a><span class="cp">:</span> <span class="ci">streamWhereErrorOccurred</span><span class="cp">:</span> <a href="charstream.html"><span class="ci">CharStream</span></a> <span class="cr">-&gt;</span> <span class="ci">string</span>
197
198  <span class="ck">member</span> <a id="interface.WriteTo_stream:B:" href="#members.WriteTo_stream"><span class="interface-member-marker"><span class="ci">WriteTo</span></span></a><span class="cp">:</span>
199           <span class="ci">textWriter</span><span class="cp">:</span> <a href="http://msdn.microsoft.com/en-us/library/system.io.textwriter.aspx"><span class="ci">System</span><span class="cm">.</span><span class="ci">IO</span><span class="cm">.</span><span class="ci">TextWriter</span></a>
200         <span class="cp">*</span> <span class="ci">streamWhereErrorOccurred</span><span class="cp">:</span> <a href="charstream.html"><span class="ci">CharStream</span></a>
201         <span class="cp">*</span> <span class="cp">?</span><span class="ci">columnWidth</span><span class="cp">:</span> <span class="ci">int</span>
202         <span class="cp">*</span> <span class="cp">?</span><span class="ci">initialIndentation</span><span class="cp">:</span> <span class="ci">string</span> <span class="cp">*</span> <span class="cp">?</span><span class="ci">indentationIncrement</span><span class="cp">:</span> <span class="ci">string</span>
203         <span class="cr">-&gt;</span> <span class="ci">unit</span>
204
205  <span class="ck">member</span> <a id="interface.WriteTo_getStreamByName:B:" href="#members.WriteTo_getStreamByName"><span class="interface-member-marker"><span class="ci">WriteTo</span></span></a><span class="cp">:</span>
206           <span class="ci">textWriter</span><span class="cp">:</span> <a href="http://msdn.microsoft.com/en-us/library/system.io.textwriter.aspx"><span class="ci">System</span><span class="cm">.</span><span class="ci">IO</span><span class="cm">.</span><span class="ci">TextWriter</span></a>
207         <span class="cp">*</span> <span class="ci">getStreamByName</span><span class="cp">:</span> <span class="cp">(</span><span class="ci">string</span> <span class="cr">-&gt;</span> <a href="charstream.html"><span class="ci">CharStream</span></a><span class="cp">)</span>
208         <span class="cp">*</span> <span class="cp">?</span><span class="ci">columnWidth</span><span class="cp">:</span> <span class="ci">int</span>
209         <span class="cp">*</span> <span class="cp">?</span><span class="ci">initialIndentation</span><span class="cp">:</span> <span class="ci">string</span> <span class="cp">*</span> <span class="cp">?</span><span class="ci">indentationIncrement</span><span class="cp">:</span> <span class="ci">string</span>
210         <span class="cr">-&gt;</span> <span class="ci">unit</span>
211
212  <span class="ck">member</span> <a id="interface.WriteTo:B:" href="#members.WriteTo"><span class="interface-member-marker"><span class="ci">WriteTo</span></span></a><span class="cp">:</span>
213           <span class="ci">textWriter</span><span class="cp">:</span> <a href="http://msdn.microsoft.com/en-us/library/system.io.textwriter.aspx"><span class="ci">System</span><span class="cm">.</span><span class="ci">IO</span><span class="cm">.</span><span class="ci">TextWriter</span></a>
214         <span class="cp">*</span> <span class="cp">?</span><span class="ci">positionPrinter</span><span class="cp">:</span>
215             <span class="cp">(</span><a href="http://msdn.microsoft.com/en-us/library/system.io.textwriter.aspx"><span class="ci">System</span><span class="cm">.</span><span class="ci">IO</span><span class="cm">.</span><span class="ci">TextWriter</span></a> <span class="cr">-&gt;</span> <a href="position.html"><span class="ci">Position</span></a> <span class="cr">-&gt;</span> <span class="ci">string</span> <span class="cr">-&gt;</span> <span class="ci">int</span> <span class="cr">-&gt;</span> <span class="ci">unit</span><span class="cp">)</span>
216         <span class="cp">*</span> <span class="cp">?</span><span class="ci">columnWidth</span><span class="cp">:</span> <span class="ci">int</span>
217         <span class="cp">*</span> <span class="cp">?</span><span class="ci">initialIndentation</span><span class="cp">:</span> <span class="ci">string</span> <span class="cp">*</span> <span class="cp">?</span><span class="ci">indentationIncrement</span><span class="cp">:</span> <span class="ci">string</span>
218         <span class="cr">-&gt;</span> <span class="ci">unit</span>
219
220  <span class="ck">override</span> <span class="ci">Equals</span><span class="cp">:</span> <span class="ci">obj</span> <span class="cr">-&gt;</span> <span class="ci">bool</span>
221  <span class="ck">override</span> <span class="ci">GetHashCode</span><span class="cp">:</span> <span class="ci">unit</span> <span class="cr">-&gt;</span> <span class="ci">int</span>
222  <span class="ck">interface</span> <a href="http://msdn.microsoft.com/en-us/library/system.icomparable.aspx"><span class="ci">System</span><span class="cm">.</span><span class="ci">IComparable</span></a>
223</pre>
224    </div>
225   </div>
226  </div>
227  <div id="members" class="section s3">
228   <h2 class="title h3"><span class="section-number">2.5.2</span> Members</h2>
229   <div class="intro i3">
230    <div class="para _1">
231     <div class="interface-members">
232      <div class="interface-member _1" id="members.ErrorMessage">
233       <div class="interface-member-code">
234        <a class="interface-member-backlink" href="#interface.ErrorMessage:B:"></a>
235<pre class="code fsharp"><span class="ck">type</span> <span class="interface-member-marker"><span class="ci">ErrorMessage</span></span></pre>
236       </div>
237       <div class="interface-member-description">
238        <p class="para _1">
239         This union type represents an individual error message within the <code class="fsharp"><a href="#members.ErrorMessageList"><span
240         class="ci">ErrorMessageList</span></a></code> returned by a <code class="fsharp"><a href="primitives.html#members.Parser"><span
241         class="ci">Parser</span></a></code> function.
242        </p>
243        <p class="para _2">
244         <code class="fsharp"><span class="ci">ErrorMessage</span></code> values are always associated with a particular input stream position. For
245         example, the error messages of the <code class="fsharp"><a href="#members.ErrorMessageList"><span
246         class="ci">ErrorMessageList</span></a></code> stored in the <code class="fsharp"><a href="primitives.html#members.Reply"><span
247         class="ci">Reply</span></a><span class="cp">&lt;</span><span class="ci">_</span><span class="cp">,</span><span class="ci">_</span><span
248         class="cp">&gt;</span><span class="cp">.</span><a href="primitives.html#members.Error"><span class="ci">Error</span></a></code> field
249         describe an error at the position of the <code class="fsharp"><a href="primitives.html#members.Reply"><span class="ci">Reply</span></a><span
250         class="cp">&lt;</span><span class="ci">_</span><span class="cp">,</span><span class="ci">_</span><span class="cp">&gt;</span><span
251         class="cp">.</span><a href="state.html"><span class="ci">State</span></a></code> value. The <code class="fsharp"><a
252         href="#members.ParserError"><span class="ci">ParserError</span></a></code> type is a convenient container type for binding together an <code
253         class="fsharp"><a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a></code> with its associated position.
254        </p>
255        <p class="para _3"><code class="fsharp"><span class="ci">ErrorMessage</span></code> has the following union cases:</p>
256        <div class="para _4">
257         <div class="interface-members">
258          <div class="interface-member _1" id="members.Expected">
259           <div class="interface-member-code">
260            <a class="interface-member-backlink" href="#interface.Expected:B:"></a>
261<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">Expected</span></span> <span class="ck">of</span> <span class="ci">string</span>
262</pre>
263           </div>
264           <div class="interface-member-description">
265            <p class="para _1">
266             Parsers report this <code class="fsharp"><span class="ci">ErrorMessage</span></code> when the input does not match the expected input.
267             The string argument describes the expected input.
268            </p>
269            <p class="para _2">
270             This error message can be generated with the labeling operator <code class="fsharp"><a href="primitives.html#members.:60::63::62:"><span
271             class="co">&lt;?&gt;</span></a></code>.
272            </p>
273           </div>
274          </div>
275          <div class="interface-member _2" id="members.ExpectedString">
276           <div class="interface-member-code">
277            <a class="interface-member-backlink" href="#interface.ExpectedString:B:"></a>
278<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">ExpectedString</span></span> <span class="ck">of</span> <span class="ci">string</span>
279</pre>
280           </div>
281           <div class="interface-member-description">
282            <p class="para _1">
283             Parsers report this <code class="fsharp"><span class="ci">ErrorMessage</span></code> when the input does not match an expected string
284             constant. The constructor argument is the expected string constant.
285            </p>
286            <p class="para _2">
287             This <code class="fsharp"><span class="ci">ErrorMessage</span></code> is mainly generated by the <code class="fsharp"><a
288             href="charparsers.html#members.pchar"><span class="ci">pchar</span></a></code> and <code class="fsharp"><a
289             href="charparsers.html#members.pstring"><span class="ci">pstring</span></a></code> parsers and its variants.
290            </p>
291           </div>
292          </div>
293          <div class="interface-member _3" id="members.ExpectedStringCI">
294           <div class="interface-member-code">
295            <a class="interface-member-backlink" href="#interface.ExpectedStringCI:B:"></a>
296<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">ExpectedStringCI</span></span> <span class="ck">of</span> <span class="ci">string</span>
297</pre>
298           </div>
299           <div class="interface-member-description">
300            <p class="para _1">
301             Parsers report this <code class="fsharp"><span class="ci">ErrorMessage</span></code> when the input does not match an expected
302             case‐insensitive string constant. The constructor argument is the expected string constant.
303            </p>
304            <p class="para _2">
305             This <code class="fsharp"><span class="ci">ErrorMessage</span></code> is mainly generated by the <code class="fsharp"><a
306             href="charparsers.html#members.pstringCI"><span class="ci">pstringCI</span></a></code> parsers and its variants.
307            </p>
308           </div>
309          </div>
310          <div class="interface-member _4" id="members.Unexpected">
311           <div class="interface-member-code">
312            <a class="interface-member-backlink" href="#interface.Unexpected:B:"></a>
313<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">Unexpected</span></span> <span class="ck">of</span> <span class="ci">string</span>
314</pre>
315           </div>
316           <div class="interface-member-description">
317            <p class="para _1">
318             Parsers report this <code class="fsharp"><span class="ci">ErrorMessage</span></code> when they encounter some unexpected input. The
319             string argument describes the unexpected input.
320            </p>
321            <p class="para _2">
322             This <code class="fsharp"><span class="ci">ErrorMessage</span></code> is mainly generated by the <code class="fsharp"><a
323             href="primitives.html#members.notFollowedByL"><span class="ci">notFollowedByL</span></a></code> primitive.
324            </p>
325           </div>
326          </div>
327          <div class="interface-member _5" id="members.UnexpectedString">
328           <div class="interface-member-code">
329            <a class="interface-member-backlink" href="#interface.UnexpectedString:B:"></a>
330<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">UnexpectedString</span></span> <span class="ck">of</span> <span class="ci">string</span>
331</pre>
332           </div>
333           <div class="interface-member-description">
334            <p class="para _1">
335             Parsers report this <code class="fsharp"><span class="ci">ErrorMessage</span></code> when they encounter an unexpected string constant.
336             The constructor argument is the unexpected string.
337            </p>
338            <p class="para _2">
339             This <code class="fsharp"><span class="ci">ErrorMessage</span></code> is mainly generated by the <code class="fsharp"><a
340             href="charparsers.html#members.notFollowedByChar"><span class="ci">notFollowedByChar</span></a></code> and <code class="fsharp"><a
341             href="charparsers.html#members.notFollowedByString"><span class="ci">notFollowedByString</span></a></code> parsers.
342            </p>
343           </div>
344          </div>
345          <div class="interface-member _6" id="members.UnexpectedStringCI">
346           <div class="interface-member-code">
347            <a class="interface-member-backlink" href="#interface.UnexpectedStringCI:B:"></a>
348<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">UnexpectedStringCI</span></span> <span class="ck">of</span> <span class="ci">string</span>
349</pre>
350           </div>
351           <div class="interface-member-description">
352            <p class="para _1">
353             Parsers report this <code class="fsharp"><span class="ci">ErrorMessage</span></code> when they encounter an unexpected case‐insensitive
354             string constant. The constructor argument is the unexpected string.
355            </p>
356            <p class="para _2">
357             This <code class="fsharp"><span class="ci">ErrorMessage</span></code> is mainly generated by the <code class="fsharp"><a
358             href="charparsers.html#members.notFollowedByStringCI"><span class="ci">notFollowedByStringCI</span></a></code> parsers.
359            </p>
360           </div>
361          </div>
362          <div class="interface-member _7" id="members.Message">
363           <div class="interface-member-code">
364            <a class="interface-member-backlink" href="#interface.Message:B:"></a>
365<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">Message</span></span> <span class="ck">of</span> <span class="ci">string</span>
366</pre>
367           </div>
368           <div class="interface-member-description">
369            <p class="para _1">
370             Parsers report this <code class="fsharp"><span class="ci">ErrorMessage</span></code> when an the error does not fit into the other
371             categories. The string argument contains the error message.
372            </p>
373            <p class="para _2">
374             This error message can be generated with the <code class="fsharp"><a href="primitives.html#members.fail"><span
375             class="ci">fail</span></a></code> and <code class="fsharp"><a href="primitives.html#members.failFatally"><span
376             class="ci">failFatally</span></a></code> primitives.
377            </p>
378           </div>
379          </div>
380          <div class="interface-member _8" id="members.CompoundError">
381           <div class="interface-member-code">
382            <a class="interface-member-backlink" href="#interface.CompoundError:B:"></a>
383<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">CompoundError</span></span> <span class="ck">of</span> <span class="ci">string</span> <span class="cp">*</span> <a href="position.html"><span class="ci">Position</span></a> <span class="cp">*</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
384</pre>
385           </div>
386           <div class="interface-member-description">
387            <p class="para _1">
388             Parsers report this <code class="fsharp"><span class="ci">ErrorMessage</span></code> when a &#x201C;compound&#x201D; failed to parse. The
389             constructor arguments are a label for the compound parser and the error (<code class="fsharp"><a href="#members.Position"><span
390             class="ci">Position</span></a></code> + <code class="fsharp"><a href="#members.ErrorMessageList"><span
391             class="ci">ErrorMessageList</span></a></code>) that caused the compound to fail to parse.
392            </p>
393            <p class="para _2">
394             This error message is mainly generated by the compound‐labelling operator <code class="fsharp"><a
395             href="primitives.html#members.:60::63::63::62:"><span class="co">&lt;??&gt;</span></a></code>.
396            </p>
397           </div>
398          </div>
399          <div class="interface-member _9" id="members.BacktrackPoint">
400           <div class="interface-member-code">
401            <a class="interface-member-backlink" href="#interface.BacktrackPoint:B:"></a>
402<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">BacktrackPoint</span></span> <span class="ck">of</span> <a href="position.html"><span class="ci">Position</span></a> <span class="cp">*</span> <a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a>
403</pre>
404           </div>
405           <div class="interface-member-description">
406            <p class="para _1">
407             Parsers report this <code class="fsharp"><span class="ci">ErrorMessage</span></code> when they backtracked after an error occurred. The
408             constructor argument is the error (<code class="fsharp"><a href="#members.Position"><span class="ci">Position</span></a></code> + <code
409             class="fsharp"><a href="#members.ErrorMessageList"><span class="ci">ErrorMessageList</span></a></code>) that occurred before the
410             backtracking.
411            </p>
412            <p class="para _2">
413             This error message is mainly generated by the <code class="fsharp"><a href="primitives.html#members.attempt"><span
414             class="ci">attempt</span></a></code>, <code class="fsharp"><a href="primitives.html#members.:62::62::63:"><span
415             class="co">&gt;&gt;?</span></a></code> and <code class="fsharp"><a href="primitives.html#members.:.::62::62::63:"><span
416             class="co">.&gt;&gt;?</span></a></code> primitives.
417            </p>
418           </div>
419          </div>
420          <div class="interface-member _0" id="members.OtherError">
421           <div class="interface-member-code">
422            <a class="interface-member-backlink" href="#interface.OtherError:B:"></a>
423<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">OtherError</span></span> <span class="ck">of</span> <a href="http://msdn.microsoft.com/en-us/library/system.icomparable.aspx"><span class="ci">System</span><span class="cm">.</span><span class="ci">IComparable</span></a>
424</pre>
425           </div>
426           <div class="interface-member-description">
427            <p class="para _1">
428             User‐defined parsers can return this <code class="fsharp"><span class="ci">ErrorMessage</span></code> to report application‐specific
429             error data. The object argument contains the error data.
430            </p>
431            <p class="para _2">
432             To display <code class="fsharp"><span class="ci">OtherError</span></code> values in error messages, you will have to define your own
433             error printer, as <code class="fsharp"><a href="#members.ParserError"><span class="ci">ParserError</span></a><span class="cm">.</span><a
434             href="#interface.ToString:47:WriteTo"><span class="ci">ToString</span><span class="co">/</span><span class="ci">WriteTo</span></a></code>
435             ignores them.
436            </p>
437           </div>
438          </div>
439         </div>
440        </div>
441       </div>
442      </div>
443      <div class="interface-member _2" id="members.ErrorMessageList">
444       <div class="interface-member-code">
445        <a class="interface-member-backlink" href="#interface.ErrorMessageList:B:"></a>
446<pre class="code fsharp"><span class="ck">type</span> <span class="interface-member-marker"><span class="ci">ErrorMessageList</span></span></pre>
447       </div>
448       <div class="interface-member-description">
449        <p class="para _1">
450         This union type represents a list of error messages in which the order of the messages carries no meaning and any duplicates and empty
451         messages are ignored. Essentially, an <code class="fsharp"><span class="ci">ErrorMessageList</span></code> is <em>constructed as a list, but
452         interpreted as a set</em>.
453        </p>
454        <p class="para _2">
455         All <code class="fsharp"><a href="#members.ErrorMessage"><span class="ci">ErrorMessage</span></a></code> values in an <code
456         class="fsharp"><span class="ci">ErrorMessageList</span></code> are associated with the same input stream position. For example, the error
457         messages stored in the <code class="fsharp"><a href="primitives.html#members.Reply"><span class="ci">Reply</span></a><span
458         class="cp">&lt;</span><span class="ci">_</span><span class="cp">,</span><span class="ci">_</span><span class="cp">&gt;</span><span
459         class="cp">.</span><a href="primitives.html#members.Error"><span class="ci">Error</span></a></code> field describe an error at the position
460         of the <code class="fsharp"><a href="primitives.html#members.Reply"><span class="ci">Reply</span></a><span class="cp">&lt;</span><span
461         class="ci">_</span><span class="cp">,</span><span class="ci">_</span><span class="cp">&gt;</span><span class="cp">.</span><a
462         href="state.html"><span class="ci">State</span></a></code> value. The <code class="fsharp"><a href="#members.ParserError"><span
463         class="ci">ParserError</span></a></code> type is a convenient container type for binding together an <code class="fsharp"><span
464         class="ci">ErrorMessageList</span></code> with its associated position.
465        </p>
466        <p class="para _3">
467         The easiest way to process an <code class="fsharp"><span class="ci">ErrorMessageList</span></code> as a set is to convert it into an actual
468         set by using the <code class="fsharp"><a href="#members.ToSet"><span class="ci">ToSet</span></a></code> member. For example, the <code
469         class="fsharp"><a href="#members.ParserError"><span class="ci">ParserError</span></a><span class="cm">.</span><a
470         href="#members.WriteTo"><span class="ci">WriteTo</span></a></code> method uses this method to filter out duplicates before printing out the
471         messages.
472        </p>
473        <p class="para _4">
474         In order to enforce set semantics in comparison operations, the <code class="fsharp"><span class="ci">ErrorMessageList</span></code>
475         overrides the <code class="fsharp"><span class="ci">Equals</span></code>, <code class="fsharp"><span class="ci">GetHashCode</span></code> and
476         <code class="fsharp"><span class="ci">CompareTo</span></code> methods.
477        </p>
478        <div class="para _5">
479         <div class="interface-members">
480          <div class="interface-member _1" id="members.AddErrorMessage">
481           <div class="interface-member-code">
482            <a class="interface-member-backlink" href="#interface.AddErrorMessage:B:"></a>
483<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">AddErrorMessage</span></span> <span class="ck">of</span> <a href="#members.ErrorMessage"><span class="ci">ErrorMessage</span></a> <span class="cp">*</span> <span class="ci">ErrorMessageList</span>
484</pre>
485           </div>
486           <div class="interface-member-description">
487            <p class="para _1">
488             Creates a new <code class="fsharp"><span class="ci">ErrorMessageList</span></code> with the given &#x201C;head&#x201D; and
489             &#x201C;tail&#x201D;.
490            </p>
491            <div class="para _2">
492             <p>For example,</p>
493<pre class="code fsharp"><span class="ci">AddErrorMessage</span><span class="cp">(</span><a href="#members.Expected"><span class="ci">Expected</span></a> <span class="cs"><span class="left-delimiter">"</span>a<span class="right-delimiter">"</span></span><span class="cp">,</span>
494                <span class="ci">AddErrorMessage</span><span class="cp">(</span><a href="#members.Expected"><span class="ci">Expected</span></a> <span class="cs"><span class="left-delimiter">"</span>b<span class="right-delimiter">"</span></span><span class="cp">,</span> <a href="#members.NoErrorMessages"><span class="ci">NoErrorMessages</span></a><span class="cp">)</span><span class="cp">)</span>
495</pre>
496             <p>creates an <code class="fsharp"><span class="ci">ErrorMessageList</span></code> with two error messages.</p>
497            </div>
498           </div>
499          </div>
500          <div class="interface-member _2" id="members.NoErrorMessages">
501           <div class="interface-member-code">
502            <a class="interface-member-backlink" href="#interface.NoErrorMessages:B:"></a>
503<pre class="code fsharp"><span class="cp">|</span> <span class="interface-member-marker"><span class="ci">NoErrorMessages</span></span>
504</pre>
505           </div>
506           <div class="interface-member-description">
507            <p class="para _1">
508             The empty <code class="fsharp"><span class="ci">ErrorMessageList</span></code>. This value is represented as <code class="fsharp"><span
509             class="cnu">null</span></code>.
510            </p>
511           </div>
512          </div>
513          <div class="interface-member _3" id="members.ToSet">
514           <div class="interface-member-code">
515            <a class="interface-member-backlink" href="#interface.ToSet:B:"></a>
516<pre class="code fsharp"><span class="ck">member</span> <span class="interface-member-marker"><span class="ci">ToSet</span></span><span class="cp">:</span> <span class="ci">unit</span> <span class="cr">-&gt;</span> <span class="ci">Set</span><span class="cp">&lt;</span><a href="#members.ErrorMessage"><span class="ci">ErrorMessage</span></a><span class="cp">&gt;</span>
517</pre>
518           </div>
519           <div class="interface-member-description">
520            <p class="para _1">
521             Converts the <code class="fsharp"><span class="ci">ErrorMessageList</span></code> to a <code class="fsharp"><span
522             class="ci">Set</span><span class="cp">&lt;</span><span class="ci">ErrorMessageList</span><span class="cp">&gt;</span></code>. Duplicate
523             error messages and empty <code class="fsharp"><a href="#members.Expected"><span class="ci">Expected</span></a></code>, <code
524             class="fsharp"><a href="#members.Unexpected"><span class="ci">Unexpected</span></a></code> and <code class="fsharp"><a
525             href="#members.Message"><span class="ci">Message</span></a></code> messages are filtered out when the list is converted to a set.
526            </p>
527           </div>
528          </div>
529          <div class="interface-member _4" id="members.OfSeq">
530           <div class="interface-member-code">
531            <a class="interface-member-backlink" href="#interface.OfSeq:B:"></a>
532<pre class="code fsharp"><span class="ck">static</span> <span class="ck">member</span> <span class="interface-member-marker"><span class="ci">OfSeq</span></span><span class="cp">:</span> <span class="ci…

Large files files are truncated, but you can click here to view the full file