<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Reparse (reparse.Reparse)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.0.0-beta4"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> â€“ <a href="../index.html">reparse</a> &#x00BB; Reparse</nav><header class="odoc-preamble"><h1>Module <code><span>Reparse</span></code></h1></header><nav class="odoc-toc"><ul><li><a href="#overview">Overview</a></li></ul></nav><div class="odoc-content"><h2 id="overview"><a href="#overview" class="anchor"></a>Overview</h2><p>Parser provides functions and types to construct robust, performant and reusable parsers. At the core is a type <a href="module-type-PARSER/index.html#type-t"><code>Reparse.PARSER.t</code></a> which represents a constructed parser definition. A parser <a href="module-type-PARSER/index.html#type-t"><code>Reparse.PARSER.t</code></a> is defined by composing together one or more parsers or <code>Reparse</code>.ts via usage of parser operators.</p><p>An instance of <a href="module-type-PARSER/index.html#type-t"><code>Reparse.PARSER.t</code></a> represents an un-evaluated parser. Use <a href="module-type-PARSER/index.html#val-parse"><code>Reparse.PARSER.parse</code></a> function to evaluate it.</p><p><code>Reparse</code>.INPUT represents a generalization of data input to <code>Reparse</code>.parse. Implement the interface to create new input types.</p><p>Parser functions are broadly organized into following categories:</p><ul><li>Monadic parsers</li><li>Char/String parsers</li><li>Alternate parsers</li><li>Boolean parsers</li><li>Repetition parsers</li><li>RFC 5234 parsers</li><li>Others</li></ul><div class="odoc-spec"><div class="spec module-type" id="module-type-PARSER" class="anchored"><a href="#module-type-PARSER" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> </span><span><a href="module-type-PARSER/index.html">PARSER</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module-type" id="module-type-INPUT" class="anchored"><a href="#module-type-INPUT" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> </span><span><a href="module-type-INPUT/index.html">INPUT</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module" id="module-Make" class="anchored"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="Make/index.html">Make</a></span><span> (<a href="Make/argument-1-Input/index.html">Input</a> : <a href="module-type-INPUT/index.html">INPUT</a>) : <a href="module-type-PARSER/index.html">PARSER</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="module-type-PARSER/index.html#type-promise">promise</a></span> = <span><span class="type-var">'a</span> <a href="Make/argument-1-Input/index.html#type-promise">Input.promise</a></span></span> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-PARSER/index.html#type-input">input</a> = <a href="Make/argument-1-Input/index.html#type-t">Input.t</a></span></span></code></div><div class="spec-doc"><p>A functor to create parsers based on the given <code>Input</code> module.</p></div></div><div class="odoc-spec"><div class="spec module" id="module-String" class="anchored"><a href="#module-String" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="String/index.html">String</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>A parser when the input is a <code>string</code>.</p></div></div></div></body></html>