blob: 75f14338c0e13545a5c0aed3f811567f8ae29503 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Combinators which take one or more parsers and applies them repeatedly."><meta name="keywords" content="rust, rustlang, rust-lang, repeat"><title>combine::parser::repeat - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../../normalize.css"><link rel="stylesheet" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../../ayu.css" disabled><link rel="stylesheet" href="../../../dark.css" disabled><link rel="stylesheet" href="../../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../../storage.js"></script><script defer src="../../../main.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../../combine/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../../combine/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">Module repeat</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Module <a href="../../index.html">combine</a>::<wbr><a href="../index.html">parser</a>::<wbr><a class="mod" href="#">repeat</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../../src/combine/parser/repeat.rs.html#1-1620">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Combinators which take one or more parsers and applies them repeatedly.</p>
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Chainl1.html" title="combine::parser::repeat::Chainl1 struct">Chainl1</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Chainr1.html" title="combine::parser::repeat::Chainr1 struct">Chainr1</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Count.html" title="combine::parser::repeat::Count struct">Count</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.CountMinMax.html" title="combine::parser::repeat::CountMinMax struct">CountMinMax</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Escaped.html" title="combine::parser::repeat::Escaped struct">Escaped</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.EscapedState.html" title="combine::parser::repeat::EscapedState struct">EscapedState</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Iter.html" title="combine::parser::repeat::Iter struct">Iter</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Iterate.html" title="combine::parser::repeat::Iterate struct">Iterate</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Many.html" title="combine::parser::repeat::Many struct">Many</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Many1.html" title="combine::parser::repeat::Many1 struct">Many1</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.RepeatUntil.html" title="combine::parser::repeat::RepeatUntil struct">RepeatUntil</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SepBy.html" title="combine::parser::repeat::SepBy struct">SepBy</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SepBy1.html" title="combine::parser::repeat::SepBy1 struct">SepBy1</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SepEndBy.html" title="combine::parser::repeat::SepEndBy struct">SepEndBy</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SepEndBy1.html" title="combine::parser::repeat::SepEndBy1 struct">SepEndBy1</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SkipCount.html" title="combine::parser::repeat::SkipCount struct">SkipCount</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SkipCountMinMax.html" title="combine::parser::repeat::SkipCountMinMax struct">SkipCountMinMax</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SkipMany.html" title="combine::parser::repeat::SkipMany struct">SkipMany</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SkipMany1.html" title="combine::parser::repeat::SkipMany1 struct">SkipMany1</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SkipRepeatUntil.html" title="combine::parser::repeat::SkipRepeatUntil struct">SkipRepeatUntil</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SkipUntil.html" title="combine::parser::repeat::SkipUntil struct">SkipUntil</a></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.TakeUntil.html" title="combine::parser::repeat::TakeUntil struct">TakeUntil</a></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2><div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.chainl1.html" title="combine::parser::repeat::chainl1 fn">chainl1</a></div><div class="item-right docblock-short">Parses <code>p</code> 1 or more times separated by <code>op</code>. The value returned is the one produced by the
left associative application of the function returned by the parser <code>op</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.chainr1.html" title="combine::parser::repeat::chainr1 fn">chainr1</a></div><div class="item-right docblock-short">Parses <code>p</code> one or more times separated by <code>op</code>. The value returned is the one produced by the
right associative application of the function returned by <code>op</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.count.html" title="combine::parser::repeat::count fn">count</a></div><div class="item-right docblock-short">Parses <code>parser</code> from zero up to <code>count</code> times.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.count_min_max.html" title="combine::parser::repeat::count_min_max fn">count_min_max</a></div><div class="item-right docblock-short">Parses <code>parser</code> from <code>min</code> to <code>max</code> times (including <code>min</code> and <code>max</code>).</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.escaped.html" title="combine::parser::repeat::escaped fn">escaped</a></div><div class="item-right docblock-short">Parses an escaped string by first applying <code>parser</code> which accept the normal characters which do
not need escaping. Once <code>parser</code> can not consume any more input it checks if the next token
is <code>escape</code>. If it is then <code>escape_parser</code> is used to parse the escaped character and then
resumes parsing using <code>parser</code>. If <code>escape</code> was not found then the parser finishes
successfully.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.iterate.html" title="combine::parser::repeat::iterate fn">iterate</a></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.many.html" title="combine::parser::repeat::many fn">many</a></div><div class="item-right docblock-short">Parses <code>p</code> zero or more times returning a collection with the values from <code>p</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.many1.html" title="combine::parser::repeat::many1 fn">many1</a></div><div class="item-right docblock-short">Parses <code>p</code> one or more times returning a collection with the values from <code>p</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.repeat_skip_until.html" title="combine::parser::repeat::repeat_skip_until fn">repeat_skip_until</a></div><div class="item-right docblock-short">Skips input until <code>end</code> is encountered or <code>end</code> indicates that it has committed input before
failing (<code>attempt</code> can be used to continue skipping even if <code>end</code> has committed input)</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.repeat_until.html" title="combine::parser::repeat::repeat_until fn">repeat_until</a></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.sep_by.html" title="combine::parser::repeat::sep_by fn">sep_by</a></div><div class="item-right docblock-short">Parses <code>parser</code> zero or more time separated by <code>separator</code>, returning a collection with the
values from <code>p</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.sep_by1.html" title="combine::parser::repeat::sep_by1 fn">sep_by1</a></div><div class="item-right docblock-short">Parses <code>parser</code> one or more time separated by <code>separator</code>, returning a collection with the
values from <code>p</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.sep_end_by.html" title="combine::parser::repeat::sep_end_by fn">sep_end_by</a></div><div class="item-right docblock-short">Parses <code>parser</code> zero or more times separated and ended by <code>separator</code>, returning a collection
with the values from <code>p</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.sep_end_by1.html" title="combine::parser::repeat::sep_end_by1 fn">sep_end_by1</a></div><div class="item-right docblock-short">Parses <code>parser</code> one or more times separated and ended by <code>separator</code>, returning a collection
with the values from <code>p</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.skip_count.html" title="combine::parser::repeat::skip_count fn">skip_count</a></div><div class="item-right docblock-short">Parses <code>parser</code> from zero up to <code>count</code> times skipping the output of <code>parser</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.skip_count_min_max.html" title="combine::parser::repeat::skip_count_min_max fn">skip_count_min_max</a></div><div class="item-right docblock-short">Parses <code>parser</code> from <code>min</code> to <code>max</code> times (including <code>min</code> and <code>max</code>)
skipping the output of <code>parser</code>.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.skip_many.html" title="combine::parser::repeat::skip_many fn">skip_many</a></div><div class="item-right docblock-short">Parses <code>p</code> zero or more times ignoring the result.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.skip_many1.html" title="combine::parser::repeat::skip_many1 fn">skip_many1</a></div><div class="item-right docblock-short">Parses <code>p</code> one or more times ignoring the result.</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.skip_until.html" title="combine::parser::repeat::skip_until fn">skip_until</a></div><div class="item-right docblock-short">Skips input until <code>end</code> is encountered or <code>end</code> indicates that it has committed input before
failing (<code>attempt</code> can be used to make it look like it has not committed any input)</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.take_until.html" title="combine::parser::repeat::take_until fn">take_until</a></div><div class="item-right docblock-short">Takes input until <code>end</code> is encountered or <code>end</code> indicates that it has committed input before
failing (<code>attempt</code> can be used to make it look like it has not committed any input)</div></div></div></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="combine" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>