STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
_Builder< _FwdIt, _Elem, _RxTraits > Class Template Reference

Public Types

typedef iterator_traits< _FwdIt >::difference_type _Difft
 

Public Member Functions

 _Builder (const _RxTraits &_Tr, regex_constants::syntax_option_type)
 
bool _Beg_expr () const
 
void _Setlong ()
 
void _Discard_pattern ()
 
_Node_base_Getmark () const
 
void _Add_nop ()
 
void _Add_bol ()
 
void _Add_eol ()
 
void _Add_wbound ()
 
void _Add_dot ()
 
void _Add_char (_Elem _Ch)
 
void _Add_class ()
 
void _Add_char_to_class (_Elem _Ch)
 
void _Add_range (_Elem _E0, _Elem _E1)
 
void _Add_named_class (_Regex_traits_base::char_class_type, bool=false)
 
void _Add_equiv (_FwdIt, _FwdIt, _Difft)
 
void _Add_coll (_FwdIt, _FwdIt, _Difft)
 
_Node_base_Begin_group ()
 
void _End_group (_Node_base *_Back)
 
_Node_base_Begin_assert_group (bool)
 
void _End_assert_group (_Node_base *)
 
_Node_base_Begin_capture_group (unsigned int _Idx)
 
void _Add_backreference (unsigned int _Idx)
 
_Node_base_Begin_if (_Node_base *_Start)
 
void _Else_if (_Node_base *, _Node_base *)
 
void _Add_rep (int _Min, int _Max, bool _Greedy)
 
void _Negate ()
 
void _Mark_final ()
 
_Root_node_End_pattern ()
 

Private Member Functions

_Node_base_Link_node (_Node_base *)
 
_Node_base_New_node (_Node_type _Kind)
 
void _Add_str_node ()
 
bool _Beg_expr (_Node_base *) const
 
void _Add_char_to_bitmap (_Elem _Ch)
 
void _Add_char_to_array (_Elem _Ch)
 
void _Add_elts (_Node_class< _Elem, _RxTraits > *, _Regex_traits_base::char_class_type, bool)
 
void _Char_to_elts (_FwdIt, _FwdIt, _Difft, _Sequence< _Elem > **)
 
unsigned int _Get_bmax () const
 
unsigned int _Get_tmax () const
 
_Builderoperator= (const _Builder &)
 

Static Private Member Functions

static void _Insert_node (_Node_base *, _Node_base *)
 

Private Attributes

_Root_node_Root
 
_Node_base_Current
 
regex_constants::syntax_option_type _Flags
 
const _RxTraits & _Traits
 
const int _Bmax
 
const int _Tmax
 

Member Typedef Documentation

template<class _FwdIt , class _Elem , class _RxTraits >
typedef iterator_traits<_FwdIt>::difference_type _Builder< _FwdIt, _Elem, _RxTraits >::_Difft

Constructor & Destructor Documentation

template<class _FwdIt , class _Elem , class _RxTraits >
_Builder< _FwdIt, _Elem, _RxTraits >::_Builder ( const _RxTraits &  _Tr,
regex_constants::syntax_option_type  _Fx 
)
inline
3609  : _Root(new _Root_node),
3610  _Current(_Root),
3611  _Flags(_Fx),
3612  _Traits(_Tr),
3613  _Bmax(static_cast<int>(_Fx & regex_constants::collate ? 0U : _Bmp_max)),
3614  _Tmax(static_cast<int>(_Fx & regex_constants::collate ? 0U : _ARRAY_THRESHOLD))
3615  { // construct
3616  }
const unsigned int _ARRAY_THRESHOLD
Definition: regex:1505
const int _Tmax
Definition: regex:1978
const int _Bmax
Definition: regex:1977
_Root_node * _Root
Definition: regex:1973
regex_constants::syntax_option_type _Flags
Definition: regex:1975
_Node_base * _Current
Definition: regex:1974
Definition: regex:110
const _RxTraits & _Traits
Definition: regex:1976
const unsigned int _Bmp_max
Definition: regex:1498
Definition: regex:1704

Member Function Documentation

