libstdc++
std::__detail::_Scanner< _CharT > Class Template Reference

#include <regex_scanner.h>

Inherits std::__detail::_ScannerBase.

Public Types

typedef const std::ctype< _CharT > _CtypeT
 
typedef regex_constants::syntax_option_type _FlagT
 
typedef std::basic_string< _CharT > _StringT
 
enum  _TokenT : unsigned {
  _S_token_anychar , _S_token_ord_char , _S_token_oct_num , _S_token_hex_num ,
  _S_token_backref , _S_token_subexpr_begin , _S_token_subexpr_no_group_begin , _S_token_subexpr_lookahead_begin ,
  _S_token_subexpr_end , _S_token_bracket_begin , _S_token_bracket_neg_begin , _S_token_bracket_end ,
  _S_token_interval_begin , _S_token_interval_end , _S_token_quoted_class , _S_token_char_class_name ,
  _S_token_collsymbol , _S_token_equiv_class_name , _S_token_opt , _S_token_or ,
  _S_token_closure0 , _S_token_closure1 , _S_token_line_begin , _S_token_line_end ,
  _S_token_word_bound , _S_token_comma , _S_token_dup_count , _S_token_eof ,
  _S_token_bracket_dash , _S_token_unknown
}
 

Public Member Functions

 _Scanner (const _CharT *__begin, const _CharT *__end, _FlagT __flags, std::locale __loc)
 
void _M_advance ()
 
_TokenT _M_get_token () const noexcept
 
const _StringT_M_get_value () const noexcept
 

Protected Types

enum  _StateT { _S_state_normal , _S_state_in_brace , _S_state_in_bracket }
 

Protected Member Functions

const char * _M_find_escape (char __c)
 
bool _M_is_awk () const
 
bool _M_is_basic () const
 
bool _M_is_ecma () const
 
bool _M_is_extended () const
 
bool _M_is_grep () const
 

Protected Attributes

bool _M_at_bracket_start
 
const std::pair< char, char > _M_awk_escape_tbl [11]
 
const char * _M_basic_spec_char
 
const std::pair< char, char > _M_ecma_escape_tbl [8]
 
const char * _M_ecma_spec_char
 
const std::pair< char, char > * _M_escape_tbl
 
const char * _M_extended_spec_char
 
_FlagT _M_flags
 
const char * _M_spec_char
 
_StateT _M_state
 
_TokenT _M_token
 
const std::pair< char, _TokenT > _M_token_tbl [9]
 

Detailed Description

template<typename _CharT>
class std::__detail::_Scanner< _CharT >

Scans an input range for regex tokens.

The _Scanner class interprets the regular expression pattern in the input range passed to its constructor as a sequence of parse tokens passed to the regular expression compiler. The sequence of tokens provided depends on the flag settings passed to the constructor: different regular expression grammars will interpret the same input pattern in syntactically different ways.

Definition at line 210 of file regex_scanner.h.

Member Typedef Documentation

◆ _CtypeT

template<typename _CharT >
typedef const std::ctype<_CharT> std::__detail::_Scanner< _CharT >::_CtypeT

Definition at line 216 of file regex_scanner.h.

◆ _FlagT

template<typename _CharT >
typedef regex_constants::syntax_option_type std::__detail::_Scanner< _CharT >::_FlagT

Definition at line 215 of file regex_scanner.h.

◆ _StringT

template<typename _CharT >
typedef std::basic_string<_CharT> std::__detail::_Scanner< _CharT >::_StringT

Definition at line 214 of file regex_scanner.h.

Member Enumeration Documentation

◆ _StateT

enum std::__detail::_ScannerBase::_StateT
protectedinherited

Definition at line 83 of file regex_scanner.h.

◆ _TokenT

enum std::__detail::_ScannerBase::_TokenT : unsigned
inherited

Token types returned from the scanner.

Definition at line 46 of file regex_scanner.h.

Constructor & Destructor Documentation

◆ _Scanner()

template<typename _CharT >
std::__detail::_Scanner< _CharT >::_Scanner ( const _CharT *  __begin,
const _CharT *  __end,
_FlagT  __flags,
std::locale  __loc 
)

