1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>End of Input Parser (eoi)</title> 5<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../../../index.html" title="Spirit 2.5.8"> 8<link rel="up" href="../auxiliary.html" title="Auxiliary Parsers"> 9<link rel="prev" href="eol.html" title="End of Line Parser (eol)"> 10<link rel="next" href="eps.html" title="Epsilon Parser (eps)"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="eol.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="eps.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h5 class="title"> 27<a name="spirit.qi.reference.auxiliary.eoi"></a><a class="link" href="eoi.html" title="End of Input Parser (eoi)">End of Input Parser 28 (<code class="computeroutput"><span class="identifier">eoi</span></code>)</a> 29</h5></div></div></div> 30<h6> 31<a name="spirit.qi.reference.auxiliary.eoi.h0"></a> 32 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eoi.description"></a></span><a class="link" href="eoi.html#spirit.qi.reference.auxiliary.eoi.description">Description</a> 33 </h6> 34<p> 35 The <code class="computeroutput"><span class="identifier">eoi</span></code> parser matches 36 the end of input (returns a successful match with 0 length when the input 37 is exhausted) 38 </p> 39<h6> 40<a name="spirit.qi.reference.auxiliary.eoi.h1"></a> 41 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eoi.header"></a></span><a class="link" href="eoi.html#spirit.qi.reference.auxiliary.eoi.header">Header</a> 42 </h6> 43<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/auxiliary/eoi.hpp></span> 44<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_eoi</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> 45</pre> 46<p> 47 Also, see <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>. 48 </p> 49<h6> 50<a name="spirit.qi.reference.auxiliary.eoi.h2"></a> 51 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eoi.namespace"></a></span><a class="link" href="eoi.html#spirit.qi.reference.auxiliary.eoi.namespace">Namespace</a> 52 </h6> 53<div class="informaltable"><table class="table"> 54<colgroup><col></colgroup> 55<thead><tr><th> 56 <p> 57 Name 58 </p> 59 </th></tr></thead> 60<tbody><tr><td> 61 <p> 62 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">eoi</span> <span class="comment">// alias: 63 boost::spirit::qi::eoi</span></code> 64 </p> 65 </td></tr></tbody> 66</table></div> 67<h6> 68<a name="spirit.qi.reference.auxiliary.eoi.h3"></a> 69 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eoi.model_of"></a></span><a class="link" href="eoi.html#spirit.qi.reference.auxiliary.eoi.model_of">Model 70 of</a> 71 </h6> 72<div class="blockquote"><blockquote class="blockquote"><p> 73 <a class="link" href="../parser_concepts/primitiveparser.html" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a> 74 </p></blockquote></div> 75<h6> 76<a name="spirit.qi.reference.auxiliary.eoi.h4"></a> 77 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eoi.expression_semantics"></a></span><a class="link" href="eoi.html#spirit.qi.reference.auxiliary.eoi.expression_semantics">Expression 78 Semantics</a> 79 </h6> 80<p> 81 Semantics of an expression is defined only where it differs from, or 82 is not defined in <a class="link" href="../parser_concepts/primitiveparser.html" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a>. 83 </p> 84<div class="informaltable"><table class="table"> 85<colgroup> 86<col> 87<col> 88</colgroup> 89<thead><tr> 90<th> 91 <p> 92 Expression 93 </p> 94 </th> 95<th> 96 <p> 97 Semantics 98 </p> 99 </th> 100</tr></thead> 101<tbody><tr> 102<td> 103 <p> 104 <code class="computeroutput"><span class="identifier">eoi</span></code> 105 </p> 106 </td> 107<td> 108 <p> 109 Create a parser that matches the end of input. 110 </p> 111 </td> 112</tr></tbody> 113</table></div> 114<h6> 115<a name="spirit.qi.reference.auxiliary.eoi.h5"></a> 116 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eoi.attributes"></a></span><a class="link" href="eoi.html#spirit.qi.reference.auxiliary.eoi.attributes">Attributes</a> 117 </h6> 118<div class="informaltable"><table class="table"> 119<colgroup> 120<col> 121<col> 122</colgroup> 123<thead><tr> 124<th> 125 <p> 126 Expression 127 </p> 128 </th> 129<th> 130 <p> 131 Attribute 132 </p> 133 </th> 134</tr></thead> 135<tbody><tr> 136<td> 137 <p> 138 <code class="computeroutput"><span class="identifier">eoi</span></code> 139 </p> 140 </td> 141<td> 142 <p> 143 <code class="computeroutput"><span class="identifier">unused</span></code> 144 </p> 145 </td> 146</tr></tbody> 147</table></div> 148<h6> 149<a name="spirit.qi.reference.auxiliary.eoi.h6"></a> 150 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eoi.complexity"></a></span><a class="link" href="eoi.html#spirit.qi.reference.auxiliary.eoi.complexity">Complexity</a> 151 </h6> 152<div class="blockquote"><blockquote class="blockquote"><p> 153 O(1) 154 </p></blockquote></div> 155<h6> 156<a name="spirit.qi.reference.auxiliary.eoi.h7"></a> 157 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eoi.example"></a></span><a class="link" href="eoi.html#spirit.qi.reference.auxiliary.eoi.example">Example</a> 158 </h6> 159<div class="note"><table border="0" summary="Note"> 160<tr> 161<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../images/note.png"></td> 162<th align="left">Note</th> 163</tr> 164<tr><td align="left" valign="top"><p> 165 The test harness for the example(s) below is presented in the <a class="link" href="../basics.html#spirit.qi.reference.basics.examples">Basics Examples</a> 166 section. 167 </p></td></tr> 168</table></div> 169<p> 170 Some using declarations: 171 </p> 172<p> 173</p> 174<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">qi</span><span class="special">::</span><span class="identifier">eoi</span><span class="special">;</span> 175</pre> 176<p> 177 </p> 178<p> 179 Using <code class="computeroutput"><span class="identifier">eoi</span></code>: 180 </p> 181<p> 182</p> 183<pre class="programlisting"><span class="identifier">test_parser</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">eoi</span><span class="special">);</span> 184</pre> 185<p> 186 </p> 187</div> 188<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 189<td align="left"></td> 190<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p> 191 Distributed under the Boost Software License, Version 1.0. (See accompanying 192 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 193 </p> 194</div></td> 195</tr></table> 196<hr> 197<div class="spirit-nav"> 198<a accesskey="p" href="eol.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="eps.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 199</div> 200</body> 201</html> 202