1 /*=============================================================================
2 Copyright (c) 2001-2014 Joel de Guzman
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_CHAR_APRIL_16_2006_1051AM)
8 #define BOOST_SPIRIT_X3_CHAR_APRIL_16_2006_1051AM
10 #include <boost/spirit/home/x3/char/any_char.hpp>
11 #include <boost/spirit/home/support/char_encoding/ascii.hpp>
12 #include <boost/spirit/home/support/char_encoding/iso8859_1.hpp>
13 #include <boost/spirit/home/support/char_encoding/standard.hpp>
14 #include <boost/spirit/home/support/char_encoding/standard_wide.hpp>
16 namespace boost { namespace spirit { namespace x3
20 typedef any_char<char_encoding::standard> char_type;
21 constexpr auto char_ = char_type{};
23 constexpr literal_char<char_encoding::standard, unused_type>
29 constexpr literal_char<char_encoding::standard, unused_type>
37 using standard::char_type;
38 using standard::char_;
41 #ifndef BOOST_SPIRIT_NO_STANDARD_WIDE
42 namespace standard_wide
44 typedef any_char<char_encoding::standard_wide> char_type;
45 constexpr auto char_ = char_type{};
47 constexpr literal_char<char_encoding::standard_wide, unused_type>
57 typedef any_char<char_encoding::ascii> char_type;
58 constexpr auto char_ = char_type{};
60 constexpr literal_char<char_encoding::ascii, unused_type>
66 constexpr literal_char<char_encoding::ascii, unused_type>
75 typedef any_char<char_encoding::iso8859_1> char_type;
76 constexpr auto char_ = char_type{};
78 constexpr literal_char<char_encoding::iso8859_1, unused_type>
84 constexpr literal_char<char_encoding::iso8859_1, unused_type>
94 struct as_parser<char>
97 char_encoding::standard, unused_type>
100 typedef type value_type;
102 static constexpr type call(char ch)
108 #ifndef BOOST_SPIRIT_NO_STANDARD_WIDE
110 struct as_parser<wchar_t>
112 typedef literal_char<
113 char_encoding::standard_wide, unused_type>
116 typedef type value_type;
118 static constexpr type call(wchar_t ch)
126 struct as_parser<char [2]>
128 typedef literal_char<
129 char_encoding::standard, unused_type>
132 typedef type value_type;
134 static constexpr type call(char const ch[])
140 #ifndef BOOST_SPIRIT_NO_STANDARD_WIDE
142 struct as_parser<wchar_t [2]>
144 typedef literal_char<
145 char_encoding::standard_wide, unused_type>
148 typedef type value_type;
150 static constexpr type call(wchar_t const ch[] )