Jeff Thompson | 86b6d64 | 2013-10-17 15:01:56 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * |
| 3 | * Copyright (c) 1998-2002 |
| 4 | * John Maddock |
| 5 | * |
| 6 | * Use, modification and distribution are subject to the |
| 7 | * Boost Software License, Version 1.0. (See accompanying file |
| 8 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 9 | * |
| 10 | */ |
| 11 | |
| 12 | /* |
| 13 | * LOCATION: see http://www.boost.org for most recent version. |
| 14 | * FILE regex.cpp |
| 15 | * VERSION see <ndnboost/version.hpp> |
| 16 | * DESCRIPTION: Declares ndnboost::basic_regex<> and associated |
| 17 | * functions and classes. This header is the main |
| 18 | * entry point for the template regex code. |
| 19 | */ |
| 20 | |
| 21 | #ifndef NDNBOOST_RE_REGEX_HPP_INCLUDED |
| 22 | #define NDNBOOST_RE_REGEX_HPP_INCLUDED |
| 23 | |
| 24 | #ifdef __cplusplus |
| 25 | |
| 26 | // what follows is all C++ don't include in C builds!! |
| 27 | |
| 28 | #ifndef NDNBOOST_REGEX_CONFIG_HPP |
| 29 | #include <ndnboost/regex/config.hpp> |
| 30 | #endif |
| 31 | #ifndef NDNBOOST_REGEX_WORKAROUND_HPP |
| 32 | #include <ndnboost/regex/v4/regex_workaround.hpp> |
| 33 | #endif |
| 34 | |
| 35 | #ifndef NDNBOOST_REGEX_FWD_HPP |
| 36 | #include <ndnboost/regex_fwd.hpp> |
| 37 | #endif |
| 38 | #ifndef NDNBOOST_REGEX_TRAITS_HPP |
| 39 | #include <ndnboost/regex/regex_traits.hpp> |
| 40 | #endif |
| 41 | #ifndef NDNBOOST_REGEX_RAW_BUFFER_HPP |
| 42 | #include <ndnboost/regex/v4/error_type.hpp> |
| 43 | #endif |
| 44 | #ifndef NDNBOOST_REGEX_V4_MATCH_FLAGS |
| 45 | #include <ndnboost/regex/v4/match_flags.hpp> |
| 46 | #endif |
| 47 | #ifndef NDNBOOST_REGEX_RAW_BUFFER_HPP |
| 48 | #include <ndnboost/regex/v4/regex_raw_buffer.hpp> |
| 49 | #endif |
| 50 | #ifndef NDNBOOST_RE_PAT_EXCEPT_HPP |
| 51 | #include <ndnboost/regex/pattern_except.hpp> |
| 52 | #endif |
| 53 | |
| 54 | #ifndef NDNBOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP |
| 55 | #include <ndnboost/regex/v4/char_regex_traits.hpp> |
| 56 | #endif |
| 57 | #ifndef NDNBOOST_REGEX_V4_STATES_HPP |
| 58 | #include <ndnboost/regex/v4/states.hpp> |
| 59 | #endif |
| 60 | #ifndef NDNBOOST_REGEX_V4_REGBASE_HPP |
| 61 | #include <ndnboost/regex/v4/regbase.hpp> |
| 62 | #endif |
| 63 | #ifndef NDNBOOST_REGEX_V4_ITERATOR_TRAITS_HPP |
| 64 | #include <ndnboost/regex/v4/iterator_traits.hpp> |
| 65 | #endif |
| 66 | #ifndef NDNBOOST_REGEX_V4_BASIC_REGEX_HPP |
| 67 | #include <ndnboost/regex/v4/basic_regex.hpp> |
| 68 | #endif |
| 69 | #ifndef NDNBOOST_REGEX_V4_BASIC_REGEX_CREATOR_HPP |
| 70 | #include <ndnboost/regex/v4/basic_regex_creator.hpp> |
| 71 | #endif |
| 72 | #ifndef NDNBOOST_REGEX_V4_BASIC_REGEX_PARSER_HPP |
| 73 | #include <ndnboost/regex/v4/basic_regex_parser.hpp> |
| 74 | #endif |
| 75 | #ifndef NDNBOOST_REGEX_V4_SUB_MATCH_HPP |
| 76 | #include <ndnboost/regex/v4/sub_match.hpp> |
| 77 | #endif |
| 78 | #ifndef NDNBOOST_REGEX_FORMAT_HPP |
| 79 | #include <ndnboost/regex/v4/regex_format.hpp> |
| 80 | #endif |
| 81 | #ifndef NDNBOOST_REGEX_V4_MATCH_RESULTS_HPP |
| 82 | #include <ndnboost/regex/v4/match_results.hpp> |
| 83 | #endif |
| 84 | #ifndef NDNBOOST_REGEX_V4_PROTECTED_CALL_HPP |
| 85 | #include <ndnboost/regex/v4/protected_call.hpp> |
| 86 | #endif |
| 87 | #ifndef NDNBOOST_REGEX_MATCHER_HPP |
| 88 | #include <ndnboost/regex/v4/perl_matcher.hpp> |
| 89 | #endif |
| 90 | // |
| 91 | // template instances: |
| 92 | // |
| 93 | #define NDNBOOST_REGEX_CHAR_T char |
| 94 | #ifdef NDNBOOST_REGEX_NARROW_INSTANTIATE |
| 95 | # define NDNBOOST_REGEX_INSTANTIATE |
| 96 | #endif |
| 97 | #include <ndnboost/regex/v4/instances.hpp> |
| 98 | #undef NDNBOOST_REGEX_CHAR_T |
| 99 | #ifdef NDNBOOST_REGEX_INSTANTIATE |
| 100 | # undef NDNBOOST_REGEX_INSTANTIATE |
| 101 | #endif |
| 102 | |
| 103 | #ifndef NDNBOOST_NO_WREGEX |
| 104 | #define NDNBOOST_REGEX_CHAR_T wchar_t |
| 105 | #ifdef NDNBOOST_REGEX_WIDE_INSTANTIATE |
| 106 | # define NDNBOOST_REGEX_INSTANTIATE |
| 107 | #endif |
| 108 | #include <ndnboost/regex/v4/instances.hpp> |
| 109 | #undef NDNBOOST_REGEX_CHAR_T |
| 110 | #ifdef NDNBOOST_REGEX_INSTANTIATE |
| 111 | # undef NDNBOOST_REGEX_INSTANTIATE |
| 112 | #endif |
| 113 | #endif |
| 114 | |
| 115 | #if !defined(NDNBOOST_NO_WREGEX) && defined(NDNBOOST_REGEX_HAS_OTHER_WCHAR_T) |
| 116 | #define NDNBOOST_REGEX_CHAR_T unsigned short |
| 117 | #ifdef NDNBOOST_REGEX_US_INSTANTIATE |
| 118 | # define NDNBOOST_REGEX_INSTANTIATE |
| 119 | #endif |
| 120 | #include <ndnboost/regex/v4/instances.hpp> |
| 121 | #undef NDNBOOST_REGEX_CHAR_T |
| 122 | #ifdef NDNBOOST_REGEX_INSTANTIATE |
| 123 | # undef NDNBOOST_REGEX_INSTANTIATE |
| 124 | #endif |
| 125 | #endif |
| 126 | |
| 127 | |
| 128 | namespace ndnboost{ |
| 129 | #ifdef NDNBOOST_REGEX_NO_FWD |
| 130 | typedef basic_regex<char, regex_traits<char> > regex; |
| 131 | #ifndef NDNBOOST_NO_WREGEX |
| 132 | typedef basic_regex<wchar_t, regex_traits<wchar_t> > wregex; |
| 133 | #endif |
| 134 | #endif |
| 135 | |
| 136 | typedef match_results<const char*> cmatch; |
| 137 | typedef match_results<std::string::const_iterator> smatch; |
| 138 | #ifndef NDNBOOST_NO_WREGEX |
| 139 | typedef match_results<const wchar_t*> wcmatch; |
| 140 | typedef match_results<std::wstring::const_iterator> wsmatch; |
| 141 | #endif |
| 142 | |
| 143 | } // namespace ndnboost |
| 144 | #ifndef NDNBOOST_REGEX_MATCH_HPP |
| 145 | #include <ndnboost/regex/v4/regex_match.hpp> |
| 146 | #endif |
| 147 | #ifndef NDNBOOST_REGEX_V4_REGEX_SEARCH_HPP |
| 148 | #include <ndnboost/regex/v4/regex_search.hpp> |
| 149 | #endif |
| 150 | #ifndef NDNBOOST_REGEX_ITERATOR_HPP |
| 151 | #include <ndnboost/regex/v4/regex_iterator.hpp> |
| 152 | #endif |
| 153 | #ifndef NDNBOOST_REGEX_TOKEN_ITERATOR_HPP |
| 154 | #include <ndnboost/regex/v4/regex_token_iterator.hpp> |
| 155 | #endif |
| 156 | #ifndef NDNBOOST_REGEX_V4_REGEX_GREP_HPP |
| 157 | #include <ndnboost/regex/v4/regex_grep.hpp> |
| 158 | #endif |
| 159 | #ifndef NDNBOOST_REGEX_V4_REGEX_REPLACE_HPP |
| 160 | #include <ndnboost/regex/v4/regex_replace.hpp> |
| 161 | #endif |
| 162 | #ifndef NDNBOOST_REGEX_V4_REGEX_MERGE_HPP |
| 163 | #include <ndnboost/regex/v4/regex_merge.hpp> |
| 164 | #endif |
| 165 | #ifndef NDNBOOST_REGEX_SPLIT_HPP |
| 166 | #include <ndnboost/regex/v4/regex_split.hpp> |
| 167 | #endif |
| 168 | |
| 169 | #endif // __cplusplus |
| 170 | |
| 171 | #endif // include |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 | |
| 200 | |
| 201 | |
| 202 | |