1[/==============================================================================
2    Copyright (C) 2001-2011 Hartmut Kaiser
3    Copyright (C) 2001-2011 Joel de Guzman
4
5    Distributed under the Boost Software License, Version 1.0. (See accompanying
6    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7===============================================================================/]
8
9[section:primitives Token definition Primitives]
10
11This module includes different primitives allowing you to create token definitions.
12It includes `char_`, character literals, `string`, and string literals.
13
14[heading Module Headers]
15
16    // forwards to <boost/spirit/home/lex/primitives.hpp>
17    #include <boost/spirit/include/lex_primitives.hpp>
18
19Also, see __include_structure__.
20
21[/////////////////////////////////////////////////////////////////////////////]
22[section:char_tokendef Tokens Matching Single Characters]
23
24[heading Description]
25
26The character based token definitions described in this section are:
27
28The `char_` creates token definitions matching single characters. The `char_`
29token definition is associated `standard` encoding namespace. This is
30needed when doing basic operations such as forcing lower or upper case and
31dealing with character ranges.
32
33[heading Header]
34
35[heading Module Headers]
36
37    // forwards to <boost/spirit/home/lex/lexer/char_token_def.hpp>
38    #include <boost/spirit/include/lex_char_token_def.hpp>
39
40Also, see __include_structure__.
41
42[heading Namespace]
43
44[table
45    [[Name]]
46    [[`lex::char_`]]
47]
48
49[heading Model of]
50
51[:__primitive_lexer_concept__]
52
53[variablelist Notation
54    [[`ch`]       [Character-class specific character from `standard` character
55                   set.]]
56]
57
58[heading Expression Semantics]
59
60Semantics of an expression is defined only where it differs from, or is not
61defined in __primitive_lexer_concept__.
62
63[table
64    [[Expression]           [Description]]
65    [[`ch`]                 [Create a token definition matching the character
66                             literal `ch`. ]]
67    [[`lex::char_(ch)`]     [Create a token definition matching the character
68                             `ch`.]]
69]
70
71[heading Example]
72
73
74[endsect] [/ char]
75
76[endsect] [/ Module]
77