Definition at line 56 of file regex_scanner.tcc.

Member Function Documentation

◆ _M_advance()

template<typename _CharT >
void std::__detail::_Scanner< _CharT >::_M_advance

Definition at line 69 of file regex_scanner.tcc.

◆ _M_find_escape()

const char * std::__detail::_ScannerBase::_M_find_escape ( char  __c)
inlineprotectedinherited

Definition at line 115 of file regex_scanner.h.

◆ _M_get_token()

template<typename _CharT >
_TokenT std::__detail::_Scanner< _CharT >::_M_get_token ( ) const
inlinenoexcept

Definition at line 225 of file regex_scanner.h.

◆ _M_get_value()

template<typename _CharT >
const _StringT & std::__detail::_Scanner< _CharT >::_M_get_value ( ) const
inlinenoexcept

Definition at line 229 of file regex_scanner.h.

◆ _M_is_awk()

bool std::__detail::_ScannerBase::_M_is_awk ( ) const
inlineprotectedinherited

Definition at line 145 of file regex_scanner.h.

◆ _M_is_basic()

bool std::__detail::_ScannerBase::_M_is_basic ( ) const
inlineprotectedinherited

Definition at line 129 of file regex_scanner.h.

◆ _M_is_ecma()

bool std::__detail::_ScannerBase::_M_is_ecma ( ) const
inlineprotectedinherited

Definition at line 125 of file regex_scanner.h.

◆ _M_is_extended()

bool std::__detail::_ScannerBase::_M_is_extended ( ) const
inlineprotectedinherited

Definition at line 133 of file regex_scanner.h.

◆ _M_is_grep()

bool std::__detail::_ScannerBase::_M_is_grep ( ) const
inlineprotectedinherited

Definition at line 141 of file regex_scanner.h.

Member Data Documentation

◆ _M_at_bracket_start

bool std::__detail::_ScannerBase::_M_at_bracket_start
protectedinherited

Definition at line 196 of file regex_scanner.h.

◆ _M_awk_escape_tbl

const std::pair<char, char> std::__detail::_ScannerBase::_M_awk_escape_tbl[11]
protectedinherited

Definition at line 173 of file regex_scanner.h.

◆ _M_basic_spec_char

const char* std::__detail::_ScannerBase::_M_basic_spec_char
protectedinherited

Definition at line 188 of file regex_scanner.h.

◆ _M_ecma_escape_tbl

const std::pair<char, char> std::__detail::_ScannerBase::_M_ecma_escape_tbl[8]
protectedinherited

Definition at line 162 of file regex_scanner.h.

◆ _M_ecma_spec_char

const char* std::__detail::_ScannerBase::_M_ecma_spec_char
protectedinherited

Definition at line 187 of file regex_scanner.h.

◆ _M_escape_tbl

const std::pair<char, char>* std::__detail::_ScannerBase::_M_escape_tbl
protectedinherited

Definition at line 194 of file regex_scanner.h.

◆ _M_extended_spec_char

const char* std::__detail::_ScannerBase::_M_extended_spec_char
protectedinherited

Definition at line 189 of file regex_scanner.h.

◆ _M_flags

_FlagT std::__detail::_ScannerBase::_M_flags
protectedinherited

Definition at line 192 of file regex_scanner.h.

◆ _M_spec_char

const char* std::__detail::_ScannerBase::_M_spec_char
protectedinherited

Definition at line 195 of file regex_scanner.h.

◆ _M_state

_StateT std::__detail::_ScannerBase::_M_state
protectedinherited

Definition at line 191 of file regex_scanner.h.

◆ _M_token

_TokenT std::__detail::_ScannerBase::_M_token
protectedinherited

Definition at line 193 of file regex_scanner.h.

◆ _M_token_tbl

const std::pair<char, _TokenT> std::__detail::_ScannerBase::_M_token_tbl[9]
protectedinherited

Definition at line 150 of file regex_scanner.h.


The documentation for this class was generated from the following files: