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