• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Primitive Lexer Components</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="../quick_reference.html" title="Quick Reference">
9<link rel="prev" href="common_notation.html" title="Common Notation">
10<link rel="next" href="semantic_actions.html" title="Semantic Actions">
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="common_notation.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_reference.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="semantic_actions.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="spirit.lex.quick_reference.lexers"></a><a class="link" href="lexers.html" title="Primitive Lexer Components">Primitive Lexer
28        Components</a>
29</h4></div></div></div>
30<div class="informaltable"><table class="table">
31<colgroup>
32<col>
33<col>
34<col>
35</colgroup>
36<thead><tr>
37<th>
38                  <p>
39                    Expression
40                  </p>
41                </th>
42<th>
43                  <p>
44                    Attribute
45                  </p>
46                </th>
47<th>
48                  <p>
49                    Description
50                  </p>
51                </th>
52</tr></thead>
53<tbody>
54<tr>
55<td>
56                  <p>
57                    <code class="computeroutput"><span class="identifier">ch</span></code>
58                  </p>
59                </td>
60<td>
61                  <p>
62                    n/a
63                  </p>
64                </td>
65<td>
66                  <p>
67                    Matches <code class="computeroutput"><span class="identifier">ch</span></code>
68                  </p>
69                </td>
70</tr>
71<tr>
72<td>
73                  <p>
74                    <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>
75                  </p>
76                </td>
77<td>
78                  <p>
79                    n/a
80                  </p>
81                </td>
82<td>
83                  <p>
84                    Matches <code class="computeroutput"><span class="identifier">ch</span></code>
85                  </p>
86                </td>
87</tr>
88<tr>
89<td>
90                  <p>
91                    <code class="computeroutput"><span class="identifier">str</span></code>
92                  </p>
93                </td>
94<td>
95                  <p>
96                    n/a
97                  </p>
98                </td>
99<td>
100                  <p>
101                    Matches regular expression <code class="computeroutput"><span class="identifier">str</span></code>
102                  </p>
103                </td>
104</tr>
105<tr>
106<td>
107                  <p>
108                    <code class="computeroutput"><span class="identifier">string</span><span class="special">(</span><span class="identifier">str</span><span class="special">)</span></code>
109                  </p>
110                </td>
111<td>
112                  <p>
113                    n/a
114                  </p>
115                </td>
116<td>
117                  <p>
118                    Matches regular expression <code class="computeroutput"><span class="identifier">str</span></code>
119                  </p>
120                </td>
121</tr>
122<tr>
123<td>
124                  <p>
125                    <code class="computeroutput"><span class="identifier">token_def</span><span class="special">&lt;</span><span class="identifier">Attrib</span><span class="special">&gt;</span></code>
126                  </p>
127                </td>
128<td>
129                  <p>
130                    <code class="computeroutput"><span class="identifier">Attrib</span></code>
131                  </p>
132                </td>
133<td>
134                  <p>
135                    Matches the immediate argument
136                  </p>
137                </td>
138</tr>
139<tr>
140<td>
141                  <p>
142                    <code class="computeroutput"><span class="identifier">a</span> <span class="special">|</span>
143                    <span class="identifier">b</span></code>
144                  </p>
145                </td>
146<td>
147                  <p>
148                    n/a
149                  </p>
150                </td>
151<td>
152                  <p>
153                    Matches any of the expressions <code class="computeroutput"><span class="identifier">a</span></code>
154                    or <code class="computeroutput"><span class="identifier">b</span></code>
155                  </p>
156                </td>
157</tr>
158<tr>
159<td>
160                  <p>
161                    <code class="computeroutput"><span class="identifier">l</span><span class="special">[</span><span class="identifier">fa</span><span class="special">]</span></code>
162                  </p>
163                </td>
164<td>
165                  <p>
166                    Attribute of <code class="computeroutput"><span class="identifier">l</span></code>
167                  </p>
168                </td>
169<td>
170                  <p>
171                    Call semantic action <code class="computeroutput"><span class="identifier">fa</span></code>
172                    (after matching <code class="computeroutput"><span class="identifier">l</span></code>).
173                  </p>
174                </td>
175</tr>
176</tbody>
177</table></div>
178<div class="note"><table border="0" summary="Note">
179<tr>
180<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../images/note.png"></td>
181<th align="left">Note</th>
182</tr>
183<tr><td align="left" valign="top"><p>
184            The column <span class="emphasis"><em>Attribute</em></span> in the table above lists the
185            parser attribute exposed by the lexer component if it is used as a parser
186            (see Attribute). A 'n/a' in this columns means the lexer component is
187            not usable as a parser.
188          </p></td></tr>
189</table></div>
190</div>
191<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
192<td align="left"></td>
193<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
194        Distributed under the Boost Software License, Version 1.0. (See accompanying
195        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>)
196      </p>
197</div></td>
198</tr></table>
199<hr>
200<div class="spirit-nav">
201<a accesskey="p" href="common_notation.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_reference.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="semantic_actions.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
202</div>
203</body>
204</html>
205