summaryrefslogtreecommitdiff
path: root/boost/spirit/home/x3/char/char.hpp
diff options
context:
space:
mode:
authorChanho Park <chanho61.park@samsung.com>2014-12-11 18:55:56 +0900
committerChanho Park <chanho61.park@samsung.com>2014-12-11 18:55:56 +0900
commit08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch)
tree7a7053ceb8874b28ec4b868d4c49b500008a102e /boost/spirit/home/x3/char/char.hpp
parentbb4dd8289b351fae6b55e303f189127a394a1edd (diff)
downloadboost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz
boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2
boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'boost/spirit/home/x3/char/char.hpp')
-rw-r--r--boost/spirit/home/x3/char/char.hpp88
1 files changed, 88 insertions, 0 deletions
diff --git a/boost/spirit/home/x3/char/char.hpp b/boost/spirit/home/x3/char/char.hpp
new file mode 100644
index 0000000000..9452dcd86d
--- /dev/null
+++ b/boost/spirit/home/x3/char/char.hpp
@@ -0,0 +1,88 @@
+/*=============================================================================
+ Copyright (c) 2001-2014 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#if !defined(BOOST_SPIRIT_X3_CHAR_APRIL_16_2006_1051AM)
+#define BOOST_SPIRIT_X3_CHAR_APRIL_16_2006_1051AM
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/spirit/home/x3/char/any_char.hpp>
+#include <boost/spirit/home/support/char_encoding/ascii.hpp>
+#include <boost/spirit/home/support/char_encoding/standard.hpp>
+#include <boost/spirit/home/support/char_encoding/standard_wide.hpp>
+
+namespace boost { namespace spirit { namespace x3
+{
+ namespace standard
+ {
+ typedef any_char<char_encoding::standard> char_type;
+ char_type const char_ = char_type();
+ }
+
+ using standard::char_type;
+ using standard::char_;
+
+ namespace standard_wide
+ {
+ typedef any_char<char_encoding::standard_wide> char_type;
+ char_type const char_ = char_type();
+ }
+
+ namespace ascii
+ {
+ typedef any_char<char_encoding::ascii> char_type;
+ char_type const char_ = char_type();
+ }
+
+ namespace extension
+ {
+ template <>
+ struct as_parser<char>
+ {
+ typedef literal_char<
+ char_encoding::standard, unused_type>
+ type;
+
+ typedef type value_type;
+
+ static type call(char ch)
+ {
+ return type(ch);
+ }
+ };
+
+ template <>
+ struct as_parser<wchar_t>
+ {
+ typedef literal_char<
+ char_encoding::standard_wide, unused_type>
+ type;
+
+ typedef type value_type;
+
+ static type call(wchar_t ch)
+ {
+ return type(ch);
+ }
+ };
+ }
+
+ inline literal_char<char_encoding::standard, unused_type>
+ lit(char ch)
+ {
+ return literal_char<char_encoding::standard, unused_type>(ch);
+ }
+
+ inline literal_char<char_encoding::standard_wide, unused_type>
+ lit(wchar_t ch)
+ {
+ return literal_char<char_encoding::standard_wide, unused_type>(ch);
+ }
+}}}
+
+#endif