template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_backreference ( unsigned int  _Idx)
inline
4032  { // add back reference node
4033  _Link_node(new _Node_back(_Idx));
4034  }
_Node_base * _Link_node(_Node_base *)
Definition: regex:3673
Definition: regex:1766
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_bol ( )
inline
3721  { // add bol node
3722  _New_node(_N_bol);
3723  }
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3703
Definition: regex:1535
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_char ( _Elem  _Ch)
inline
3761  { // append character
3762  if (_Current->_Kind != _N_str || _Current->_Flags & _Fl_final)
3763  _Add_str_node();
3765  _Ch = _Traits.translate_nocase(_Ch);
3766  else if (_Flags & regex_constants::collate)
3767  _Ch = _Traits.translate(_Ch);
3769  _Node->_Data._Insert(_Ch);
3770  }
Definition: regex:1539
_Buf< _Elem > _Data
Definition: regex:1789
Definition: regex:1780
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
Definition: regex:1512
void _Add_str_node()
Definition: regex:3752
Definition: regex:107
_Node_flags _Flags
Definition: regex:1681
_Node_type _Kind
Definition: regex:1680
regex_constants::syntax_option_type _Flags
Definition: regex:1975
_Node_base * _Current
Definition: regex:1974
Definition: regex:110
const _RxTraits & _Traits
Definition: regex:1976
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_char_to_array ( _Elem  _Ch)
inlineprivate
3799  { // append character to character array
3801  _Ch = _Traits.translate_nocase(_Ch);
3804  if (!_Node->_Large)
3805  _Node->_Large = new _Buf<_Elem>;
3806  _Node->_Large->_Insert(_Ch);
3807  }
Definition: regex:1795
Definition: regex:1559
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
Definition: regex:107
regex_constants::syntax_option_type _Flags
Definition: regex:1975
_Node_base * _Current
Definition: regex:1974
_Buf< _Elem > * _Large
Definition: regex:1826
const _RxTraits & _Traits
Definition: regex:1976
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_char_to_bitmap ( _Elem  _Ch)
inlineprivate
3784  { // add character to accelerator table
3786  _Ch = _Traits.translate_nocase(_Ch);
3789 
3790  if (!_Node->_Small)
3791  _Node->_Small = new _Bitmap;
3792  _Node->_Small->_Mark(static_cast<typename _RxTraits::_Uelem>(_Ch));
3793  }
Definition: regex:1795
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
void _Mark(_Elem _Ch)
Definition: regex:1638
_Bitmap * _Small
Definition: regex:1825
Definition: regex:107
Definition: regex:1630
regex_constants::syntax_option_type _Flags
Definition: regex:1975
_Node_base * _Current
Definition: regex:1974
const _RxTraits & _Traits
Definition: regex:1976
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_char_to_class ( _Elem  _Ch)
inline
3813  { // add character to bracket expression
3814  if (static_cast<typename _RxTraits::_Uelem>(_Ch) < _Bmp_max)
3816  else
3818  }
void _Add_char_to_bitmap(_Elem _Ch)
Definition: regex:3783
void _Add_char_to_array(_Elem _Ch)
Definition: regex:3798
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
const unsigned int _Bmp_max
Definition: regex:1498
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_class ( )
inline
3776  { // add bracket expression node
3778  }
Definition: regex:1795
_Node_base * _Link_node(_Node_base *)
Definition: regex:3673
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_coll ( _FwdIt  _First,
_FwdIt  _Last,
_Difft  _Diff 
)
inline
3956  { // add collation element to bracket expression
3959  _Sequence<_Elem> **_Cur = &_Node->_Coll;
3960  _Char_to_elts(_First, _Last, _Diff, _Cur);
3961  }
Definition: regex:1795
_Sequence< _Elem > * _Coll
Definition: regex:1824
Definition: regex:1659
_Node_base * _Current
Definition: regex:1974
void _Char_to_elts(_FwdIt, _FwdIt, _Difft, _Sequence< _Elem > **)
Definition: regex:3893
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_dot ( )
inline
3745  { // add dot node
3746  _New_node(_N_dot);
3747  }
Definition: regex:1538
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3703
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_elts ( _Node_class< _Elem, _RxTraits > *  _Node,
_Regex_traits_base::char_class_type  _Cl,
bool  _Negate 
)
inlineprivate
3862  { // add characters in named class to set
3863  for (unsigned int _Ch = 0; _Ch < _Bmp_max; ++_Ch)
3864  { // add elements or their inverse
3865  bool _Matches = _Traits.isctype(static_cast<_Elem>(_Ch), _Cl);
3866  if (_Matches != _Negate)
3867  { // add contents of named class to accelerator table
3868  if (!_Node->_Small)
3869  _Node->_Small = new _Bitmap;
3870  _Node->_Small->_Mark(_Ch);
3871  }
3872  }
3873  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
void _Mark(_Elem _Ch)
Definition: regex:1638
_Bitmap * _Small
Definition: regex:1825
Definition: regex:1630
void _Negate()
Definition: regex:3629
const _RxTraits & _Traits
Definition: regex:1976
const unsigned int _Bmp_max
Definition: regex:1498
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_eol ( )
inline
3729  { // add eol node
3730  _New_node(_N_eol);
3731  }
Definition: regex:1536
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3703
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_equiv ( _FwdIt  _First,
_FwdIt  _Last,
_Difft  _Diff 
)
inline
3929  { // add elements of equivalence class to bracket expression
3932  typename _RxTraits::string_type _Str =
3933  _Traits.transform_primary(_First, _Last);
3934  for (unsigned int _Ch = 0; _Ch < _Bmp_max; ++_Ch)
3935  { // add elements
3936  _Elem _Ex = (_Elem)_Ch;
3937  if (_Traits.transform_primary(&_Ex, &_Ex + 1) == _Str)
3938  { // insert equivalent character into bitmap
3939  if (!_Node->_Small)
3940  _Node->_Small = new _Bitmap;
3941  _Node->_Small->_Mark(_Ch);
3942  }
3943  }
3944  if (_Bmp_max < static_cast<unsigned int>((numeric_limits<_Elem>::max)()))
3945  { // map range
3946  _Sequence<_Elem> **_Cur = &_Node->_Equiv;
3947  _Char_to_elts(_First, _Last, _Diff, _Cur);
3948  }
3949  }
Definition: regex:1795
_Sequence< _Elem > * _Equiv
Definition: regex:1829
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
void _Mark(_Elem _Ch)
Definition: regex:1638
_Bitmap * _Small
Definition: regex:1825
Definition: regex:1630
Definition: regex:1659
_Node_base * _Current
Definition: regex:1974
const _RxTraits & _Traits
Definition: regex:1976
const unsigned int _Bmp_max
Definition: regex:1498
void _Char_to_elts(_FwdIt, _FwdIt, _Difft, _Sequence< _Elem > **)
Definition: regex:3893
_FwdIt _Last
Definition: algorithm:1936
Definition: limits:102
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_named_class ( _Regex_traits_base::char_class_type  _Cl,
bool  _Negate = false 
)
inline
3881  { // add contents of named class to bracket expression
3884  _Add_elts(_Node, _Cl, _Negate);
3885  if (_Bmp_max < static_cast<unsigned int>((numeric_limits<_Elem>::max)()))
3886  _Node->_Classes =
3888  }
Definition: regex:1795
ctype_base::mask char_class_type
Definition: regex:255
void _Negate()
Definition: regex:3629
_RxTraits::char_class_type _Classes
Definition: regex:1828
void _Add_elts(_Node_class< _Elem, _RxTraits > *, _Regex_traits_base::char_class_type, bool)
Definition: regex:3858
_Node_base * _Current
Definition: regex:1974
const unsigned int _Bmp_max
Definition: regex:1498
Definition: limits:102
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_nop ( )
inline
3713  { // add nop node
3714  _New_node(_N_nop);
3715  }
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3703
Definition: regex:1534
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_range ( _Elem  _E0,
_Elem  _E1 
)
inline
3825  { // add character range to set
3826  unsigned int _E0 = (typename _RxTraits::_Uelem)_E0x;
3827  unsigned int _E1 = (typename _RxTraits::_Uelem)_E1x;
3829  { // change to lowercase range
3830  _E0 = _Traits.translate_nocase((_Elem)_E0);
3831  _E1 = _Traits.translate_nocase((_Elem)_E1);
3832  }
3835  for (; _E0 <= _E1 && _E1 < _Get_bmax(); ++_E0)
3836  { // set a bit
3837  if (!_Node->_Small)
3838  _Node->_Small = new _Bitmap;
3839  _Node->_Small->_Mark(_E0);
3840  }
3841  if (_E1 < _E0)
3842  ;
3843  else if (_E1 - _E0 < _Get_tmax())
3844  for (; _E0 <= _E1; ++_E0)
3845  _Add_char_to_array((_Elem)_E0);
3846  else
3847  { // store remaining range as pair
3848  if (!_Node->_Ranges)
3849  _Node->_Ranges = new _Buf<_Elem>;
3850  _Node->_Ranges->_Insert((_Elem)_E0);
3851  _Node->_Ranges->_Insert((_Elem)_E1);
3852  }
3853  }
Definition: regex:1795
Definition: regex:1559
void _Add_char_to_array(_Elem _Ch)
Definition: regex:3798
_Buf< _Elem > * _Ranges
Definition: regex:1827
void _Mark(_Elem _Ch)
Definition: regex:1638
_Bitmap * _Small
Definition: regex:1825
Definition: regex:107
Definition: regex:1630
unsigned int _Get_tmax() const
Definition: regex:3919
unsigned int _Get_bmax() const
Definition: regex:3911
regex_constants::syntax_option_type _Flags
Definition: regex:1975
_Node_base * _Current
Definition: regex:1974
const _RxTraits & _Traits
Definition: regex:1976
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_rep ( int  _Min,
int  _Max,
bool  _Greedy 
)
inline
4078  { // add repeat node
4079  if (_Current->_Kind == _N_str
4080  && ((_Node_str<_Elem> *)_Current)->_Data._Size() != 1)
4081  { // move final character to new string node
4083  _Add_char(_Node->_Data._Del());
4084  }
4085 
4086  _Node_base *_Pos = _Current;
4087  if (_Pos->_Kind == _N_end_group
4088  || _Pos->_Kind == _N_end_capture)
4089  _Pos = ((_Node_end_group *)_Pos)->_Back;
4090 
4091  if (_Min == 0 && _Max == 1)
4092  { // rewrite zero-or-one quantifiers as alternations to make the
4093  // "simple loop" optimization more likely to engage
4094  _Node_endif *_End = new _Node_endif;
4095  _Node_if *_If_expr = new _Node_if(_End);
4096  _Node_if *_If_empty_str = new _Node_if(_End);
4097  _Node_base *_Gbegin = new _Node_base(_N_group);
4098  _Node_end_group *_Gend = new _Node_end_group(_N_end_group, _Fl_none, _Gbegin);
4099 
4100  _If_empty_str->_Next = _Gbegin;
4101  _Gbegin->_Prev = _If_empty_str;
4102 
4103  _Gbegin->_Next = _Gend;
4104  _Gend->_Prev = _Gbegin;
4105 
4106  _Gend->_Next = _End;
4107 
4108  _If_expr->_Child = _If_empty_str;
4109 
4110  _Link_node(_End);
4111  _Insert_node(_Pos, _If_expr);
4112 
4113  if (!_Greedy)
4114  {
4115  _Swap_adl(_If_expr->_Next->_Prev, _If_empty_str->_Next->_Prev);
4116  _Swap_adl(_If_expr->_Next, _If_empty_str->_Next);
4117  }
4118  }
4119  else
4120  {
4121  _Node_end_rep *_Node0 = new _Node_end_rep();
4122  _Node_rep *_Nx =
4123  new _Node_rep(_Greedy, _Min, _Max, _Node0, _Root->_Loops++);
4124  _Node0->_Begin_rep = _Nx;
4125  _Link_node(_Node0);
4126  _Insert_node(_Pos, _Nx);
4127  }
4128  }
Definition: regex:1509
static void _Insert_node(_Node_base *, _Node_base *)
Definition: regex:3690
Definition: regex:1539
_Node_base * _Next
Definition: regex:1682
_Buf< _Elem > _Data
Definition: regex:1789
Definition: regex:1780
Definition: regex:1541
Definition: regex:1844
_Root_node * _Root
Definition: regex:1973
_Node_rep * _Begin_rep
Definition: regex:1882
Definition: regex:1542
_Node_base * _Prev
Definition: regex:1683
_Node_base * _Link_node(_Node_base *)
Definition: regex:3673
void _Add_char(_Elem _Ch)
Definition: regex:3760
Definition: regex:1833
Definition: regex:1722
void _Swap_adl(_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:73
_Node_type _Kind
Definition: regex:1680
unsigned int _Loops
Definition: regex:1716
Definition: regex:1547
_Node_if * _Child
Definition: regex:1866
Definition: regex:1872
_Node_base * _Current
Definition: regex:1974
Definition: regex:1896
Definition: regex:1672
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_str_node ( )
inlineprivate
3753  { // add string node
3755  }
Definition: regex:1780
_Node_base * _Link_node(_Node_base *)
Definition: regex:3673
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_wbound ( )
inline
3737  { // add wbound node
3739  }
Definition: regex:1537
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3703
template<class _FwdIt , class _Elem , class _RxTraits >
bool _Builder< _FwdIt, _Elem, _RxTraits >::_Beg_expr ( ) const
inline
3665  { // test for beginning of expression or subexpression
3666  return (_Beg_expr(_Current)
3667  || (_Current->_Kind == _N_bol && _Beg_expr(_Current->_Prev)));
3668  }
bool _Beg_expr() const
Definition: regex:3664
_Node_base * _Prev
Definition: regex:1683
_Node_type _Kind
Definition: regex:1680
_Node_base * _Current
Definition: regex:1974
Definition: regex:1535
template<class _FwdIt , class _Elem , class _RxTraits >
bool _Builder< _FwdIt, _Elem, _RxTraits >::_Beg_expr ( _Node_base _Nx) const
inlineprivate
3655  { // test for beginning of expression or subexpression
3656  return (_Nx->_Kind == _N_begin
3657  || _Nx->_Kind == _N_group
3658  || _Nx->_Kind == _N_capture);
3659  }
Definition: regex:1541
Definition: regex:1553
_Node_type _Kind
Definition: regex:1680
Definition: regex:1546
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Begin_assert_group ( bool  _Neg)
inline
3989  { // add assert node
3990  _Node_assert *_Node1 = new _Node_assert(_Neg
3991  ? _N_neg_assert : _N_assert);
3992 
3993  _Node_base *_Node2;
3994  _TRY_BEGIN
3995  _Node2 = new _Node_base(_N_nop);
3996  _CATCH_ALL
3997  delete _Node1;
3998  _RERAISE;
3999  _CATCH_END
4000 
4001  _Link_node(_Node1);
4002  _Node1->_Child = _Node2;
4003  _Node2->_Prev = _Node1;
4004  _Current = _Node2;
4005  return (_Node1);
4006  }
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
Definition: regex:1544
Definition: regex:1543
_Node_base * _Link_node(_Node_base *)
Definition: regex:3673
#define _CATCH_ALL
Definition: xstddef:28
_Node_base * _Current
Definition: regex:1974
#define _RERAISE
Definition: xstddef:32
Definition: regex:1534
Definition: regex:1735
Definition: regex:1672
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Begin_capture_group ( unsigned int  _Idx)
inline
4023  { // add capture group node
4024  return (_Link_node(new _Node_capture(_Idx)));
4025  }
Definition: regex:1753
_Node_base * _Link_node(_Node_base *)
Definition: regex:3673
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Begin_group ( )
inline
3967  { // add group node
3968  return (_New_node(_N_group));
3969  }
Definition: regex:1541
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3703
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Begin_if ( _Node_base _Start)
inline
4041  { // add if node
4042  /* append endif node */
4043  _Node_base *_Res = new _Node_endif;
4044  _Link_node(_Res);
4045 
4046  /* insert if_node */
4047  _Node_if *_Node1 = new _Node_if(_Res);
4048  _Node_base *_Pos = _Start->_Next;
4049  _Insert_node(_Pos, _Node1);
4050  return (_Res);
4051  }
static void _Insert_node(_Node_base *, _Node_base *)
Definition: regex:3690
_Node_base * _Next
Definition: regex:1682
Definition: regex:1844
_Node_base * _Link_node(_Node_base *)
Definition: regex:3673
Definition: regex:1833
Definition: regex:1672
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Char_to_elts ( _FwdIt  _First,
_FwdIt  _Last,
_Difft  _Diff,
_Sequence< _Elem > **  _Cur 
)
inlineprivate
3896  { // add collation element to element sequence
3897  while (*_Cur && (unsigned int)_Diff < (*_Cur)->_Sz)
3898  _Cur = &(*_Cur)->_Next;
3899  if (!(*_Cur) || (unsigned int)_Diff != (*_Cur)->_Sz)
3900  { // add new sequence holding elements of the same length
3901  _Sequence<_Elem> *_Node = *_Cur;
3902  *_Cur = new _Sequence<_Elem>((unsigned int)_Diff);
3903  (*_Cur)->_Next = _Node;
3904  }
3905  (*_Cur)->_Data._Insert(_First, _Last);
3906  }
_Sequence * _Next
Definition: regex:1668
char int *typedef int(__CRTDECL *_CRT_REPORT_HOOKW)(int
Definition: crtdbg.h:45
Definition: regex:1659
unsigned int _Sz
Definition: regex:1666
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Discard_pattern ( )
inline
4143  { // free memory
4145  _Root = 0;
4146  }
void _Destroy_node(_Node_base *_Nx, _Node_base *_Ne=0)
Definition: regex:1691
_Root_node * _Root
Definition: regex:1973
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Else_if ( _Node_base _Start,
_Node_base _End 
)
inline
4058  { // add else node
4059  _Node_if *_Parent = (_Node_if *)_Start->_Next;
4060  _Node_base *_First = _End->_Next;
4061  _End->_Next = 0;
4063  _Current = _End;
4064  _End->_Next = 0;
4065  _Last->_Next = _End;
4066  while (_Parent->_Child)
4067  _Parent = _Parent->_Child;
4068  _Parent->_Child = new _Node_if(_End);
4069  _Parent->_Child->_Next = _First;
4070  _First->_Prev = _Parent->_Child;
4071  }
_Node_base * _Next
Definition: regex:1682
Definition: regex:1844
while(_First< _Pfirst &&!_STLCLRDB_LT(*(_Pfirst-1),*_Pfirst)&&!(*_Pfirst< *(_Pfirst-1)))--_Pfirst
_Node_base * _Prev
Definition: regex:1683
_Node_if * _Child
Definition: regex:1866
_Node_base * _Current
Definition: regex:1974
_FwdIt _Last
Definition: algorithm:1936
Definition: regex:1672
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_End_assert_group ( _Node_base _Nx)
inline
4013  { // add end of assert node
4014  _End_group(_Nx);
4015  _Current = _Nx;
4016  }
void _End_group(_Node_base *_Back)
Definition: regex:3974
_Node_base * _Current
Definition: regex:1974
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_End_group ( _Node_base _Back)
inline
3976  { // add end of group node
3977  _Node_type _Elt = _Back->_Kind == _N_group ? _N_end_group
3978  : _Back->_Kind == _N_assert ? _N_end_assert
3979  : _Back->_Kind == _N_neg_assert ? _N_end_assert
3980  : _N_end_capture;
3981  _Link_node(new _Node_end_group(_Elt, _Fl_none, _Back));
3982  }
Definition: regex:1509
_Node_type
Definition: regex:1531
Definition: regex:1545
Definition: regex:1541
Definition: regex:1544
Definition: regex:1543
Definition: regex:1542
_Node_base * _Link_node(_Node_base *)
Definition: regex:3673
Definition: regex:1722
_Node_type _Kind
Definition: regex:1680
Definition: regex:1547
template<class _FwdIt , class _Elem , class _RxTraits >
_Root_node * _Builder< _FwdIt, _Elem, _RxTraits >::_End_pattern ( )
inline
4134  { // wrap up
4135  _New_node(_N_end);
4136  return (_Root);
4137  }
_Root_node * _Root
Definition: regex:1973
Definition: regex:1554
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3703
template<class _FwdIt , class _Elem , class _RxTraits >
unsigned int _Builder< _FwdIt, _Elem, _RxTraits >::_Get_bmax ( ) const
inlineprivate
3912  {
3913  return (static_cast<unsigned int>(_Bmax));
3914  }
const int _Bmax
Definition: regex:1977
template<class _FwdIt , class _Elem , class _RxTraits >
unsigned int _Builder< _FwdIt, _Elem, _RxTraits >::_Get_tmax ( ) const
inlineprivate
3920  {
3921  return (static_cast<unsigned int>(_Tmax));
3922  }
const int _Tmax
Definition: regex:1978
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Getmark ( ) const
inline
3646  { // return current node
3647  return (_Current);
3648  }
_Node_base * _Current
Definition: regex:1974
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Insert_node ( _Node_base _Insert_before,
_Node_base _To_insert 
)
inlinestaticprivate
3693  { // insert _To_insert into the graph before the node _Insert_before
3694  _Insert_before->_Prev->_Next = _To_insert;
3695  _To_insert->_Prev = _Insert_before->_Prev;
3696  _Insert_before->_Prev = _To_insert;
3697  _To_insert->_Next = _Insert_before;
3698  }
_Node_base * _Next
Definition: regex:1682
_Node_base * _Prev
Definition: regex:1683
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Link_node ( _Node_base _Nx)
inlineprivate
3675  { // insert _Nx at current location
3676  _Nx->_Prev = _Current;
3677  if (_Current->_Next)
3678  { // set back pointer
3679  _Nx->_Next = _Current->_Next;
3680  _Current->_Next->_Prev = _Nx;
3681  }
3682  _Current->_Next = _Nx;
3683  _Current = _Nx;
3684  return (_Nx);
3685  }
_Node_base * _Next
Definition: regex:1682
_Node_base * _Prev
Definition: regex:1683
_Node_base * _Current
Definition: regex:1974
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Mark_final ( )
inline
3638  { // set flag
3640  }
Definition: regex:1512
_Node_flags _Flags
Definition: regex:1681
_Node_base * _Current
Definition: regex:1974
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Negate ( )
inline
3630  { // set flag
3632  }
Definition: regex:1510
_Node_flags _Flags
Definition: regex:1681
_Node_base * _Current
Definition: regex:1974
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_New_node ( _Node_type  _Kind)
inlineprivate
3705  { // allocate and link simple node
3706  return (_Link_node(new _Node_base(_Kind)));
3707  }
_Node_base * _Link_node(_Node_base *)
Definition: regex:3673
Definition: regex:1672
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Setlong ( )
inline
3622  { // set flag
3623  _Root->_Flags |= _Fl_longest;
3624  }
Definition: regex:1513
_Root_node * _Root
Definition: regex:1973
_Node_flags _Flags
Definition: regex:1681
template<class _FwdIt , class _Elem , class _RxTraits >
_Builder& _Builder< _FwdIt, _Elem, _RxTraits >::operator= ( const _Builder< _FwdIt, _Elem, _RxTraits > &  )
private

Member Data Documentation

template<class _FwdIt , class _Elem , class _RxTraits >
const int _Builder< _FwdIt, _Elem, _RxTraits >::_Bmax
private
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base* _Builder< _FwdIt, _Elem, _RxTraits >::_Current
private
template<class _FwdIt , class _Elem , class _RxTraits >
regex_constants::syntax_option_type _Builder< _FwdIt, _Elem, _RxTraits >::_Flags
private
template<class _FwdIt , class _Elem , class _RxTraits >
_Root_node* _Builder< _FwdIt, _Elem, _RxTraits >::_Root
private
template<class _FwdIt , class _Elem , class _RxTraits >
const int _Builder< _FwdIt, _Elem, _RxTraits >::_Tmax
private
template<class _FwdIt , class _Elem , class _RxTraits >
const _RxTraits& _Builder< _FwdIt, _Elem, _RxTraits >::_Traits
private

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