31 namespace std _GLIBCXX_VISIBILITY(default)
33 _GLIBCXX_BEGIN_NAMESPACE_VERSION
35 template<
typename _BiIter>
38 template<
typename _Bi_iter,
typename _Allocator>
41 _GLIBCXX_END_NAMESPACE_VERSION
45 _GLIBCXX_BEGIN_NAMESPACE_VERSION
48 template<
typename _FwdIterT,
typename _Alloc>
49 class _SpecializedResults
53 _SpecializedResults(
const _Automaton::_SizeT __size,
54 const _SpecializedCursor<_FwdIterT>& __cursor,
55 match_results<_FwdIterT, _Alloc>& __m);
58 _M_set_pos(
int __i,
int __j,
const _PatternCursor& __pc);
61 _M_set_matched(
int __i,
bool __is_matched)
62 { _M_results.at(__i).matched = __is_matched; }
65 match_results<_FwdIterT, _Alloc>& _M_results;
68 template<
typename _FwdIterT,
typename _Alloc>
69 _SpecializedResults<_FwdIterT, _Alloc>::
70 _SpecializedResults(
const _Automaton::_SizeT __size,
71 const _SpecializedCursor<_FwdIterT>& __cursor,
72 match_results<_FwdIterT, _Alloc>& __m)
76 _M_results.reserve(__size + 2);
77 _M_results.resize(__size);
78 typename match_results<_FwdIterT, _Alloc>::value_type __sm;
79 __sm.first = __sm.second = __cursor._M_begin();
80 _M_results.push_back(__sm);
81 __sm.first = __sm.second = __cursor._M_end();
82 _M_results.push_back(__sm);
85 template<
typename _FwdIterT,
typename _Alloc>
87 _SpecializedResults<_FwdIterT, _Alloc>::
88 _M_set_pos(
int __i,
int __j,
const _PatternCursor& __pc)
90 typedef const _SpecializedCursor<_FwdIterT>& _CursorT;
91 _CursorT __c =
static_cast<_CursorT
>(__pc);
93 _M_results.at(__i).first = __c._M_pos();
95 _M_results.at(__i).second = __c._M_pos()+1;
107 _Grep_matcher(_PatternCursor& __p,
109 const _AutomatonPtr& __automaton,
114 _M_e_closure(_StateIdT __i);
117 _M_e_closure(
const _StateSet& __s);
120 _M_e_closure(_StateStack& __stack,
const _StateSet& __s);
124 _PatternCursor& _M_pattern;
125 _Results& _M_results;
128 _GLIBCXX_END_NAMESPACE_VERSION