1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>PrimitiveLexer</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="../lexer_concepts.html" title="Lexer Concepts"> 9<link rel="prev" href="lexer.html" title="Lexer"> 10<link rel="next" href="unarylexer.html" title="UnaryLexer"> 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="lexer.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../lexer_concepts.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="unarylexer.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.lex.reference.lexer_concepts.primitivelexer"></a><a class="link" href="primitivelexer.html" title="PrimitiveLexer">PrimitiveLexer</a> 28</h5></div></div></div> 29<h6> 30<a name="spirit.lex.reference.lexer_concepts.primitivelexer.h0"></a> 31 <span class="phrase"><a name="spirit.lex.reference.lexer_concepts.primitivelexer.description"></a></span><a class="link" href="primitivelexer.html#spirit.lex.reference.lexer_concepts.primitivelexer.description">Description</a> 32 </h6> 33<p> 34 <span class="emphasis"><em>PrimitiveLexer</em></span> is the most basic building block 35 that the client uses to build more complex lexer components. 36 </p> 37<h6> 38<a name="spirit.lex.reference.lexer_concepts.primitivelexer.h1"></a> 39 <span class="phrase"><a name="spirit.lex.reference.lexer_concepts.primitivelexer.refinement_of"></a></span><a class="link" href="primitivelexer.html#spirit.lex.reference.lexer_concepts.primitivelexer.refinement_of">Refinement 40 of</a> 41 </h6> 42<div class="blockquote"><blockquote class="blockquote"><p> 43 <a class="link" href="lexer.html" title="Lexer"><code class="computeroutput"><span class="identifier">Lexer</span></code></a> 44 </p></blockquote></div> 45<h6> 46<a name="spirit.lex.reference.lexer_concepts.primitivelexer.h2"></a> 47 <span class="phrase"><a name="spirit.lex.reference.lexer_concepts.primitivelexer.type_expressions"></a></span><a class="link" href="primitivelexer.html#spirit.lex.reference.lexer_concepts.primitivelexer.type_expressions">Type 48 Expressions</a> 49 </h6> 50<div class="informaltable"><table class="table"> 51<colgroup> 52<col> 53<col> 54</colgroup> 55<thead><tr> 56<th> 57 <p> 58 Expression 59 </p> 60 </th> 61<th> 62 <p> 63 Description 64 </p> 65 </th> 66</tr></thead> 67<tbody><tr> 68<td> 69 <p> 70 <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_primitive_lexer</span><span class="special"><</span><span class="identifier">L</span><span class="special">>::</span><span class="identifier">type</span></code> 71 </p> 72 </td> 73<td> 74 <p> 75 Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code> 76 if a certain type, <code class="computeroutput"><span class="identifier">L</span></code>, 77 is a PrimitiveLexer, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code> 78 otherwise (See <a href="../../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL 79 Boolean Constant</a>). 80 </p> 81 </td> 82</tr></tbody> 83</table></div> 84<h6> 85<a name="spirit.lex.reference.lexer_concepts.primitivelexer.h3"></a> 86 <span class="phrase"><a name="spirit.lex.reference.lexer_concepts.primitivelexer.models"></a></span><a class="link" href="primitivelexer.html#spirit.lex.reference.lexer_concepts.primitivelexer.models">Models</a> 87 </h6> 88<p> 89 The following lexer components conform to this model: 90 </p> 91<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 92<li class="listitem"> 93 character literals (i.e. <code class="computeroutput"><span class="char">'x'</span></code>), 94 <code class="computeroutput"><span class="identifier">char_</span></code>, 95 </li> 96<li class="listitem"> 97 string literals (<code class="computeroutput"><span class="string">"abc"</span></code>), 98 <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><></span></code>, 99 <code class="computeroutput"><span class="identifier">string</span></code> 100 </li> 101</ul></div> 102<p> 103 <span class="bold"><strong>FIXME</strong></span> Add more links to <span class="emphasis"><em>PrimitiveLexer</em></span> 104 models here. 105 </p> 106</div> 107<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 108<td align="left"></td> 109<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p> 110 Distributed under the Boost Software License, Version 1.0. (See accompanying 111 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>) 112 </p> 113</div></td> 114</tr></table> 115<hr> 116<div class="spirit-nav"> 117<a accesskey="p" href="lexer.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../lexer_concepts.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="unarylexer.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 118</div> 119</body> 120</html> 121