File indexing completed on 2025-01-18 09:53:52
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_XPRESSIVE_DETAIL_DETAIL_FWD_HPP_EAN_10_04_2005
0009 #define BOOST_XPRESSIVE_DETAIL_DETAIL_FWD_HPP_EAN_10_04_2005
0010
0011
0012 #if defined(_MSC_VER)
0013 # pragma once
0014 #endif
0015
0016 #include <map>
0017 #include <string>
0018 #include <vector>
0019 #include <climits> // for INT_MAX
0020 #include <typeinfo>
0021 #include <boost/mpl/bool.hpp>
0022 #include <boost/mpl/size_t.hpp>
0023 #include <boost/shared_ptr.hpp>
0024 #include <boost/xpressive/xpressive_fwd.hpp>
0025
0026 namespace boost { namespace xpressive { namespace detail
0027 {
0028 typedef unsigned int uint_t;
0029
0030 template<uint_t Min, uint_t Max = Min>
0031 struct generic_quant_tag;
0032
0033 struct modifier_tag;
0034
0035 struct check_tag;
0036
0037 typedef mpl::size_t<INT_MAX / 2 - 1> unknown_width;
0038
0039 struct type_info_less;
0040
0041 typedef std::map<std::type_info const *, void *, type_info_less> action_args_type;
0042
0043 struct action_context;
0044
0045 struct ReplaceAlgo;
0046
0047
0048
0049
0050 struct mark_placeholder;
0051
0052 struct posix_charset_placeholder;
0053
0054 template<typename Cond>
0055 struct assert_word_placeholder;
0056
0057 template<typename Char>
0058 struct range_placeholder;
0059
0060 struct assert_bol_placeholder;
0061
0062 struct assert_eol_placeholder;
0063
0064 struct logical_newline_placeholder;
0065
0066 struct self_placeholder;
0067
0068 template<typename Nbr>
0069 struct attribute_placeholder;
0070
0071
0072
0073
0074 struct end_matcher;
0075
0076 struct independent_end_matcher;
0077
0078 struct assert_bos_matcher;
0079
0080 struct assert_eos_matcher;
0081
0082 template<typename Traits>
0083 struct assert_bol_matcher;
0084
0085 template<typename Traits>
0086 struct assert_eol_matcher;
0087
0088 template<typename Cond, typename Traits>
0089 struct assert_word_matcher;
0090
0091 struct true_matcher;
0092
0093 template<typename Alternates, typename Traits>
0094 struct alternate_matcher;
0095
0096 struct alternate_end_matcher;
0097
0098 template<typename Traits>
0099 struct posix_charset_matcher;
0100
0101 template<typename BidiIter>
0102 struct sequence;
0103
0104 template<typename Traits, typename ICase>
0105 struct mark_matcher;
0106
0107 struct mark_begin_matcher;
0108
0109 struct mark_end_matcher;
0110
0111 template<typename BidiIter>
0112 struct regex_matcher;
0113
0114 template<typename BidiIter>
0115 struct regex_byref_matcher;
0116
0117 template<typename Traits>
0118 struct compound_charset;
0119
0120 template<typename Traits, typename ICase, typename CharSet = compound_charset<Traits> >
0121 struct charset_matcher;
0122
0123 template<typename Traits, typename ICase>
0124 struct range_matcher;
0125
0126 template<typename Traits, typename Size>
0127 struct set_matcher;
0128
0129 template<typename Xpr, typename Greedy>
0130 struct simple_repeat_matcher;
0131
0132 struct repeat_begin_matcher;
0133
0134 template<typename Greedy>
0135 struct repeat_end_matcher;
0136
0137 template<typename Traits, typename ICase, typename Not>
0138 struct literal_matcher;
0139
0140 template<typename Traits, typename ICase>
0141 struct string_matcher;
0142
0143 template<typename Actor>
0144 struct action_matcher;
0145
0146 template<typename Predicate>
0147 struct predicate_matcher;
0148
0149 template<typename Xpr, typename Greedy>
0150 struct optional_matcher;
0151
0152 template<typename Xpr, typename Greedy>
0153 struct optional_mark_matcher;
0154
0155 template<typename Matcher, typename Traits, typename ICase>
0156 struct attr_matcher;
0157
0158 template<typename Nbr>
0159 struct attr_begin_matcher;
0160
0161 struct attr_end_matcher;
0162
0163 template<typename Xpr>
0164 struct is_modifiable;
0165
0166 template<typename Head, typename Tail>
0167 struct alternates_list;
0168
0169 template<typename Modifier>
0170 struct modifier_op;
0171
0172 struct icase_modifier;
0173
0174 template<typename BidiIter, typename ICase, typename Traits>
0175 struct xpression_visitor;
0176
0177 template<typename BidiIter>
0178 struct regex_impl;
0179
0180 struct epsilon_matcher;
0181
0182 template<typename BidiIter>
0183 struct nested_results;
0184
0185 template<typename BidiIter>
0186 struct regex_id_filter_predicate;
0187
0188 template<typename Xpr>
0189 struct keeper_matcher;
0190
0191 template<typename Xpr>
0192 struct lookahead_matcher;
0193
0194 template<typename Xpr>
0195 struct lookbehind_matcher;
0196
0197 template<typename IsBoundary>
0198 struct word_boundary;
0199
0200 template<typename BidiIter, typename Matcher>
0201 sequence<BidiIter> make_dynamic(Matcher const &matcher);
0202
0203 template<typename Char>
0204 struct xpression_linker;
0205
0206 template<typename Char>
0207 struct xpression_peeker;
0208
0209 struct any_matcher;
0210
0211 template<typename Traits>
0212 struct logical_newline_matcher;
0213
0214 typedef proto::expr<proto::tag::terminal, proto::term<logical_newline_placeholder>, 0> logical_newline_xpression;
0215
0216 struct set_initializer;
0217
0218 typedef proto::expr<proto::tag::terminal, proto::term<set_initializer>, 0> set_initializer_type;
0219
0220 struct lookahead_tag;
0221
0222 struct lookbehind_tag;
0223
0224 struct keeper_tag;
0225
0226 template<typename Locale>
0227 struct locale_modifier;
0228
0229 template<typename Matcher>
0230 struct matcher_wrapper;
0231
0232 template<typename Locale, typename BidiIter>
0233 struct regex_traits_type;
0234
0235 template<typename Expr>
0236 struct let_;
0237
0238 template<typename Args, typename BidiIter>
0239 void bind_args(let_<Args> const &, match_results<BidiIter> &);
0240
0241
0242
0243 struct no_next;
0244
0245 template<typename BidiIter>
0246 struct core_access;
0247
0248 template<typename BidiIter>
0249 struct match_state;
0250
0251 template<typename BidiIter>
0252 struct matchable;
0253
0254 template<typename BidiIter>
0255 struct matchable_ex;
0256
0257 template<typename Matcher, typename BidiIter>
0258 struct dynamic_xpression;
0259
0260 template<typename BidiIter>
0261 struct shared_matchable;
0262
0263 template<typename BidiIter>
0264 struct alternates_vector;
0265
0266 template<typename Matcher, typename Next>
0267 struct static_xpression;
0268
0269 typedef static_xpression<end_matcher, no_next> end_xpression;
0270
0271 typedef static_xpression<alternate_end_matcher, no_next> alternate_end_xpression;
0272
0273 typedef static_xpression<independent_end_matcher, no_next> independent_end_xpression;
0274
0275 typedef static_xpression<true_matcher, no_next> true_xpression;
0276
0277 template<typename Matcher, typename Next = end_xpression>
0278 struct static_xpression;
0279
0280 template<typename Top, typename Next>
0281 struct stacked_xpression;
0282
0283 template<typename Xpr>
0284 struct is_static_xpression;
0285
0286 template<typename BidiIter>
0287 struct sub_match_impl;
0288
0289 template<typename T>
0290 struct list;
0291
0292 template<typename BidiIter>
0293 struct results_cache;
0294
0295 template<typename T>
0296 struct sequence_stack;
0297
0298 template<typename BidiIter>
0299 struct results_extras;
0300
0301 template<typename BidiIter>
0302 struct match_context;
0303
0304 template<typename BidiIter>
0305 struct sub_match_vector;
0306
0307 template<typename T, typename U>
0308 struct action_arg;
0309
0310 struct actionable;
0311
0312 template<typename Char>
0313 struct traits;
0314
0315 template<typename Traits, typename BidiIter>
0316 Traits const &traits_cast(match_state<BidiIter> const &state);
0317
0318 template<typename Char>
0319 struct basic_chset;
0320
0321 template<typename Char>
0322 struct named_mark;
0323
0324 template<typename BidiIter>
0325 struct memento;
0326
0327 template<typename Char, typename Traits>
0328 void set_char(compound_charset<Traits> &chset, Char ch, Traits const &tr, bool icase);
0329
0330 template<typename Char, typename Traits>
0331 void set_range(compound_charset<Traits> &chset, Char from, Char to, Traits const &tr, bool icase);
0332
0333 template<typename Traits>
0334 void set_class(compound_charset<Traits> &chset, typename Traits::char_class_type char_class, bool no, Traits const &tr);
0335
0336 template<typename Char, typename Traits>
0337 void set_char(basic_chset<Char> &chset, Char ch, Traits const &tr, bool icase);
0338
0339 template<typename Char, typename Traits>
0340 void set_range(basic_chset<Char> &chset, Char from, Char to, Traits const &tr, bool icase);
0341
0342 template<typename Char, typename Traits>
0343 void set_class(basic_chset<Char> &chset, typename Traits::char_class_type char_class, bool no, Traits const &tr);
0344
0345 template<typename Matcher>
0346 static_xpression<Matcher> const
0347 make_static(Matcher const &matcher);
0348
0349 template<typename Matcher, typename Next>
0350 static_xpression<Matcher, Next> const
0351 make_static(Matcher const &matcher, Next const &next);
0352
0353 int get_mark_number(basic_mark_tag const &);
0354
0355 template<typename Xpr, typename BidiIter>
0356 void static_compile(Xpr const &xpr, shared_ptr<regex_impl<BidiIter> > const &impl);
0357
0358 struct quant_spec;
0359
0360 template<typename BidiIter, typename Xpr>
0361 void make_simple_repeat(quant_spec const &spec, sequence<BidiIter> &seq, Xpr const &xpr);
0362
0363 template<typename BidiIter>
0364 void make_simple_repeat(quant_spec const &spec, sequence<BidiIter> &seq);
0365
0366 template<typename BidiIter>
0367 void make_repeat(quant_spec const &spec, sequence<BidiIter> &seq, int mark_nbr);
0368
0369 template<typename BidiIter>
0370 void make_repeat(quant_spec const &spec, sequence<BidiIter> &seq);
0371
0372 template<typename BidiIter>
0373 void make_optional(quant_spec const &spec, sequence<BidiIter> &seq);
0374
0375 template<typename BidiIter>
0376 void make_optional(quant_spec const &spec, sequence<BidiIter> &seq, int mark_nbr);
0377
0378 template<typename Char>
0379 struct string_type
0380 {
0381 typedef std::vector<Char> type;
0382 };
0383
0384 template<>
0385 struct string_type<char>
0386 {
0387 typedef std::string type;
0388 };
0389
0390 #ifndef BOOST_XPRESSIVE_NO_WREGEX
0391 template<>
0392 struct string_type<wchar_t>
0393 {
0394 typedef std::wstring type;
0395 };
0396 #endif
0397
0398 }}}
0399
0400 namespace boost { namespace xpressive { namespace grammar_detail
0401 {
0402 using proto::_;
0403 using proto::or_;
0404 using proto::if_;
0405 using proto::call;
0406 using proto::when;
0407 using proto::otherwise;
0408 using proto::switch_;
0409 using proto::make;
0410 using proto::_child;
0411 using proto::_value;
0412 using proto::_left;
0413 using proto::_right;
0414 using proto::not_;
0415 using proto::_state;
0416 using proto::_data;
0417 using proto::callable;
0418 using proto::transform;
0419 using proto::fold;
0420 using proto::reverse_fold;
0421 using proto::fold_tree;
0422 using proto::reverse_fold_tree;
0423 using proto::terminal;
0424 using proto::shift_right;
0425 using proto::bitwise_or;
0426 using proto::logical_not;
0427 using proto::dereference;
0428 using proto::unary_plus;
0429 using proto::negate;
0430 using proto::complement;
0431 using proto::comma;
0432 using proto::assign;
0433 using proto::subscript;
0434 using proto::nary_expr;
0435 using proto::unary_expr;
0436 using proto::binary_expr;
0437 using proto::_deep_copy;
0438 using proto::vararg;
0439 namespace tag = proto::tag;
0440 }}}
0441
0442 namespace boost { namespace xpressive { namespace op
0443 {
0444 struct push;
0445 struct push_back;
0446 struct pop;
0447 struct push_front;
0448 struct pop_back;
0449 struct pop_front;
0450 struct back;
0451 struct front;
0452 struct top;
0453 struct first;
0454 struct second;
0455 struct matched;
0456 struct length;
0457 struct str;
0458 struct insert;
0459 struct make_pair;
0460
0461 template<typename T>
0462 struct as;
0463 template<typename T>
0464 struct static_cast_;
0465 template<typename T>
0466 struct dynamic_cast_;
0467 template<typename T>
0468 struct const_cast_;
0469 template<typename T>
0470 struct construct;
0471 template<typename T>
0472 struct throw_;
0473 }}}
0474
0475
0476 namespace boost { namespace xpressive
0477 {
0478
0479
0480 template<typename Traits, std::size_t N>
0481 typename Traits::char_class_type
0482 lookup_classname(Traits const &traits, char const (&cname)[N], bool icase = false);
0483
0484 }}
0485
0486 #endif