annotate DEPENDENCIES/generic/include/boost/wave/util/pattern_parser.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 /*=============================================================================
Chris@16 2 Boost.Wave: A Standard compliant C++ preprocessor library
Chris@16 3
Chris@16 4 Global application configuration
Chris@16 5
Chris@16 6 http://www.boost.org/
Chris@16 7
Chris@16 8 Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
Chris@16 9 Software License, Version 1.0. (See accompanying file
Chris@16 10 LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 11 =============================================================================*/
Chris@16 12
Chris@16 13 #if !defined(BOOST_SPIRIT_PATTERN_PARSER_HPP)
Chris@16 14 #define BOOST_SPIRIT_PATTERN_PARSER_HPP
Chris@16 15
Chris@16 16 #include <boost/spirit/include/classic_primitives.hpp>
Chris@16 17 #include <boost/wave/wave_config.hpp>
Chris@16 18
Chris@16 19 // this must occur after all of the includes and before any code appears
Chris@16 20 #ifdef BOOST_HAS_ABI_HEADERS
Chris@16 21 #include BOOST_ABI_PREFIX
Chris@16 22 #endif
Chris@16 23
Chris@16 24 ///////////////////////////////////////////////////////////////////////////////
Chris@16 25 namespace boost {
Chris@16 26 namespace wave {
Chris@16 27 namespace util {
Chris@16 28
Chris@16 29 ///////////////////////////////////////////////////////////////////////////
Chris@16 30 //
Chris@16 31 // pattern_and class
Chris@16 32 //
Chris@16 33 ///////////////////////////////////////////////////////////////////////////
Chris@16 34 template <typename CharT = char>
Chris@16 35 struct pattern_and
Chris@16 36 : public boost::spirit::classic::char_parser<pattern_and<CharT> >
Chris@16 37 {
Chris@16 38 pattern_and(CharT pattern_, unsigned long pattern_mask_ = 0UL)
Chris@16 39 : pattern(pattern_),
Chris@16 40 pattern_mask((0UL != pattern_mask_) ?
Chris@16 41 pattern_mask_ : (unsigned long)pattern_)
Chris@16 42 {}
Chris@16 43
Chris@16 44 template <typename T>
Chris@16 45 bool test(T pattern_) const
Chris@16 46 { return ((unsigned long)pattern_ & pattern_mask) == (unsigned long)pattern; }
Chris@16 47
Chris@16 48 CharT pattern;
Chris@16 49 unsigned long pattern_mask;
Chris@16 50 };
Chris@16 51
Chris@16 52 template <typename CharT>
Chris@16 53 inline pattern_and<CharT>
Chris@16 54 pattern_p(CharT pattern, unsigned long pattern_mask = 0UL)
Chris@16 55 { return pattern_and<CharT>(pattern, pattern_mask); }
Chris@16 56
Chris@16 57 ///////////////////////////////////////////////////////////////////////////////
Chris@16 58 } // namespace util
Chris@16 59 } // namespace wave
Chris@16 60 } // namespace boost
Chris@16 61
Chris@16 62 // the suffix header occurs after all of the code
Chris@16 63 #ifdef BOOST_HAS_ABI_HEADERS
Chris@16 64 #include BOOST_ABI_SUFFIX
Chris@16 65 #endif
Chris@16 66
Chris@16 67 #endif // defined(BOOST_SPIRIT_PATTERN_PARSER_HPP)