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
3593  : _Root(new _Root_node),
3594  _Current(_Root),
3595  _Flags(_Fx),
3596  _Traits(_Tr),
3597  _Bmax(static_cast<int>(_Fx & regex_constants::collate ? 0U : _Bmp_max)),
3598  _Tmax(static_cast<int>(_Fx & regex_constants::collate ? 0U : _ARRAY_THRESHOLD))
3599  { // construct
3600  }
const unsigned int _ARRAY_THRESHOLD
Definition: regex:1485
const int _Tmax
Definition: regex:1957
const int _Bmax
Definition: regex:1956
_Root_node * _Root
Definition: regex:1952
regex_constants::syntax_option_type _Flags
Definition: regex:1954
_Node_base * _Current
Definition: regex:1953
Definition: regex:111
const _RxTraits & _Traits
Definition: regex:1955
const unsigned int _Bmp_max
Definition: regex:1478
Definition: regex:1683

Member Function Documentation

template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_backreference ( unsigned int  _Idx)
inline
4016  { // add back reference node
4017  _Link_node(new _Node_back(_Idx));
4018  }
_Node_base * _Link_node(_Node_base *)
Definition: regex:3657
Definition: regex:1745
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_bol ( )
inline
3705  { // add bol node
3706  _New_node(_N_bol);
3707  }
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3687
Definition: regex:1515
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_char ( _Elem  _Ch)
inline
3745  { // append character
3746  if (_Current->_Kind != _N_str || _Current->_Flags & _Fl_final)
3747  _Add_str_node();
3749  _Ch = _Traits.translate_nocase(_Ch);
3750  else if (_Flags & regex_constants::collate)
3751  _Ch = _Traits.translate(_Ch);
3753  _Node->_Data._Insert(_Ch);
3754  }
Definition: regex:1519
_Buf< _Elem > _Data
Definition: regex:1768
Definition: regex:1759
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
Definition: regex:1492
void _Add_str_node()
Definition: regex:3736
Definition: regex:108
_Node_flags _Flags
Definition: regex:1660
_Node_type _Kind
Definition: regex:1659
regex_constants::syntax_option_type _Flags
Definition: regex:1954
_Node_base * _Current
Definition: regex:1953
Definition: regex:111
const _RxTraits & _Traits
Definition: regex:1955
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_char_to_array ( _Elem  _Ch)
inlineprivate
3783  { // append character to character array
3785  _Ch = _Traits.translate_nocase(_Ch);
3788  if (!_Node->_Large)
3789  _Node->_Large = new _Buf<_Elem>;
3790  _Node->_Large->_Insert(_Ch);
3791  }
Definition: regex:1774
Definition: regex:1539
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
Definition: regex:108
regex_constants::syntax_option_type _Flags
Definition: regex:1954
_Node_base * _Current
Definition: regex:1953
_Buf< _Elem > * _Large
Definition: regex:1805
const _RxTraits & _Traits
Definition: regex:1955
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_char_to_bitmap ( _Elem  _Ch)
inlineprivate
3768  { // add character to accelerator table
3770  _Ch = _Traits.translate_nocase(_Ch);
3773 
3774  if (!_Node->_Small)
3775  _Node->_Small = new _Bitmap;
3776  _Node->_Small->_Mark(static_cast<typename _RxTraits::_Uelem>(_Ch));
3777  }
Definition: regex:1774
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
void _Mark(_Elem _Ch)
Definition: regex:1617
_Bitmap * _Small
Definition: regex:1804
Definition: regex:108
Definition: regex:1609
regex_constants::syntax_option_type _Flags
Definition: regex:1954
_Node_base * _Current
Definition: regex:1953
const _RxTraits & _Traits
Definition: regex:1955
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_char_to_class ( _Elem  _Ch)
inline
3797  { // add character to bracket expression
3798  if (static_cast<typename _RxTraits::_Uelem>(_Ch) < _Bmp_max)
3800  else
3802  }
void _Add_char_to_bitmap(_Elem _Ch)
Definition: regex:3767
void _Add_char_to_array(_Elem _Ch)
Definition: regex:3782
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
const unsigned int _Bmp_max
Definition: regex:1478
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_class ( )
inline
3760  { // add bracket expression node
3762  }
Definition: regex:1774
_Node_base * _Link_node(_Node_base *)
Definition: regex:3657
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_coll ( _FwdIt  _First,
_FwdIt  _Last,
_Difft  _Diff 
)
inline
3940  { // add collation element to bracket expression
3943  _Sequence<_Elem> **_Cur = &_Node->_Coll;
3944  _Char_to_elts(_First, _Last, _Diff, _Cur);
3945  }
Definition: regex:1774
_Sequence< _Elem > * _Coll
Definition: regex:1803
Definition: regex:1638
_Node_base * _Current
Definition: regex:1953
void _Char_to_elts(_FwdIt, _FwdIt, _Difft, _Sequence< _Elem > **)
Definition: regex:3877
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_dot ( )
inline
3729  { // add dot node
3730  _New_node(_N_dot);
3731  }
Definition: regex:1518
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3687
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
3846  { // add characters in named class to set
3847  for (unsigned int _Ch = 0; _Ch < _Bmp_max; ++_Ch)
3848  { // add elements or their inverse
3849  bool _Matches = _Traits.isctype(static_cast<_Elem>(_Ch), _Cl);
3850  if (_Matches != _Negate)
3851  { // add contents of named class to accelerator table
3852  if (!_Node->_Small)
3853  _Node->_Small = new _Bitmap;
3854  _Node->_Small->_Mark(_Ch);
3855  }
3856  }
3857  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
void _Mark(_Elem _Ch)
Definition: regex:1617
_Bitmap * _Small
Definition: regex:1804
Definition: regex:1609
void _Negate()
Definition: regex:3613
const _RxTraits & _Traits
Definition: regex:1955
const unsigned int _Bmp_max
Definition: regex:1478
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_eol ( )
inline
3713  { // add eol node
3714  _New_node(_N_eol);
3715  }
Definition: regex:1516
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3687
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_equiv ( _FwdIt  _First,
_FwdIt  _Last,
_Difft  _Diff 
)
inline
3913  { // add elements of equivalence class to bracket expression
3916  typename _RxTraits::string_type _Str =
3917  _Traits.transform_primary(_First, _Last);
3918  for (unsigned int _Ch = 0; _Ch < _Bmp_max; ++_Ch)
3919  { // add elements
3920  _Elem _Ex = (_Elem)_Ch;
3921  if (_Traits.transform_primary(&_Ex, &_Ex + 1) == _Str)
3922  { // insert equivalent character into bitmap
3923  if (!_Node->_Small)
3924  _Node->_Small = new _Bitmap;
3925  _Node->_Small->_Mark(_Ch);
3926  }
3927  }
3928  if (_Bmp_max < static_cast<unsigned int>((numeric_limits<_Elem>::max)()))
3929  { // map range
3930  _Sequence<_Elem> **_Cur = &_Node->_Equiv;
3931  _Char_to_elts(_First, _Last, _Diff, _Cur);
3932  }
3933  }
Definition: regex:1774
_Sequence< _Elem > * _Equiv
Definition: regex:1808
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
void _Mark(_Elem _Ch)
Definition: regex:1617
_Bitmap * _Small
Definition: regex:1804
Definition: regex:1609
Definition: regex:1638
_Node_base * _Current
Definition: regex:1953
const _RxTraits & _Traits
Definition: regex:1955
const unsigned int _Bmp_max
Definition: regex:1478
void _Char_to_elts(_FwdIt, _FwdIt, _Difft, _Sequence< _Elem > **)
Definition: regex:3877
_FwdIt _Last
Definition: algorithm:1936
Definition: limits:101
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
3865  { // add contents of named class to bracket expression
3868  _Add_elts(_Node, _Cl, _Negate);
3869  if (_Bmp_max < static_cast<unsigned int>((numeric_limits<_Elem>::max)()))
3870  _Node->_Classes =
3872  }
Definition: regex:1774
ctype_base::mask char_class_type
Definition: regex:256
void _Negate()
Definition: regex:3613
_RxTraits::char_class_type _Classes
Definition: regex:1807
void _Add_elts(_Node_class< _Elem, _RxTraits > *, _Regex_traits_base::char_class_type, bool)
Definition: regex:3842
_Node_base * _Current
Definition: regex:1953
const unsigned int _Bmp_max
Definition: regex:1478
Definition: limits:101
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_nop ( )
inline
3697  { // add nop node
3698  _New_node(_N_nop);
3699  }
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3687
Definition: regex:1514
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_range ( _Elem  _E0,
_Elem  _E1 
)
inline
3809  { // add character range to set
3810  unsigned int _E0 = (typename _RxTraits::_Uelem)_E0x;
3811  unsigned int _E1 = (typename _RxTraits::_Uelem)_E1x;
3813  { // change to lowercase range
3814  _E0 = _Traits.translate_nocase((_Elem)_E0);
3815  _E1 = _Traits.translate_nocase((_Elem)_E1);
3816  }
3819  for (; _E0 <= _E1 && _E1 < _Get_bmax(); ++_E0)
3820  { // set a bit
3821  if (!_Node->_Small)
3822  _Node->_Small = new _Bitmap;
3823  _Node->_Small->_Mark(_E0);
3824  }
3825  if (_E1 < _E0)
3826  ;
3827  else if (_E1 - _E0 < _Get_tmax())
3828  for (; _E0 <= _E1; ++_E0)
3829  _Add_char_to_array((_Elem)_E0);
3830  else
3831  { // store remaining range as pair
3832  if (!_Node->_Ranges)
3833  _Node->_Ranges = new _Buf<_Elem>;
3834  _Node->_Ranges->_Insert((_Elem)_E0);
3835  _Node->_Ranges->_Insert((_Elem)_E1);
3836  }
3837  }
Definition: regex:1774
Definition: regex:1539
void _Add_char_to_array(_Elem _Ch)
Definition: regex:3782
_Buf< _Elem > * _Ranges
Definition: regex:1806
void _Mark(_Elem _Ch)
Definition: regex:1617
_Bitmap * _Small
Definition: regex:1804
Definition: regex:108
Definition: regex:1609
unsigned int _Get_tmax() const
Definition: regex:3903
unsigned int _Get_bmax() const
Definition: regex:3895
regex_constants::syntax_option_type _Flags
Definition: regex:1954
_Node_base * _Current
Definition: regex:1953
const _RxTraits & _Traits
Definition: regex:1955
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_rep ( int  _Min,
int  _Max,
bool  _Greedy 
)
inline
4062  { // add repeat node
4063  if (_Current->_Kind == _N_str
4064  && ((_Node_str<_Elem> *)_Current)->_Data._Size() != 1)
4065  { // move final character to new string node
4067  _Add_char(_Node->_Data._Del());
4068  }
4069 
4070  _Node_base *_Pos = _Current;
4071  if (_Pos->_Kind == _N_end_group
4072  || _Pos->_Kind == _N_end_capture)
4073  _Pos = ((_Node_end_group *)_Pos)->_Back;
4074 
4075  if (_Min == 0 && _Max == 1)
4076  { // rewrite zero-or-one quantifiers as alternations to make the
4077  // "simple loop" optimization more likely to engage
4078  _Node_endif *_End = new _Node_endif;
4079  _Node_if *_If_expr = new _Node_if(_End);
4080  _Node_if *_If_empty_str = new _Node_if(_End);
4081  _Node_base *_Gbegin = new _Node_base(_N_group);
4082  _Node_end_group *_Gend = new _Node_end_group(_N_end_group, _Fl_none, _Gbegin);
4083 
4084  _If_empty_str->_Next = _Gbegin;
4085  _Gbegin->_Prev = _If_empty_str;
4086 
4087  _Gbegin->_Next = _Gend;
4088  _Gend->_Prev = _Gbegin;
4089 
4090  _Gend->_Next = _End;
4091 
4092  _If_expr->_Child = _If_empty_str;
4093 
4094  _Link_node(_End);
4095  _Insert_node(_Pos, _If_expr);
4096 
4097  if (!_Greedy)
4098  {
4099  _Swap_adl(_If_expr->_Next->_Prev, _If_empty_str->_Next->_Prev);
4100  _Swap_adl(_If_expr->_Next, _If_empty_str->_Next);
4101  }
4102  }
4103  else
4104  {
4105  _Node_end_rep *_Node0 = new _Node_end_rep();
4106  _Node_rep *_Nx =
4107  new _Node_rep(_Greedy, _Min, _Max, _Node0, _Root->_Loops++);
4108  _Node0->_Begin_rep = _Nx;
4109  _Link_node(_Node0);
4110  _Insert_node(_Pos, _Nx);
4111  }
4112  }
Definition: regex:1489
static void _Insert_node(_Node_base *, _Node_base *)
Definition: regex:3674
Definition: regex:1519
_Node_base * _Next
Definition: regex:1661
_Buf< _Elem > _Data
Definition: regex:1768
Definition: regex:1759
Definition: regex:1521
Definition: regex:1823
_Root_node * _Root
Definition: regex:1952
_Node_rep * _Begin_rep
Definition: regex:1861
Definition: regex:1522
_Node_base * _Prev
Definition: regex:1662
_Node_base * _Link_node(_Node_base *)
Definition: regex:3657
void _Add_char(_Elem _Ch)
Definition: regex:3744
Definition: regex:1812
Definition: regex:1701
void _Swap_adl(_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:56
_Node_type _Kind
Definition: regex:1659
unsigned int _Loops
Definition: regex:1695
Definition: regex:1527
_Node_if * _Child
Definition: regex:1845
Definition: regex:1851
_Node_base * _Current
Definition: regex:1953
Definition: regex:1875
Definition: regex:1651
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_str_node ( )
inlineprivate
3737  { // add string node
3739  }
Definition: regex:1759
_Node_base * _Link_node(_Node_base *)
Definition: regex:3657
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Add_wbound ( )
inline
3721  { // add wbound node
3723  }
Definition: regex:1517
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3687
template<class _FwdIt , class _Elem , class _RxTraits >
bool _Builder< _FwdIt, _Elem, _RxTraits >::_Beg_expr ( ) const
inline
3649  { // test for beginning of expression or subexpression
3650  return (_Beg_expr(_Current)
3651  || (_Current->_Kind == _N_bol && _Beg_expr(_Current->_Prev)));
3652  }
bool _Beg_expr() const
Definition: regex:3648
_Node_base * _Prev
Definition: regex:1662
_Node_type _Kind
Definition: regex:1659
_Node_base * _Current
Definition: regex:1953
Definition: regex:1515
template<class _FwdIt , class _Elem , class _RxTraits >
bool _Builder< _FwdIt, _Elem, _RxTraits >::_Beg_expr ( _Node_base _Nx) const
inlineprivate
3639  { // test for beginning of expression or subexpression
3640  return (_Nx->_Kind == _N_begin
3641  || _Nx->_Kind == _N_group
3642  || _Nx->_Kind == _N_capture);
3643  }
Definition: regex:1521
Definition: regex:1533
_Node_type _Kind
Definition: regex:1659
Definition: regex:1526
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Begin_assert_group ( bool  _Neg)
inline
3973  { // add assert node
3974  _Node_assert *_Node1 = new _Node_assert(_Neg
3975  ? _N_neg_assert : _N_assert);
3976 
3977  _Node_base *_Node2;
3978  _TRY_BEGIN
3979  _Node2 = new _Node_base(_N_nop);
3980  _CATCH_ALL
3981  delete _Node1;
3982  _RERAISE;
3983  _CATCH_END
3984 
3985  _Link_node(_Node1);
3986  _Node1->_Child = _Node2;
3987  _Node2->_Prev = _Node1;
3988  _Current = _Node2;
3989  return (_Node1);
3990  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
Definition: regex:1524
Definition: regex:1523
_Node_base * _Link_node(_Node_base *)
Definition: regex:3657
#define _CATCH_ALL
Definition: xstddef:62
_Node_base * _Current
Definition: regex:1953
#define _RERAISE
Definition: xstddef:74
Definition: regex:1514
Definition: regex:1714
Definition: regex:1651
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Begin_capture_group ( unsigned int  _Idx)
inline
4007  { // add capture group node
4008  return (_Link_node(new _Node_capture(_Idx)));
4009  }
Definition: regex:1732
_Node_base * _Link_node(_Node_base *)
Definition: regex:3657
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Begin_group ( void  )
inline
3951  { // add group node
3952  return (_New_node(_N_group));
3953  }
Definition: regex:1521
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3687
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Begin_if ( _Node_base _Start)
inline
4025  { // add if node
4026  /* append endif node */
4027  _Node_base *_Res = new _Node_endif;
4028  _Link_node(_Res);
4029 
4030  /* insert if_node */
4031  _Node_if *_Node1 = new _Node_if(_Res);
4032  _Node_base *_Pos = _Start->_Next;
4033  _Insert_node(_Pos, _Node1);
4034  return (_Res);
4035  }
static void _Insert_node(_Node_base *, _Node_base *)
Definition: regex:3674
_Node_base * _Next
Definition: regex:1661
Definition: regex:1823
_Node_base * _Link_node(_Node_base *)
Definition: regex:3657
Definition: regex:1812
Definition: regex:1651
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
3880  { // add collation element to element sequence
3881  while (*_Cur && (unsigned int)_Diff < (*_Cur)->_Sz)
3882  _Cur = &(*_Cur)->_Next;
3883  if (!(*_Cur) || (unsigned int)_Diff != (*_Cur)->_Sz)
3884  { // add new sequence holding elements of the same length
3885  _Sequence<_Elem> *_Node = *_Cur;
3886  *_Cur = new _Sequence<_Elem>((unsigned int)_Diff);
3887  (*_Cur)->_Next = _Node;
3888  }
3889  (*_Cur)->_Data._Insert(_First, _Last);
3890  }
unsigned int
Definition: vccorlib.h:2468
_Sequence * _Next
Definition: regex:1647
Definition: regex:1638
unsigned int _Sz
Definition: regex:1645
_FwdIt _Last
Definition: algorithm:1936
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Discard_pattern ( )
inline
4127  { // free memory
4129  _Root = 0;
4130  }
void _Destroy_node(_Node_base *_Nx, _Node_base *_Ne=0)
Definition: regex:1670
_Root_node * _Root
Definition: regex:1952
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Else_if ( _Node_base _Start,
_Node_base _End 
)
inline
4042  { // add else node
4043  _Node_if *_Parent = (_Node_if *)_Start->_Next;
4044  _Node_base *_First = _End->_Next;
4045  _End->_Next = 0;
4047  _Current = _End;
4048  _End->_Next = 0;
4049  _Last->_Next = _End;
4050  while (_Parent->_Child)
4051  _Parent = _Parent->_Child;
4052  _Parent->_Child = new _Node_if(_End);
4053  _Parent->_Child->_Next = _First;
4054  _First->_Prev = _Parent->_Child;
4055  }
_Node_base * _Next
Definition: regex:1661
Definition: regex:1823
while(_First< _Pfirst &&!_STLCLRDB_LT(*(_Pfirst-1),*_Pfirst)&&!(*_Pfirst< *(_Pfirst-1)))--_Pfirst
_Node_base * _Prev
Definition: regex:1662
_Node_if * _Child
Definition: regex:1845
_Node_base * _Current
Definition: regex:1953
_FwdIt _Last
Definition: algorithm:1936
Definition: regex:1651
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_End_assert_group ( _Node_base _Nx)
inline
3997  { // add end of assert node
3998  _End_group(_Nx);
3999  _Current = _Nx;
4000  }
void _End_group(_Node_base *_Back)
Definition: regex:3958
_Node_base * _Current
Definition: regex:1953
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_End_group ( _Node_base _Back)
inline
3960  { // add end of group node
3961  _Node_type _Elt = _Back->_Kind == _N_group ? _N_end_group
3962  : _Back->_Kind == _N_assert ? _N_end_assert
3963  : _Back->_Kind == _N_neg_assert ? _N_end_assert
3964  : _N_end_capture;
3965  _Link_node(new _Node_end_group(_Elt, _Fl_none, _Back));
3966  }
Definition: regex:1489
_Node_type
Definition: regex:1511
Definition: regex:1525
Definition: regex:1521
Definition: regex:1524
Definition: regex:1523
Definition: regex:1522
_Node_base * _Link_node(_Node_base *)
Definition: regex:3657
Definition: regex:1701
_Node_type _Kind
Definition: regex:1659
Definition: regex:1527
template<class _FwdIt , class _Elem , class _RxTraits >
_Root_node * _Builder< _FwdIt, _Elem, _RxTraits >::_End_pattern ( void  )
inline
4118  { // wrap up
4119  _New_node(_N_end);
4120  return (_Root);
4121  }
_Root_node * _Root
Definition: regex:1952
Definition: regex:1534
_Node_base * _New_node(_Node_type _Kind)
Definition: regex:3687
template<class _FwdIt , class _Elem , class _RxTraits >
unsigned int _Builder< _FwdIt, _Elem, _RxTraits >::_Get_bmax ( ) const
inlineprivate
3896  {
3897  return (static_cast<unsigned int>(_Bmax));
3898  }
const int _Bmax
Definition: regex:1956
template<class _FwdIt , class _Elem , class _RxTraits >
unsigned int _Builder< _FwdIt, _Elem, _RxTraits >::_Get_tmax ( ) const
inlineprivate
3904  {
3905  return (static_cast<unsigned int>(_Tmax));
3906  }
const int _Tmax
Definition: regex:1957
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Getmark ( ) const
inline
3630  { // return current node
3631  return (_Current);
3632  }
_Node_base * _Current
Definition: regex:1953
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Insert_node ( _Node_base _Insert_before,
_Node_base _To_insert 
)
inlinestaticprivate
3677  { // insert _To_insert into the graph before the node _Insert_before
3678  _Insert_before->_Prev->_Next = _To_insert;
3679  _To_insert->_Prev = _Insert_before->_Prev;
3680  _Insert_before->_Prev = _To_insert;
3681  _To_insert->_Next = _Insert_before;
3682  }
_Node_base * _Next
Definition: regex:1661
_Node_base * _Prev
Definition: regex:1662
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_Link_node ( _Node_base _Nx)
inlineprivate
3659  { // insert _Nx at current location
3660  _Nx->_Prev = _Current;
3661  if (_Current->_Next)
3662  { // set back pointer
3663  _Nx->_Next = _Current->_Next;
3664  _Current->_Next->_Prev = _Nx;
3665  }
3666  _Current->_Next = _Nx;
3667  _Current = _Nx;
3668  return (_Nx);
3669  }
_Node_base * _Next
Definition: regex:1661
_Node_base * _Prev
Definition: regex:1662
_Node_base * _Current
Definition: regex:1953
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Mark_final ( )
inline
3622  { // set flag
3624  }
Definition: regex:1492
_Node_flags _Flags
Definition: regex:1660
_Node_base * _Current
Definition: regex:1953
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Negate ( )
inline
3614  { // set flag
3616  }
Definition: regex:1490
_Node_flags _Flags
Definition: regex:1660
_Node_base * _Current
Definition: regex:1953
template<class _FwdIt , class _Elem , class _RxTraits >
_Node_base * _Builder< _FwdIt, _Elem, _RxTraits >::_New_node ( _Node_type  _Kind)
inlineprivate
3689  { // allocate and link simple node
3690  return (_Link_node(new _Node_base(_Kind)));
3691  }
_Node_base * _Link_node(_Node_base *)
Definition: regex:3657
Definition: regex:1651
template<class _FwdIt , class _Elem , class _RxTraits >
void _Builder< _FwdIt, _Elem, _RxTraits >::_Setlong ( )
inline
3606  { // set flag
3607  _Root->_Flags |= _Fl_longest;
3608  }
Definition: regex:1493
_Root_node * _Root
Definition: regex:1952
_Node_flags _Flags
Definition: regex:1660
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: