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
218 _Scanner(
const _CharT* __begin,
const _CharT* __end,
225 _M_get_token()
const noexcept
229 _M_get_value()
const noexcept
232 #ifdef _GLIBCXX_DEBUG
242 _M_scan_in_bracket();
248 _M_eat_escape_ecma();
251 _M_eat_escape_posix();
259 const _CharT* _M_current;
260 const _CharT* _M_end;
268 _GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
constexpr syntax_option_type ECMAScript
constexpr syntax_option_type egrep
syntax_option_type
This is a bitmask type indicating how to interpret the regex.
constexpr syntax_option_type awk
constexpr syntax_option_type extended
constexpr syntax_option_type basic
constexpr syntax_option_type grep
Container class for localization functionality.
Primary class template ctype facet.
Scans an input range for regex tokens.