]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 <boost/version.hpp> | |
16 | * DESCRIPTION: Declares boost::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 BOOST_RE_REGEX_HPP_INCLUDED | |
22 | #define BOOST_RE_REGEX_HPP_INCLUDED | |
23 | ||
24 | #ifdef __cplusplus | |
25 | ||
26 | // what follows is all C++ don't include in C builds!! | |
27 | ||
28 | #ifndef BOOST_REGEX_CONFIG_HPP | |
29 | #include <boost/regex/config.hpp> | |
30 | #endif | |
31 | #ifndef BOOST_REGEX_WORKAROUND_HPP | |
32 | #include <boost/regex/v4/regex_workaround.hpp> | |
33 | #endif | |
34 | ||
35 | #ifndef BOOST_REGEX_FWD_HPP | |
36 | #include <boost/regex_fwd.hpp> | |
37 | #endif | |
38 | #ifndef BOOST_REGEX_TRAITS_HPP | |
39 | #include <boost/regex/regex_traits.hpp> | |
40 | #endif | |
41 | #ifndef BOOST_REGEX_RAW_BUFFER_HPP | |
42 | #include <boost/regex/v4/error_type.hpp> | |
43 | #endif | |
44 | #ifndef BOOST_REGEX_V4_MATCH_FLAGS | |
45 | #include <boost/regex/v4/match_flags.hpp> | |
46 | #endif | |
47 | #ifndef BOOST_REGEX_RAW_BUFFER_HPP | |
48 | #include <boost/regex/v4/regex_raw_buffer.hpp> | |
49 | #endif | |
50 | #ifndef BOOST_RE_PAT_EXCEPT_HPP | |
51 | #include <boost/regex/pattern_except.hpp> | |
52 | #endif | |
53 | ||
54 | #ifndef BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP | |
55 | #include <boost/regex/v4/char_regex_traits.hpp> | |
56 | #endif | |
57 | #ifndef BOOST_REGEX_V4_STATES_HPP | |
58 | #include <boost/regex/v4/states.hpp> | |
59 | #endif | |
60 | #ifndef BOOST_REGEX_V4_REGBASE_HPP | |
61 | #include <boost/regex/v4/regbase.hpp> | |
62 | #endif | |
63 | #ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP | |
64 | #include <boost/regex/v4/iterator_traits.hpp> | |
65 | #endif | |
66 | #ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP | |
67 | #include <boost/regex/v4/basic_regex.hpp> | |
68 | #endif | |
69 | #ifndef BOOST_REGEX_V4_BASIC_REGEX_CREATOR_HPP | |
70 | #include <boost/regex/v4/basic_regex_creator.hpp> | |
71 | #endif | |
72 | #ifndef BOOST_REGEX_V4_BASIC_REGEX_PARSER_HPP | |
73 | #include <boost/regex/v4/basic_regex_parser.hpp> | |
74 | #endif | |
75 | #ifndef BOOST_REGEX_V4_SUB_MATCH_HPP | |
76 | #include <boost/regex/v4/sub_match.hpp> | |
77 | #endif | |
78 | #ifndef BOOST_REGEX_FORMAT_HPP | |
79 | #include <boost/regex/v4/regex_format.hpp> | |
80 | #endif | |
81 | #ifndef BOOST_REGEX_V4_MATCH_RESULTS_HPP | |
82 | #include <boost/regex/v4/match_results.hpp> | |
83 | #endif | |
84 | #ifndef BOOST_REGEX_V4_PROTECTED_CALL_HPP | |
85 | #include <boost/regex/v4/protected_call.hpp> | |
86 | #endif | |
87 | #ifndef BOOST_REGEX_MATCHER_HPP | |
88 | #include <boost/regex/v4/perl_matcher.hpp> | |
89 | #endif | |
90 | // | |
91 | // template instances: | |
92 | // | |
93 | #define BOOST_REGEX_CHAR_T char | |
94 | #ifdef BOOST_REGEX_NARROW_INSTANTIATE | |
95 | # define BOOST_REGEX_INSTANTIATE | |
96 | #endif | |
97 | #include <boost/regex/v4/instances.hpp> | |
98 | #undef BOOST_REGEX_CHAR_T | |
99 | #ifdef BOOST_REGEX_INSTANTIATE | |
100 | # undef BOOST_REGEX_INSTANTIATE | |
101 | #endif | |
102 | ||
103 | #ifndef BOOST_NO_WREGEX | |
104 | #define BOOST_REGEX_CHAR_T wchar_t | |
105 | #ifdef BOOST_REGEX_WIDE_INSTANTIATE | |
106 | # define BOOST_REGEX_INSTANTIATE | |
107 | #endif | |
108 | #include <boost/regex/v4/instances.hpp> | |
109 | #undef BOOST_REGEX_CHAR_T | |
110 | #ifdef BOOST_REGEX_INSTANTIATE | |
111 | # undef BOOST_REGEX_INSTANTIATE | |
112 | #endif | |
113 | #endif | |
114 | ||
115 | #if !defined(BOOST_NO_WREGEX) && defined(BOOST_REGEX_HAS_OTHER_WCHAR_T) | |
116 | #define BOOST_REGEX_CHAR_T unsigned short | |
117 | #ifdef BOOST_REGEX_US_INSTANTIATE | |
118 | # define BOOST_REGEX_INSTANTIATE | |
119 | #endif | |
120 | #include <boost/regex/v4/instances.hpp> | |
121 | #undef BOOST_REGEX_CHAR_T | |
122 | #ifdef BOOST_REGEX_INSTANTIATE | |
123 | # undef BOOST_REGEX_INSTANTIATE | |
124 | #endif | |
125 | #endif | |
126 | ||
127 | ||
128 | namespace boost{ | |
129 | #ifdef BOOST_REGEX_NO_FWD | |
130 | typedef basic_regex<char, regex_traits<char> > regex; | |
131 | #ifndef BOOST_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 BOOST_NO_WREGEX | |
139 | typedef match_results<const wchar_t*> wcmatch; | |
140 | typedef match_results<std::wstring::const_iterator> wsmatch; | |
141 | #endif | |
142 | ||
143 | } // namespace boost | |
144 | #ifndef BOOST_REGEX_MATCH_HPP | |
145 | #include <boost/regex/v4/regex_match.hpp> | |
146 | #endif | |
147 | #ifndef BOOST_REGEX_V4_REGEX_SEARCH_HPP | |
148 | #include <boost/regex/v4/regex_search.hpp> | |
149 | #endif | |
150 | #ifndef BOOST_REGEX_ITERATOR_HPP | |
151 | #include <boost/regex/v4/regex_iterator.hpp> | |
152 | #endif | |
153 | #ifndef BOOST_REGEX_TOKEN_ITERATOR_HPP | |
154 | #include <boost/regex/v4/regex_token_iterator.hpp> | |
155 | #endif | |
156 | #ifndef BOOST_REGEX_V4_REGEX_GREP_HPP | |
157 | #include <boost/regex/v4/regex_grep.hpp> | |
158 | #endif | |
159 | #ifndef BOOST_REGEX_V4_REGEX_REPLACE_HPP | |
160 | #include <boost/regex/v4/regex_replace.hpp> | |
161 | #endif | |
162 | #ifndef BOOST_REGEX_V4_REGEX_MERGE_HPP | |
163 | #include <boost/regex/v4/regex_merge.hpp> | |
164 | #endif | |
165 | #ifndef BOOST_REGEX_SPLIT_HPP | |
166 | #include <boost/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 |