File indexing completed on 2025-01-18 09:53:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #if !defined(BOOST_SPIRIT_PATTERN_PARSER_HPP)
0014 #define BOOST_SPIRIT_PATTERN_PARSER_HPP
0015
0016 #include <boost/spirit/include/classic_primitives.hpp>
0017 #include <boost/wave/wave_config.hpp>
0018
0019
0020 #ifdef BOOST_HAS_ABI_HEADERS
0021 #include BOOST_ABI_PREFIX
0022 #endif
0023
0024
0025 namespace boost {
0026 namespace wave {
0027 namespace util {
0028
0029
0030
0031
0032
0033
0034 template <typename CharT = char>
0035 struct pattern_and
0036 : public boost::spirit::classic::char_parser<pattern_and<CharT> >
0037 {
0038 pattern_and(CharT pattern_, unsigned long pattern_mask_ = 0UL)
0039 : pattern(pattern_),
0040 pattern_mask((0UL != pattern_mask_) ?
0041 pattern_mask_ : (unsigned long)pattern_)
0042 {}
0043
0044 template <typename T>
0045 bool test(T pattern_) const
0046 { return ((unsigned long)pattern_ & pattern_mask) == (unsigned long)pattern; }
0047
0048 CharT pattern;
0049 unsigned long pattern_mask;
0050 };
0051
0052 template <typename CharT>
0053 inline pattern_and<CharT>
0054 pattern_p(CharT pattern, unsigned long pattern_mask = 0UL)
0055 { return pattern_and<CharT>(pattern, pattern_mask); }
0056
0057
0058 }
0059 }
0060 }
0061
0062
0063 #ifdef BOOST_HAS_ABI_HEADERS
0064 #include BOOST_ABI_SUFFIX
0065 #endif
0066
0067 #endif