33 namespace std _GLIBCXX_VISIBILITY(default)
35 _GLIBCXX_BEGIN_NAMESPACE_VERSION
50 template<
typename _BiIter,
typename _Alloc,
typename _TraitsT,
58 enum class _Match_mode : unsigned char { _Exact, _Prefix };
65 typedef typename _TraitsT::char_class_type _ClassT;
66 typedef _NFA<_TraitsT> _NFAT;
77 _M_nfa(*__re._M_automaton),
78 _M_results(__results),
79 _M_rep_count(_M_nfa.size()),
80 _M_states(_M_nfa._M_start(), _M_nfa.size()),
92 _M_current = _M_begin;
93 return _M_main(_Match_mode::_Exact);
98 _M_search_from_first()
100 _M_current = _M_begin;
101 return _M_main(_Match_mode::_Prefix);
109 _M_rep_once_more(_Match_mode __match_mode, _StateIdT);
112 _M_handle_repeat(_Match_mode, _StateIdT);
115 _M_handle_subexpr_begin(_Match_mode, _StateIdT);
118 _M_handle_subexpr_end(_Match_mode, _StateIdT);
121 _M_handle_line_begin_assertion(_Match_mode, _StateIdT);
124 _M_handle_line_end_assertion(_Match_mode, _StateIdT);
127 _M_handle_word_boundary(_Match_mode, _StateIdT);
130 _M_handle_subexpr_lookahead(_Match_mode, _StateIdT);
133 _M_handle_match(_Match_mode, _StateIdT);
136 _M_handle_backref(_Match_mode, _StateIdT);
139 _M_handle_accept(_Match_mode, _StateIdT);
142 _M_handle_alternative(_Match_mode, _StateIdT);
145 _M_dfs(_Match_mode __match_mode, _StateIdT __start);
148 _M_main(_Match_mode __match_mode)
152 _M_main_dispatch(_Match_mode __match_mode,
__dfs);
155 _M_main_dispatch(_Match_mode __match_mode,
__bfs);
158 _M_is_word(_CharT __ch)
const
160 static const _CharT __s[2] = {
'w' };
161 return _M_re._M_automaton->_M_traits.isctype
162 (__ch, _M_re._M_automaton->_M_traits.lookup_classname(__s, __s+1));
168 return _M_current == _M_begin
176 return _M_current == _M_end
181 _M_word_boundary()
const;
184 _M_lookahead(_StateIdT __next);
187 template<
typename _SearchMode,
typename _ResultsVec>
190 template<
typename _ResultsVec>
194 _State_info(_StateIdT __start,
size_t __n)
195 : _M_visited_states(
new bool[__n]()), _M_start(__start)
198 bool _M_visited(_StateIdT __i)
200 if (_M_visited_states[__i])
202 _M_visited_states[__i] =
true;
206 void _M_queue(_StateIdT __i,
const _ResultsVec& __res)
207 { _M_match_queue.emplace_back(__i, __res); }
210 _BiIter* _M_get_sol_pos() {
return nullptr; }
220 template<
typename _ResultsVec>
224 _State_info(_StateIdT __start,
size_t) : _M_start(__start)
228 bool _M_visited(_StateIdT)
const {
return false; }
231 _BiIter* _M_get_sol_pos() {
return &_M_sol_pos; }
242 const _BiIter _M_end;
247 _State_info<__search_mode, _ResultsVec> _M_states;
255 _GLIBCXX_END_NAMESPACE_VERSION
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
ISO C++ entities toplevel namespace is std.
constexpr match_flag_type match_not_bow
constexpr match_flag_type match_not_bol
constexpr match_flag_type match_not_eol
match_flag_type
This is a bitmask type indicating regex matching rules.
constexpr match_flag_type match_prev_avail
Traits class for iterators.
Takes a regex and an input string and does the matching.
A standard container which offers fixed time access to individual elements in any order.