Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:43

0001 /*=============================================================================
0002     Boost.Wave: A Standard compliant C++ preprocessor library
0003 
0004     Global application configuration
0005 
0006     http://www.boost.org/
0007 
0008     Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
0009     Software License, Version 1.0. (See accompanying file
0010     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
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 // this must occur after all of the includes and before any code appears
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     //  pattern_and class
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 }   // namespace util
0059 }   // namespace wave
0060 }   // namespace boost
0061 
0062 // the suffix header occurs after all of the code
0063 #ifdef BOOST_HAS_ABI_HEADERS
0064 #include BOOST_ABI_SUFFIX
0065 #endif
0066 
0067 #endif // defined(BOOST_SPIRIT_PATTERN_PARSER_HPP)