Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext
Tokens Matching Single Characters
Description

The character based token definitions described in this section are:

The char_ creates token definitions matching single characters. The char_ token definition is associated standard encoding namespace. This is needed when doing basic operations such as forcing lower or upper case and dealing with character ranges.

Header
Module Headers
// forwards to <boost/spirit/home/lex/lexer/char_token_def.hpp>
#include <boost/spirit/include/lex_char_token_def.hpp>

Also, see Include Structure.

Namespace

Name

lex::char_

Model of

PrimitiveLexer

Notation

ch

Character-class specific character from standard character set.

Expression Semantics

Semantics of an expression is defined only where it differs from, or is not defined in PrimitiveLexer.

Expression

Description

ch

Create a token definition matching the character literal ch.

lex::char_(ch)

Create a token definition matching the character ch.

Example

PrevUpHomeNext