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 auto const char_ = char_type{};
23 inline literal_char<char_encoding::standard, unused_type>
29 inline literal_char<char_encoding::standard, unused_type>
37 using standard::char_type;
38 using standard::char_;
41 namespace standard_wide
43 typedef any_char<char_encoding::standard_wide> char_type;
44 auto const char_ = char_type{};
46 inline literal_char<char_encoding::standard_wide, unused_type>
55 typedef any_char<char_encoding::ascii> char_type;
56 auto const char_ = char_type{};
58 inline literal_char<char_encoding::ascii, unused_type>
64 inline literal_char<char_encoding::ascii, unused_type>
73 typedef any_char<char_encoding::iso8859_1> char_type;
74 auto const char_ = char_type{};
76 inline literal_char<char_encoding::iso8859_1, unused_type>
82 inline literal_char<char_encoding::iso8859_1, unused_type>
92 struct as_parser<char>
95 char_encoding::standard, unused_type>
98 typedef type value_type;
100 static type call(char ch)
107 struct as_parser<wchar_t>
109 typedef literal_char<
110 char_encoding::standard_wide, unused_type>
113 typedef type value_type;
115 static type call(wchar_t ch)
122 struct as_parser<char [2]>
124 typedef literal_char<
125 char_encoding::standard, unused_type>
128 typedef type value_type;
130 static type call(char const ch[])
137 struct as_parser<wchar_t [2]>
139 typedef literal_char<
140 char_encoding::standard_wide, unused_type>
143 typedef type value_type;
145 static type call(wchar_t const ch[] )