csharpfftfsharpintegrationinterpolationlinear-algebramathdifferentiationmatrixnumericsrandomregressionstatisticsmathnet
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
4.7 KiB
70 lines
4.7 KiB
<HTML><HEAD><TITLE>Microsoft.FSharp.Compatibility.OCaml.Parsing</TITLE><link rel="stylesheet" type="text/css"href="../msdn.css"></link></HEAD><BODY>
|
|
<br><dl>
|
|
<dt></dt><dd>
|
|
<h1>[<a href='../namespaces.html'>Home</a>] Module <a href='Microsoft.FSharp.Compatibility.html'>Microsoft.FSharp.Compatibility</a>.<a href='Microsoft.FSharp.Compatibility.OCaml.html'>OCaml</a>.Parsing </h1><br>
|
|
</dd>
|
|
<dt></dt><dd>
|
|
<table>
|
|
<tr valign='top'><td><summary>
|
|
Parsing: parser support for parsers produced by fsyacc.
|
|
|
|
Parsers generated by fsyacc provide location information within parser
|
|
actions. However that information is not available globally, but
|
|
rather is accessed via the functions available on the following local
|
|
variable which is available in all parser actions:
|
|
|
|
parseState : 'a Microsoft.FSharp.Text.Parsing.IParseState
|
|
|
|
However, this is not compatible with the parser specifications used
|
|
with ocamlyacc and similar tools, which make a single parser state available
|
|
globally. If you wish to use a global parser state (e.g. so your code will
|
|
cross-compile with OCaml) then you can use the functions in this file.
|
|
You will need to either generate the parser with '--ml-compatibility' option
|
|
or add the code
|
|
|
|
Parsing.set_parse_state parseState;
|
|
|
|
at the start of each action of your grammar. The functions below
|
|
simply report the results of corresponding calls to the latest object
|
|
specified by a call to set_parse_state.
|
|
|
|
Note that there could be unprotected multi-threaded concurrent access for the
|
|
parser information, so you should not in general use these
|
|
functions if there may be more than one parser active, and
|
|
should instead use the functions directly available from the parseState
|
|
object.
|
|
</summary>
|
|
<dt><h3>Exceptions</h3></dt><dd>
|
|
<table width="100%%">
|
|
<tr><th width=40%>Exception</th><th>Description</th></tr>
|
|
<tr valign="top"><td>exception <a href='Microsoft.FSharp.Compatibility.OCaml.Parsing.type_Parse_error.html'>Parse_error</a></td><td><summary>
|
|
You can initialize error recovery by raising the Parse_error exception.
|
|
</summary> Note: an abbreviation for <tt>= <a href='Microsoft.FSharp.Text.Parsing.type_RecoverableParseError.html'>RecoverableParseError</a></tt></td></tr>
|
|
|
|
</table>
|
|
</dd>
|
|
<dt><h3>Values</h3></dt><dd>
|
|
<table width="100%%">
|
|
<tr><th width=60%>Value</th><th>Description</th></tr>
|
|
<tr valign="top"><td><pre>val rhs_end : <a href='../FSharp.Core/Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='../FSharp.Core/Microsoft.FSharp.Core.type__int.html'>int</a></pre></td><td></td></tr>
|
|
<tr valign="top"><td><pre>val rhs_end_pos : <a href='../FSharp.Core/Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Compatibility.OCaml.Lexing.type__position.html'>position</a></pre></td><td></td></tr>
|
|
<tr valign="top"><td><pre>val rhs_start : <a href='../FSharp.Core/Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='../FSharp.Core/Microsoft.FSharp.Core.type__int.html'>int</a></pre></td><td></td></tr>
|
|
<tr valign="top"><td><pre>val rhs_start_pos : <a href='../FSharp.Core/Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Compatibility.OCaml.Lexing.type__position.html'>position</a></pre></td><td></td></tr>
|
|
<tr valign="top"><td><pre>val set_parse_state : <a href='Microsoft.FSharp.Text.Parsing.type_IParseState.html'>IParseState</a> -> <a href='../FSharp.Core/Microsoft.FSharp.Core.type__unit.html'>unit</a></pre></td><td></td></tr>
|
|
<tr valign="top"><td><pre>val symbol_end : <a href='../FSharp.Core/Microsoft.FSharp.Core.type__unit.html'>unit</a> -> <a href='../FSharp.Core/Microsoft.FSharp.Core.type__int.html'>int</a></pre></td><td></td></tr>
|
|
<tr valign="top"><td><pre>val symbol_end_pos : <a href='../FSharp.Core/Microsoft.FSharp.Core.type__unit.html'>unit</a> -> <a href='Microsoft.FSharp.Compatibility.OCaml.Lexing.type__position.html'>position</a></pre></td><td></td></tr>
|
|
<tr valign="top"><td><pre>val symbol_start : <a href='../FSharp.Core/Microsoft.FSharp.Core.type__unit.html'>unit</a> -> <a href='../FSharp.Core/Microsoft.FSharp.Core.type__int.html'>int</a></pre></td><td></td></tr>
|
|
<tr valign="top"><td><pre>val symbol_start_pos : <a href='../FSharp.Core/Microsoft.FSharp.Core.type__unit.html'>unit</a> -> <a href='Microsoft.FSharp.Compatibility.OCaml.Lexing.type__position.html'>position</a></pre></td><td></td></tr>
|
|
|
|
</table>
|
|
</dd>
|
|
</td></tr>
|
|
<tr valign='top'><td>
|
|
<dt><h3>See Also</h3></dt><dd>
|
|
<a href="Microsoft.FSharp.Compatibility.OCaml.html">Microsoft.FSharp.Compatibility.OCaml</a> </dd>
|
|
</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<br /> <br/><p><i>Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using <a href='http://research.microsoft.com/fsharp/'>F# Programming Language</a> version 1.9.6.16</i></p>
|
|
</BODY></HTML>
|
|
|