31 namespace std _GLIBCXX_VISIBILITY(default)
33 _GLIBCXX_BEGIN_NAMESPACE_VERSION
46 enum _TokenT :
unsigned 53 _S_token_subexpr_begin,
54 _S_token_subexpr_no_group_begin,
55 _S_token_subexpr_lookahead_begin,
57 _S_token_bracket_begin,
58 _S_token_bracket_neg_begin,
60 _S_token_interval_begin,
61 _S_token_interval_end,
62 _S_token_quoted_class,
63 _S_token_char_class_name,
65 _S_token_equiv_class_name,
76 _S_token_bracket_dash,
77 _S_token_unknown = -1u
91 _ScannerBase(_FlagT __flags)
92 : _M_state(_S_state_normal),
94 _M_escape_tbl(_M_is_ecma()
97 _M_spec_char(_M_is_ecma()
99 : _M_flags & regex_constants::
basic 101 : _M_flags & regex_constants::
extended 102 ? _M_extended_spec_char
103 : _M_flags & regex_constants::
grep 105 : _M_flags & regex_constants::
egrep 107 : _M_flags & regex_constants::
awk 108 ? _M_extended_spec_char
110 _M_at_bracket_start(false)
111 { __glibcxx_assert(_M_spec_char); }
115 _M_find_escape(
char __c)
117 auto __it = _M_escape_tbl;
118 for (; __it->first !=
'\0'; ++__it)
119 if (__it->first == __c)
120 return &__it->second;
133 _M_is_extended()
const 152 {
'^', _S_token_line_begin},
153 {
'$', _S_token_line_end},
154 {
'.', _S_token_anychar},
155 {
'*', _S_token_closure0},
156 {
'+', _S_token_closure1},
187 const char* _M_ecma_spec_char =
"^$\\.*+?()[]{}|";
188 const char* _M_basic_spec_char =
".[\\*^$";
189 const char* _M_extended_spec_char =
".[\\()*+?{|^$";
195 const char* _M_spec_char;
196 bool _M_at_bracket_start;
209 template<
typename _CharT>
211 :
public _ScannerBase
214 typedef const _CharT* _IterT;
219 _Scanner(_IterT __begin, _IterT __end,
233 #ifdef _GLIBCXX_DEBUG 243 _M_scan_in_bracket();
249 _M_eat_escape_ecma();
252 _M_eat_escape_posix();
269 _GLIBCXX_END_NAMESPACE_VERSION
Scans an input range for regex tokens.
syntax_option_type
This is a bitmask type indicating how to interpret the regex.
_GLIBCXX17_INLINE constexpr syntax_option_type ECMAScript
ISO C++ entities toplevel namespace is std.
_GLIBCXX17_INLINE constexpr syntax_option_type extended
_GLIBCXX17_INLINE constexpr syntax_option_type awk
_GLIBCXX17_INLINE constexpr syntax_option_type grep
Container class for localization functionality.The locale class is first a class wrapper for C librar...
_GLIBCXX17_INLINE constexpr syntax_option_type egrep
_GLIBCXX17_INLINE constexpr syntax_option_type basic
Primary class template ctype facet.This template class defines classification and conversion function...