1 /*=============================================================================
2 Boost.Wave: A Standard compliant C++ preprocessor library
4 Global application configuration
8 Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
9 Software License, Version 1.0. (See accompanying file
10 LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 =============================================================================*/
13 #if !defined(BOOST_SPIRIT_PATTERN_PARSER_HPP)
14 #define BOOST_SPIRIT_PATTERN_PARSER_HPP
16 #include <boost/spirit/include/classic_primitives.hpp>
17 #include <boost/wave/wave_config.hpp>
19 // this must occur after all of the includes and before any code appears
20 #ifdef BOOST_HAS_ABI_HEADERS
21 #include BOOST_ABI_PREFIX
24 ///////////////////////////////////////////////////////////////////////////////
29 ///////////////////////////////////////////////////////////////////////////
33 ///////////////////////////////////////////////////////////////////////////
34 template <typename CharT = char>
36 : public boost::spirit::classic::char_parser<pattern_and<CharT> >
38 pattern_and(CharT pattern_, unsigned long pattern_mask_ = 0UL)
40 pattern_mask((0UL != pattern_mask_) ?
41 pattern_mask_ : (unsigned long)pattern_)
45 bool test(T pattern_) const
46 { return ((unsigned long)pattern_ & pattern_mask) == (unsigned long)pattern; }
49 unsigned long pattern_mask;
52 template <typename CharT>
53 inline pattern_and<CharT>
54 pattern_p(CharT pattern, unsigned long pattern_mask = 0UL)
55 { return pattern_and<CharT>(pattern, pattern_mask); }
57 ///////////////////////////////////////////////////////////////////////////////
62 // the suffix header occurs after all of the code
63 #ifdef BOOST_HAS_ABI_HEADERS
64 #include BOOST_ABI_SUFFIX
67 #endif // defined(BOOST_SPIRIT_PATTERN_PARSER_HPP)