Chris@16
|
1 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
2 /// \file xpressive_fwd.hpp
|
Chris@16
|
3 /// Forward declarations for all of xpressive's public data types.
|
Chris@16
|
4 //
|
Chris@16
|
5 // Copyright 2008 Eric Niebler. Distributed under the Boost
|
Chris@16
|
6 // Software License, Version 1.0. (See accompanying file
|
Chris@16
|
7 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
8
|
Chris@16
|
9 #ifndef BOOST_XPRESSIVE_XPRESSIVE_FWD_HPP_EAN_10_04_2005
|
Chris@16
|
10 #define BOOST_XPRESSIVE_XPRESSIVE_FWD_HPP_EAN_10_04_2005
|
Chris@16
|
11
|
Chris@16
|
12 // MS compatible compilers support #pragma once
|
Chris@16
|
13 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
Chris@16
|
14 # pragma once
|
Chris@16
|
15 #endif
|
Chris@16
|
16
|
Chris@16
|
17 #include <string>
|
Chris@16
|
18 #include <boost/config.hpp>
|
Chris@16
|
19 #include <boost/version.hpp>
|
Chris@16
|
20 #include <boost/iterator/iterator_traits.hpp>
|
Chris@16
|
21
|
Chris@16
|
22 #if BOOST_VERSION >= 103500
|
Chris@16
|
23 # define BOOST_PROTO_FUSION_V2
|
Chris@16
|
24 #endif
|
Chris@16
|
25
|
Chris@16
|
26 #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
Chris@16
|
27 # error Sorry, xpressive requires a compiler that supports partial template specialization.
|
Chris@16
|
28 #endif
|
Chris@16
|
29
|
Chris@16
|
30 #if defined(BOOST_NO_STD_LOCALE) & !defined(BOOST_XPRESSIVE_USE_C_TRAITS)
|
Chris@16
|
31 # define BOOST_XPRESSIVE_USE_C_TRAITS
|
Chris@16
|
32 #endif
|
Chris@16
|
33
|
Chris@16
|
34 #if defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING)
|
Chris@16
|
35 # ifndef BOOST_XPRESSIVE_NO_WREGEX
|
Chris@16
|
36 # define BOOST_XPRESSIVE_NO_WREGEX
|
Chris@16
|
37 # endif
|
Chris@16
|
38 #endif
|
Chris@16
|
39
|
Chris@16
|
40 // Stack protection under MS Windows
|
Chris@16
|
41 // Config logic taken from boost/regex/config.hpp
|
Chris@16
|
42 #ifndef BOOST_XPRESSIVE_HAS_MS_STACK_GUARD
|
Chris@16
|
43 # if (defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \
|
Chris@16
|
44 && !defined(__GNUC__) \
|
Chris@16
|
45 && !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \
|
Chris@16
|
46 && !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003))
|
Chris@16
|
47 # define BOOST_XPRESSIVE_HAS_MS_STACK_GUARD 1
|
Chris@16
|
48 # else
|
Chris@16
|
49 # define BOOST_XPRESSIVE_HAS_MS_STACK_GUARD 0
|
Chris@16
|
50 # endif
|
Chris@16
|
51 #endif
|
Chris@16
|
52
|
Chris@16
|
53 #include <boost/proto/proto_fwd.hpp>
|
Chris@16
|
54
|
Chris@16
|
55 namespace boost { namespace xpressive
|
Chris@16
|
56 {
|
Chris@16
|
57
|
Chris@16
|
58 template<typename Char>
|
Chris@16
|
59 struct cpp_regex_traits;
|
Chris@16
|
60
|
Chris@16
|
61 template<typename Char>
|
Chris@16
|
62 struct c_regex_traits;
|
Chris@16
|
63
|
Chris@16
|
64 template<typename Elem>
|
Chris@16
|
65 struct null_regex_traits;
|
Chris@16
|
66
|
Chris@16
|
67 namespace detail
|
Chris@16
|
68 {
|
Chris@16
|
69 template<typename Char>
|
Chris@16
|
70 struct default_regex_traits
|
Chris@16
|
71 {
|
Chris@16
|
72 #ifdef BOOST_XPRESSIVE_USE_C_TRAITS
|
Chris@16
|
73 typedef c_regex_traits<Char> type;
|
Chris@16
|
74 #else
|
Chris@16
|
75 typedef cpp_regex_traits<Char> type;
|
Chris@16
|
76 #endif
|
Chris@16
|
77 };
|
Chris@16
|
78
|
Chris@16
|
79 struct mark_placeholder;
|
Chris@16
|
80 typedef proto::expr<proto::tag::terminal, proto::term<mark_placeholder>, 0> basic_mark_tag;
|
Chris@16
|
81
|
Chris@16
|
82 struct regex_domain;
|
Chris@16
|
83
|
Chris@16
|
84 } // namespace detail
|
Chris@16
|
85
|
Chris@16
|
86 struct mark_tag;
|
Chris@16
|
87
|
Chris@16
|
88 typedef void const *regex_id_type;
|
Chris@16
|
89
|
Chris@16
|
90 struct regex_error;
|
Chris@16
|
91
|
Chris@16
|
92 struct regex_traits_version_1_tag;
|
Chris@16
|
93
|
Chris@16
|
94 struct regex_traits_version_2_tag;
|
Chris@16
|
95
|
Chris@16
|
96 // DEPRECATED
|
Chris@16
|
97 /// INTERNAL ONLY
|
Chris@16
|
98 ///
|
Chris@16
|
99 struct regex_traits_version_1_case_fold_tag;
|
Chris@16
|
100
|
Chris@16
|
101 template<typename Trait>
|
Chris@16
|
102 struct has_fold_case;
|
Chris@16
|
103
|
Chris@16
|
104 template<typename BidiIter>
|
Chris@16
|
105 struct basic_regex;
|
Chris@16
|
106
|
Chris@16
|
107 template<typename BidiIter>
|
Chris@16
|
108 struct match_results;
|
Chris@16
|
109
|
Chris@16
|
110 template<typename BidiIter>
|
Chris@16
|
111 struct regex_iterator;
|
Chris@16
|
112
|
Chris@16
|
113 template<typename BidiIter>
|
Chris@16
|
114 struct regex_token_iterator;
|
Chris@16
|
115
|
Chris@16
|
116 template<typename BidiIter>
|
Chris@16
|
117 struct regex_id_filter_predicate;
|
Chris@16
|
118
|
Chris@16
|
119 template<typename BidiIter>
|
Chris@16
|
120 struct sub_match;
|
Chris@16
|
121
|
Chris@16
|
122 template<typename RegexTraits>
|
Chris@16
|
123 struct compiler_traits;
|
Chris@16
|
124
|
Chris@16
|
125 template<typename Char, typename Impl = typename detail::default_regex_traits<Char>::type>
|
Chris@16
|
126 struct regex_traits;
|
Chris@16
|
127
|
Chris@16
|
128 template
|
Chris@16
|
129 <
|
Chris@16
|
130 typename BidiIter
|
Chris@16
|
131 , typename RegexTraits = regex_traits<typename iterator_value<BidiIter>::type>
|
Chris@16
|
132 , typename CompilerTraits = compiler_traits<RegexTraits>
|
Chris@16
|
133 >
|
Chris@16
|
134 struct regex_compiler;
|
Chris@16
|
135
|
Chris@16
|
136 template<typename T>
|
Chris@16
|
137 struct value;
|
Chris@16
|
138
|
Chris@16
|
139 template<typename T>
|
Chris@16
|
140 struct reference;
|
Chris@16
|
141
|
Chris@16
|
142 template<typename T>
|
Chris@16
|
143 struct local;
|
Chris@16
|
144
|
Chris@16
|
145 template<typename T, int I = 0, typename Dummy = proto::is_proto_expr>
|
Chris@16
|
146 struct placeholder;
|
Chris@16
|
147
|
Chris@16
|
148 namespace op
|
Chris@16
|
149 {
|
Chris@16
|
150 struct at;
|
Chris@16
|
151 struct push;
|
Chris@16
|
152 struct push_back;
|
Chris@16
|
153 struct push_front;
|
Chris@16
|
154 struct pop;
|
Chris@16
|
155 struct pop_back;
|
Chris@16
|
156 struct pop_front;
|
Chris@16
|
157 struct front;
|
Chris@16
|
158 struct back;
|
Chris@16
|
159 struct top;
|
Chris@16
|
160 struct first;
|
Chris@16
|
161 struct second;
|
Chris@16
|
162 struct matched;
|
Chris@16
|
163 struct length;
|
Chris@16
|
164 struct str;
|
Chris@16
|
165 struct insert;
|
Chris@16
|
166 struct make_pair;
|
Chris@16
|
167 template<typename T>
|
Chris@16
|
168 struct as;
|
Chris@16
|
169 template<typename T>
|
Chris@16
|
170 struct static_cast_;
|
Chris@16
|
171 template<typename T>
|
Chris@16
|
172 struct dynamic_cast_;
|
Chris@16
|
173 template<typename T>
|
Chris@16
|
174 struct const_cast_;
|
Chris@16
|
175 template<typename T>
|
Chris@16
|
176 struct construct;
|
Chris@16
|
177 template<typename Except>
|
Chris@16
|
178 struct throw_;
|
Chris@16
|
179 struct unwrap_reference;
|
Chris@16
|
180 }
|
Chris@16
|
181
|
Chris@16
|
182 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
183 // Common typedefs
|
Chris@16
|
184 //
|
Chris@16
|
185 typedef basic_regex<std::string::const_iterator> sregex;
|
Chris@16
|
186 typedef basic_regex<char const *> cregex;
|
Chris@16
|
187
|
Chris@16
|
188 #ifndef BOOST_XPRESSIVE_NO_WREGEX
|
Chris@16
|
189 typedef basic_regex<std::wstring::const_iterator> wsregex;
|
Chris@16
|
190 typedef basic_regex<wchar_t const *> wcregex;
|
Chris@16
|
191 #endif
|
Chris@16
|
192
|
Chris@16
|
193 typedef sub_match<std::string::const_iterator> ssub_match;
|
Chris@16
|
194 typedef sub_match<char const *> csub_match;
|
Chris@16
|
195
|
Chris@16
|
196 #ifndef BOOST_XPRESSIVE_NO_WREGEX
|
Chris@16
|
197 typedef sub_match<std::wstring::const_iterator> wssub_match;
|
Chris@16
|
198 typedef sub_match<wchar_t const *> wcsub_match;
|
Chris@16
|
199 #endif
|
Chris@16
|
200
|
Chris@16
|
201 typedef regex_compiler<std::string::const_iterator> sregex_compiler;
|
Chris@16
|
202 typedef regex_compiler<char const *> cregex_compiler;
|
Chris@16
|
203
|
Chris@16
|
204 #ifndef BOOST_XPRESSIVE_NO_WREGEX
|
Chris@16
|
205 typedef regex_compiler<std::wstring::const_iterator> wsregex_compiler;
|
Chris@16
|
206 typedef regex_compiler<wchar_t const *> wcregex_compiler;
|
Chris@16
|
207 #endif
|
Chris@16
|
208
|
Chris@16
|
209 typedef regex_iterator<std::string::const_iterator> sregex_iterator;
|
Chris@16
|
210 typedef regex_iterator<char const *> cregex_iterator;
|
Chris@16
|
211
|
Chris@16
|
212 #ifndef BOOST_XPRESSIVE_NO_WREGEX
|
Chris@16
|
213 typedef regex_iterator<std::wstring::const_iterator> wsregex_iterator;
|
Chris@16
|
214 typedef regex_iterator<wchar_t const *> wcregex_iterator;
|
Chris@16
|
215 #endif
|
Chris@16
|
216
|
Chris@16
|
217 typedef regex_token_iterator<std::string::const_iterator> sregex_token_iterator;
|
Chris@16
|
218 typedef regex_token_iterator<char const *> cregex_token_iterator;
|
Chris@16
|
219
|
Chris@16
|
220 #ifndef BOOST_XPRESSIVE_NO_WREGEX
|
Chris@16
|
221 typedef regex_token_iterator<std::wstring::const_iterator> wsregex_token_iterator;
|
Chris@16
|
222 typedef regex_token_iterator<wchar_t const *> wcregex_token_iterator;
|
Chris@16
|
223 #endif
|
Chris@16
|
224
|
Chris@16
|
225 typedef match_results<std::string::const_iterator> smatch;
|
Chris@16
|
226 typedef match_results<char const *> cmatch;
|
Chris@16
|
227
|
Chris@16
|
228 #ifndef BOOST_XPRESSIVE_NO_WREGEX
|
Chris@16
|
229 typedef match_results<std::wstring::const_iterator> wsmatch;
|
Chris@16
|
230 typedef match_results<wchar_t const *> wcmatch;
|
Chris@16
|
231 #endif
|
Chris@16
|
232
|
Chris@16
|
233 typedef regex_id_filter_predicate<std::string::const_iterator> sregex_id_filter_predicate;
|
Chris@16
|
234 typedef regex_id_filter_predicate<char const *> cregex_id_filter_predicate;
|
Chris@16
|
235
|
Chris@16
|
236 #ifndef BOOST_XPRESSIVE_NO_WREGEX
|
Chris@16
|
237 typedef regex_id_filter_predicate<std::wstring::const_iterator> wsregex_id_filter_predicate;
|
Chris@16
|
238 typedef regex_id_filter_predicate<wchar_t const *> wcregex_id_filter_predicate;
|
Chris@16
|
239 #endif
|
Chris@16
|
240
|
Chris@16
|
241 }} // namespace boost::xpressive
|
Chris@16
|
242
|
Chris@16
|
243 #endif
|