1/*=============================================================================
2 Copyright (c) 2001-2014 Joel de Guzman
3
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6=============================================================================*/
7#if !defined(BOOST_SPIRIT_X3_CALC8_COMMON_HPP)
8#define BOOST_SPIRIT_X3_CALC8_COMMON_HPP
9
10#include <boost/spirit/home/x3.hpp>
11
12namespace client { namespace parser
13{
14 using x3::raw;
15 using x3::lexeme;
16 using x3::alpha;
17 using x3::alnum;
18
19 struct identifier_class;
20 typedef x3::rule<identifier_class, std::string> identifier_type;
21 identifier_type const identifier = "identifier";
22
23 auto const identifier_def = raw[lexeme[(alpha | '_') >> *(alnum | '_')]];
24
25 BOOST_SPIRIT_DEFINE(identifier);
26}}
27
28#endif
29

source code of boost/libs/spirit/example/x3/calc/calc8/common.hpp