1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>End of Line Parser (eol)</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="attr_cast.html" title="Attribute Transformation Pseudo Parser (attr_cast)"> 10<link rel="next" href="eoi.html" title="End of Input Parser (eoi)"> 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="attr_cast.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="eoi.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.eol"></a><a class="link" href="eol.html" title="End of Line Parser (eol)">End of Line Parser 28 (<code class="computeroutput"><span class="identifier">eol</span></code>)</a> 29</h5></div></div></div> 30<h6> 31<a name="spirit.qi.reference.auxiliary.eol.h0"></a> 32 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eol.description"></a></span><a class="link" href="eol.html#spirit.qi.reference.auxiliary.eol.description">Description</a> 33 </h6> 34<p> 35 The <code class="computeroutput"><span class="identifier">eol</span></code> parser matches 36 the end of line (CR/LF and combinations thereof). 37 </p> 38<h6> 39<a name="spirit.qi.reference.auxiliary.eol.h1"></a> 40 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eol.header"></a></span><a class="link" href="eol.html#spirit.qi.reference.auxiliary.eol.header">Header</a> 41 </h6> 42<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/auxiliary/eol.hpp></span> 43<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_eol</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> 44</pre> 45<p> 46 Also, see <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>. 47 </p> 48<h6> 49<a name="spirit.qi.reference.auxiliary.eol.h2"></a> 50 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eol.namespace"></a></span><a class="link" href="eol.html#spirit.qi.reference.auxiliary.eol.namespace">Namespace</a> 51 </h6> 52<div class="informaltable"><table class="table"> 53<colgroup><col></colgroup> 54<thead><tr><th> 55 <p> 56 Name 57 </p> 58 </th></tr></thead> 59<tbody><tr><td> 60 <p> 61 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">eol</span> <span class="comment">// alias: 62 boost::spirit::qi::eol</span></code> 63 </p> 64 </td></tr></tbody> 65</table></div> 66<h6> 67<a name="spirit.qi.reference.auxiliary.eol.h3"></a> 68 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eol.model_of"></a></span><a class="link" href="eol.html#spirit.qi.reference.auxiliary.eol.model_of">Model 69 of</a> 70 </h6> 71<div class="blockquote"><blockquote class="blockquote"><p> 72 <a class="link" href="../parser_concepts/primitiveparser.html" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a> 73 </p></blockquote></div> 74<h6> 75<a name="spirit.qi.reference.auxiliary.eol.h4"></a> 76 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eol.expression_semantics"></a></span><a class="link" href="eol.html#spirit.qi.reference.auxiliary.eol.expression_semantics">Expression 77 Semantics</a> 78 </h6> 79<p> 80 Semantics of an expression is defined only where it differs from, or 81 is not defined in <a class="link" href="../parser_concepts/primitiveparser.html" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a>. 82 </p> 83<div class="informaltable"><table class="table"> 84<colgroup> 85<col> 86<col> 87</colgroup> 88<thead><tr> 89<th> 90 <p> 91 Expression 92 </p> 93 </th> 94<th> 95 <p> 96 Semantics 97 </p> 98 </th> 99</tr></thead> 100<tbody><tr> 101<td> 102 <p> 103 <code class="computeroutput"><span class="identifier">eol</span></code> 104 </p> 105 </td> 106<td> 107 <p> 108 Create a parser that matches the end of line. 109 </p> 110 </td> 111</tr></tbody> 112</table></div> 113<h6> 114<a name="spirit.qi.reference.auxiliary.eol.h5"></a> 115 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eol.attributes"></a></span><a class="link" href="eol.html#spirit.qi.reference.auxiliary.eol.attributes">Attributes</a> 116 </h6> 117<div class="informaltable"><table class="table"> 118<colgroup> 119<col> 120<col> 121</colgroup> 122<thead><tr> 123<th> 124 <p> 125 Expression 126 </p> 127 </th> 128<th> 129 <p> 130 Attribute 131 </p> 132 </th> 133</tr></thead> 134<tbody><tr> 135<td> 136 <p> 137 <code class="computeroutput"><span class="identifier">eol</span></code> 138 </p> 139 </td> 140<td> 141 <p> 142 <code class="computeroutput"><span class="identifier">unused</span></code> 143 </p> 144 </td> 145</tr></tbody> 146</table></div> 147<h6> 148<a name="spirit.qi.reference.auxiliary.eol.h6"></a> 149 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eol.complexity"></a></span><a class="link" href="eol.html#spirit.qi.reference.auxiliary.eol.complexity">Complexity</a> 150 </h6> 151<div class="blockquote"><blockquote class="blockquote"><p> 152 O(1) 153 </p></blockquote></div> 154<h6> 155<a name="spirit.qi.reference.auxiliary.eol.h7"></a> 156 <span class="phrase"><a name="spirit.qi.reference.auxiliary.eol.example"></a></span><a class="link" href="eol.html#spirit.qi.reference.auxiliary.eol.example">Example</a> 157 </h6> 158<div class="note"><table border="0" summary="Note"> 159<tr> 160<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../images/note.png"></td> 161<th align="left">Note</th> 162</tr> 163<tr><td align="left" valign="top"><p> 164 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> 165 section. 166 </p></td></tr> 167</table></div> 168<p> 169 Some using declarations: 170 </p> 171<p> 172</p> 173<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">eol</span><span class="special">;</span> 174</pre> 175<p> 176 </p> 177<p> 178 Using <code class="computeroutput"><span class="identifier">eol</span></code>: 179 </p> 180<p> 181</p> 182<pre class="programlisting"><span class="identifier">test_parser</span><span class="special">(</span><span class="string">"\n"</span><span class="special">,</span> <span class="identifier">eol</span><span class="special">);</span> 183</pre> 184<p> 185 </p> 186</div> 187<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 188<td align="left"></td> 189<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p> 190 Distributed under the Boost Software License, Version 1.0. (See accompanying 191 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>) 192 </p> 193</div></td> 194</tr></table> 195<hr> 196<div class="spirit-nav"> 197<a accesskey="p" href="attr_cast.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="eoi.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 198</div> 199</body> 200</html> 201