Chris@102: /*============================================================================= Chris@102: Copyright (c) 2001-2014 Joel de Guzman Chris@102: Chris@102: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@102: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@102: ==============================================================================*/ Chris@102: #if !defined(BOOST_SPIRIT_X3_ANY_CHAR_APRIL_16_2006_1051AM) Chris@102: #define BOOST_SPIRIT_X3_ANY_CHAR_APRIL_16_2006_1051AM Chris@102: Chris@102: #if defined(_MSC_VER) Chris@102: #pragma once Chris@102: #endif Chris@102: Chris@102: #include Chris@102: Chris@102: namespace boost { namespace spirit { namespace x3 Chris@102: { Chris@102: template Chris@102: struct any_char : char_parser> Chris@102: { Chris@102: typedef typename Encoding::char_type char_type; Chris@102: typedef Encoding encoding; Chris@102: typedef char_type attribute_type; Chris@102: static bool const has_attribute = true; Chris@102: Chris@102: template Chris@102: bool test(Char ch_, Context const&) const Chris@102: { Chris@102: return ((sizeof(Char) <= sizeof(char_type)) || encoding::ischar(ch_)); Chris@102: } Chris@102: Chris@102: template Chris@102: literal_char Chris@102: operator()(Char ch) const Chris@102: { Chris@102: return literal_char(ch); Chris@102: } Chris@102: }; Chris@102: }}} Chris@102: Chris@102: #endif