/usr/include/c++/8/bits
NameSizeModeActions
algorithmfwd.h217360644editdlrm
allocated_ptr.h32930644editdlrm
allocator.h75690644editdlrm
alloc_traits.h200660644editdlrm
atomic_base.h238420644editdlrm
atomic_futex.h95760644editdlrm
atomic_lockfree_defines.h22530644editdlrm
basic_ios.h160740644editdlrm
basic_ios.tcc60830644editdlrm
basic_string.h2426970644editdlrm
basic_string.tcc537550644editdlrm
boost_concept_check.h271610644editdlrm
c++0x_warning.h14740644editdlrm
char_traits.h209150644editdlrm
codecvt.h212890644editdlrm
concept_check.h34230644editdlrm
cpp_type_traits.h97890644editdlrm
cxxabi_forced.h18110644editdlrm
cxxabi_init_exception.h22200644editdlrm
deque.tcc341220644editdlrm
enable_special_members.h123870644editdlrm
exception.h22800644editdlrm
exception_defines.h16450644editdlrm
exception_ptr.h59810644editdlrm
forward_list.h489190644editdlrm
forward_list.tcc131690644editdlrm
fstream.tcc327990644editdlrm
fs_dir.h147240644editdlrm
fs_fwd.h102790644editdlrm
fs_ops.h97300644editdlrm
fs_path.h328940644editdlrm
functexcept.h32540644editdlrm
functional_hash.h82380644editdlrm
gslice.h55180644editdlrm
gslice_array.h77690644editdlrm
hashtable.h737850644editdlrm
hashtable_policy.h679710644editdlrm
hash_bytes.h21460644editdlrm
indirect_array.h78610644editdlrm
invoke.h36570644editdlrm
ios_base.h310230644editdlrm
istream.tcc310930644editdlrm
list.tcc159760644editdlrm
localefwd.h56460644editdlrm
locale_classes.h248970644editdlrm
locale_classes.tcc83750644editdlrm
locale_conv.h160970644editdlrm
locale_facets.h923280644editdlrm
locale_facets.tcc395480644editdlrm
locale_facets_nonio.h689800644editdlrm
locale_facets_nonio.tcc452800644editdlrm
mask_array.h75950644editdlrm
memoryfwd.h24530644editdlrm
move.h65290644editdlrm
nested_exception.h48020644editdlrm
node_handle.h82160644editdlrm
ostream.tcc123150644editdlrm
ostream_insert.h40020644editdlrm
parse_numbers.h79440644editdlrm
postypes.h82080644editdlrm
predefined_ops.h90830644editdlrm
ptr_traits.h66260644editdlrm
quoted_string.h50530644editdlrm
random.h1752500644editdlrm
random.tcc1055900644editdlrm
range_access.h100300644editdlrm
refwrap.h118840644editdlrm
regex.h974020644editdlrm
regex.tcc165650644editdlrm
regex_automaton.h107220644editdlrm
regex_automaton.tcc78380644editdlrm
regex_compiler.h180500644editdlrm
regex_compiler.tcc192880644editdlrm
regex_constants.h147080644editdlrm
regex_error.h49040644editdlrm
regex_executor.h74880644editdlrm
regex_executor.tcc188410644editdlrm
regex_scanner.h70880644editdlrm
regex_scanner.tcc150090644editdlrm
shared_ptr.h234330644editdlrm
shared_ptr_atomic.h97690644editdlrm
shared_ptr_base.h542860644editdlrm
slice_array.h93480644editdlrm
specfun.h470510644editdlrm
sstream.tcc101420644editdlrm
std_abs.h32660644editdlrm
std_function.h232600644editdlrm
std_mutex.h92980644editdlrm
stl_algo.h2142940644editdlrm
stl_algobase.h504940644editdlrm
stl_bvector.h337280644editdlrm
stl_construct.h73970644editdlrm
stl_deque.h785750644editdlrm
stl_function.h417450644editdlrm
stl_heap.h202060644editdlrm
stl_iterator.h422910644editdlrm
stl_iterator_base_funcs.h81780644editdlrm
stl_iterator_base_types.h86800644editdlrm
stl_list.h675580644editdlrm
stl_map.h527910644editdlrm
stl_multimap.h415570644editdlrm
stl_multiset.h358090644editdlrm
stl_numeric.h138320644editdlrm
stl_pair.h186420644editdlrm
stl_queue.h240730644editdlrm
stl_raw_storage_iter.h38300644editdlrm
stl_relops.h45940644editdlrm
stl_set.h361250644editdlrm
stl_stack.h119380644editdlrm
stl_tempbuf.h83440644editdlrm
stl_tree.h749040644editdlrm
stl_uninitialized.h277090644editdlrm
stl_vector.h605340644editdlrm
streambuf.tcc49290644editdlrm
streambuf_iterator.h137580644editdlrm
stream_iterator.h66540644editdlrm
stringfwd.h26070644editdlrm
string_view.tcc66980644editdlrm
uniform_int_dist.h100810644editdlrm
unique_ptr.h259840644editdlrm
unordered_map.h753410644editdlrm
unordered_set.h591480644editdlrm
uses_allocator.h65250644editdlrm
valarray_after.h226550644editdlrm
valarray_array.h218070644editdlrm
valarray_array.tcc72540644editdlrm
valarray_before.h185130644editdlrm
vector.tcc296440644editdlrm
Edit: /usr/include/c++/8/bits/regex_executor.h (7488B)
// class template regex -*- C++ -*- // Copyright (C) 2013-2018 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . /** * @file bits/regex_executor.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{regex} */ // FIXME convert comments to doxygen format. namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __detail { /** * @addtogroup regex-detail * @{ */ /** * @brief Takes a regex and an input string and does the matching. * * The %_Executor class has two modes: DFS mode and BFS mode, controlled * by the template parameter %__dfs_mode. */ template class _Executor { using __search_mode = integral_constant; using __dfs = true_type; using __bfs = false_type; enum class _Match_mode : unsigned char { _Exact, _Prefix }; public: typedef typename iterator_traits<_BiIter>::value_type _CharT; typedef basic_regex<_CharT, _TraitsT> _RegexT; typedef std::vector, _Alloc> _ResultsVec; typedef regex_constants::match_flag_type _FlagT; typedef typename _TraitsT::char_class_type _ClassT; typedef _NFA<_TraitsT> _NFAT; public: _Executor(_BiIter __begin, _BiIter __end, _ResultsVec& __results, const _RegexT& __re, _FlagT __flags) : _M_begin(__begin), _M_end(__end), _M_re(__re), _M_nfa(*__re._M_automaton), _M_results(__results), _M_rep_count(_M_nfa.size()), _M_states(_M_nfa._M_start(), _M_nfa.size()), _M_flags((__flags & regex_constants::match_prev_avail) ? (__flags & ~regex_constants::match_not_bol & ~regex_constants::match_not_bow) : __flags) { } // Set matched when string exactly matches the pattern. bool _M_match() { _M_current = _M_begin; return _M_main(_Match_mode::_Exact); } // Set matched when some prefix of the string matches the pattern. bool _M_search_from_first() { _M_current = _M_begin; return _M_main(_Match_mode::_Prefix); } bool _M_search(); private: void _M_rep_once_more(_Match_mode __match_mode, _StateIdT); void _M_handle_repeat(_Match_mode, _StateIdT); void _M_handle_subexpr_begin(_Match_mode, _StateIdT); void _M_handle_subexpr_end(_Match_mode, _StateIdT); void _M_handle_line_begin_assertion(_Match_mode, _StateIdT); void _M_handle_line_end_assertion(_Match_mode, _StateIdT); void _M_handle_word_boundary(_Match_mode, _StateIdT); void _M_handle_subexpr_lookahead(_Match_mode, _StateIdT); void _M_handle_match(_Match_mode, _StateIdT); void _M_handle_backref(_Match_mode, _StateIdT); void _M_handle_accept(_Match_mode, _StateIdT); void _M_handle_alternative(_Match_mode, _StateIdT); void _M_dfs(_Match_mode __match_mode, _StateIdT __start); bool _M_main(_Match_mode __match_mode) { return _M_main_dispatch(__match_mode, __search_mode{}); } bool _M_main_dispatch(_Match_mode __match_mode, __dfs); bool _M_main_dispatch(_Match_mode __match_mode, __bfs); bool _M_is_word(_CharT __ch) const { static const _CharT __s[2] = { 'w' }; return _M_re._M_automaton->_M_traits.isctype (__ch, _M_re._M_automaton->_M_traits.lookup_classname(__s, __s+1)); } bool _M_at_begin() const { return _M_current == _M_begin && !(_M_flags & (regex_constants::match_not_bol | regex_constants::match_prev_avail)); } bool _M_at_end() const { return _M_current == _M_end && !(_M_flags & regex_constants::match_not_eol); } bool _M_word_boundary() const; bool _M_lookahead(_StateIdT __next); // Holds additional information used in BFS-mode. template struct _State_info; template struct _State_info<__bfs, _ResultsVec> { explicit _State_info(_StateIdT __start, size_t __n) : _M_visited_states(new bool[__n]()), _M_start(__start) { } bool _M_visited(_StateIdT __i) { if (_M_visited_states[__i]) return true; _M_visited_states[__i] = true; return false; } void _M_queue(_StateIdT __i, const _ResultsVec& __res) { _M_match_queue.emplace_back(__i, __res); } // Dummy implementations for BFS mode. _BiIter* _M_get_sol_pos() { return nullptr; } // Saves states that need to be considered for the next character. vector> _M_match_queue; // Indicates which states are already visited. unique_ptr _M_visited_states; // To record current solution. _StateIdT _M_start; }; template struct _State_info<__dfs, _ResultsVec> { explicit _State_info(_StateIdT __start, size_t) : _M_start(__start) { } // Dummy implementations for DFS mode. bool _M_visited(_StateIdT) const { return false; } void _M_queue(_StateIdT, const _ResultsVec&) { } _BiIter* _M_get_sol_pos() { return &_M_sol_pos; } // To record current solution. _StateIdT _M_start; _BiIter _M_sol_pos; }; public: _ResultsVec _M_cur_results; _BiIter _M_current; _BiIter _M_begin; const _BiIter _M_end; const _RegexT& _M_re; const _NFAT& _M_nfa; _ResultsVec& _M_results; vector> _M_rep_count; _State_info<__search_mode, _ResultsVec> _M_states; _FlagT _M_flags; // Do we have a solution so far? bool _M_has_sol; }; //@} regex-detail } // namespace __detail _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #include