annotate DEPENDENCIES/generic/include/boost/regex/v4/match_flags.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 c530137014c0
children
rev   line source
Chris@16 1 /*
Chris@16 2 *
Chris@16 3 * Copyright (c) 1998-2002
Chris@16 4 * John Maddock
Chris@16 5 *
Chris@16 6 * Use, modification and distribution are subject to the
Chris@16 7 * Boost Software License, Version 1.0. (See accompanying file
Chris@16 8 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 9 *
Chris@16 10 */
Chris@16 11
Chris@16 12 /*
Chris@16 13 * LOCATION: see http://www.boost.org for most recent version.
Chris@16 14 * FILE match_flags.hpp
Chris@16 15 * VERSION see <boost/version.hpp>
Chris@16 16 * DESCRIPTION: Declares match_flags type.
Chris@16 17 */
Chris@16 18
Chris@16 19 #ifndef BOOST_REGEX_V4_MATCH_FLAGS
Chris@16 20 #define BOOST_REGEX_V4_MATCH_FLAGS
Chris@16 21
Chris@16 22 #ifdef __cplusplus
Chris@16 23 # include <boost/cstdint.hpp>
Chris@16 24 #endif
Chris@16 25
Chris@16 26 #ifdef __cplusplus
Chris@16 27 namespace boost{
Chris@16 28 namespace regex_constants{
Chris@16 29 #endif
Chris@16 30
Chris@16 31 typedef enum _match_flags
Chris@16 32 {
Chris@16 33 match_default = 0,
Chris@16 34 match_not_bol = 1, /* first is not start of line */
Chris@16 35 match_not_eol = match_not_bol << 1, /* last is not end of line */
Chris@16 36 match_not_bob = match_not_eol << 1, /* first is not start of buffer */
Chris@16 37 match_not_eob = match_not_bob << 1, /* last is not end of buffer */
Chris@16 38 match_not_bow = match_not_eob << 1, /* first is not start of word */
Chris@16 39 match_not_eow = match_not_bow << 1, /* last is not end of word */
Chris@16 40 match_not_dot_newline = match_not_eow << 1, /* \n is not matched by '.' */
Chris@16 41 match_not_dot_null = match_not_dot_newline << 1, /* '\0' is not matched by '.' */
Chris@16 42 match_prev_avail = match_not_dot_null << 1, /* *--first is a valid expression */
Chris@16 43 match_init = match_prev_avail << 1, /* internal use */
Chris@16 44 match_any = match_init << 1, /* don't care what we match */
Chris@16 45 match_not_null = match_any << 1, /* string can't be null */
Chris@16 46 match_continuous = match_not_null << 1, /* each grep match must continue from */
Chris@16 47 /* uninterupted from the previous one */
Chris@16 48 match_partial = match_continuous << 1, /* find partial matches */
Chris@16 49
Chris@16 50 match_stop = match_partial << 1, /* stop after first match (grep) V3 only */
Chris@16 51 match_not_initial_null = match_stop, /* don't match initial null, V4 only */
Chris@16 52 match_all = match_stop << 1, /* must find the whole of input even if match_any is set */
Chris@16 53 match_perl = match_all << 1, /* Use perl matching rules */
Chris@16 54 match_posix = match_perl << 1, /* Use POSIX matching rules */
Chris@16 55 match_nosubs = match_posix << 1, /* don't trap marked subs */
Chris@16 56 match_extra = match_nosubs << 1, /* include full capture information for repeated captures */
Chris@16 57 match_single_line = match_extra << 1, /* treat text as single line and ignor any \n's when matching ^ and $. */
Chris@16 58 match_unused1 = match_single_line << 1, /* unused */
Chris@16 59 match_unused2 = match_unused1 << 1, /* unused */
Chris@16 60 match_unused3 = match_unused2 << 1, /* unused */
Chris@16 61 match_max = match_unused3,
Chris@16 62
Chris@16 63 format_perl = 0, /* perl style replacement */
Chris@16 64 format_default = 0, /* ditto. */
Chris@16 65 format_sed = match_max << 1, /* sed style replacement. */
Chris@16 66 format_all = format_sed << 1, /* enable all extentions to sytax. */
Chris@16 67 format_no_copy = format_all << 1, /* don't copy non-matching segments. */
Chris@16 68 format_first_only = format_no_copy << 1, /* Only replace first occurance. */
Chris@16 69 format_is_if = format_first_only << 1, /* internal use only. */
Chris@16 70 format_literal = format_is_if << 1 /* treat string as a literal */
Chris@16 71
Chris@16 72 } match_flags;
Chris@16 73
Chris@101 74 #if defined(__BORLANDC__)
Chris@16 75 typedef unsigned long match_flag_type;
Chris@16 76 #else
Chris@16 77 typedef match_flags match_flag_type;
Chris@16 78
Chris@16 79
Chris@16 80 #ifdef __cplusplus
Chris@16 81 inline match_flags operator&(match_flags m1, match_flags m2)
Chris@16 82 { return static_cast<match_flags>(static_cast<boost::int32_t>(m1) & static_cast<boost::int32_t>(m2)); }
Chris@16 83 inline match_flags operator|(match_flags m1, match_flags m2)
Chris@16 84 { return static_cast<match_flags>(static_cast<boost::int32_t>(m1) | static_cast<boost::int32_t>(m2)); }
Chris@16 85 inline match_flags operator^(match_flags m1, match_flags m2)
Chris@16 86 { return static_cast<match_flags>(static_cast<boost::int32_t>(m1) ^ static_cast<boost::int32_t>(m2)); }
Chris@16 87 inline match_flags operator~(match_flags m1)
Chris@16 88 { return static_cast<match_flags>(~static_cast<boost::int32_t>(m1)); }
Chris@16 89 inline match_flags& operator&=(match_flags& m1, match_flags m2)
Chris@16 90 { m1 = m1&m2; return m1; }
Chris@16 91 inline match_flags& operator|=(match_flags& m1, match_flags m2)
Chris@16 92 { m1 = m1|m2; return m1; }
Chris@16 93 inline match_flags& operator^=(match_flags& m1, match_flags m2)
Chris@16 94 { m1 = m1^m2; return m1; }
Chris@16 95 #endif
Chris@16 96 #endif
Chris@16 97
Chris@16 98 #ifdef __cplusplus
Chris@16 99 } /* namespace regex_constants */
Chris@16 100 /*
Chris@16 101 * import names into boost for backwards compatiblity:
Chris@16 102 */
Chris@16 103 using regex_constants::match_flag_type;
Chris@16 104 using regex_constants::match_default;
Chris@16 105 using regex_constants::match_not_bol;
Chris@16 106 using regex_constants::match_not_eol;
Chris@16 107 using regex_constants::match_not_bob;
Chris@16 108 using regex_constants::match_not_eob;
Chris@16 109 using regex_constants::match_not_bow;
Chris@16 110 using regex_constants::match_not_eow;
Chris@16 111 using regex_constants::match_not_dot_newline;
Chris@16 112 using regex_constants::match_not_dot_null;
Chris@16 113 using regex_constants::match_prev_avail;
Chris@16 114 /* using regex_constants::match_init; */
Chris@16 115 using regex_constants::match_any;
Chris@16 116 using regex_constants::match_not_null;
Chris@16 117 using regex_constants::match_continuous;
Chris@16 118 using regex_constants::match_partial;
Chris@16 119 /*using regex_constants::match_stop; */
Chris@16 120 using regex_constants::match_all;
Chris@16 121 using regex_constants::match_perl;
Chris@16 122 using regex_constants::match_posix;
Chris@16 123 using regex_constants::match_nosubs;
Chris@16 124 using regex_constants::match_extra;
Chris@16 125 using regex_constants::match_single_line;
Chris@16 126 /*using regex_constants::match_max; */
Chris@16 127 using regex_constants::format_all;
Chris@16 128 using regex_constants::format_sed;
Chris@16 129 using regex_constants::format_perl;
Chris@16 130 using regex_constants::format_default;
Chris@16 131 using regex_constants::format_no_copy;
Chris@16 132 using regex_constants::format_first_only;
Chris@16 133 /*using regex_constants::format_is_if;*/
Chris@16 134
Chris@16 135 } /* namespace boost */
Chris@16 136 #endif /* __cplusplus */
Chris@16 137 #endif /* include guard */
Chris@16 138