Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template regex_token_iterator

boost::xpressive::regex_token_iterator

Synopsis

// In header: <boost/xpressive/regex_token_iterator.hpp>

template<typename BidiIter> 
struct regex_token_iterator {
  // types
  typedef basic_regex<           ;       
  typedef  ;        
  typedef sub_match<             ;       
  typedef                    ;  
  typedef                ;          
  typedef                ;        
  typedef         ;

  // public member functions
  ();
  (, , basic_regex< );
  template<typename LetExpr> 
    (, , basic_regex< , 
                         );
  template<typename Subs> 
    (, , basic_regex< , 
                         ,  = );
  template<typename Subs, typename LetExpr> 
    (, , basic_regex< , 
                         , , 
                          = );
  (regex_token_iterator< );
  regex_token_iterator<  
  (regex_token_iterator< );
   () ;
   () ;
  regex_token_iterator<  ();
  regex_token_iterator<  ();
};

Description

regex_token_iterator public member functions

  1. ();

    Postconditions:

    *this is the end of sequence iterator.

  2. ( begin,  end, 
                         basic_regex<  rex);

    Parameters:

    begin

    The beginning of the character range to search.

    end

    The end of the character range to search.

    rex

    The regex pattern to search for.

    Requires:

    [begin,end) is a valid range.

  3. template<typename LetExpr> 
      ( begin,  end, 
                           basic_regex<  rex,  args);

    Parameters:

    begin

    The beginning of the character range to search.

    end

    The end of the character range to search.

    rex

    The regex pattern to search for.

    args

    A let() expression with argument bindings for semantic actions.

    Requires:

    [begin,end) is a valid range.

  4. template<typename Subs> 
      ( begin,  end, 
                           basic_regex<  rex, 
                            subs, 
                            flags = );

    Parameters:

    begin

    The beginning of the character range to search.

    end

    The end of the character range to search.

    rex

    The regex pattern to search for.

    subs

    A range of integers designating sub-matches to be treated as tokens.

    flags

    Optional match flags, used to control how the expression is matched against the sequence. (See match_flag_type.)

    Requires:

    [begin,end) is a valid range.

    Requires:

    subs is either an integer greater or equal to -1, or else an array or non-empty std::vector<> of such integers.

  5. template<typename Subs, typename LetExpr> 
      ( begin,  end, 
                           basic_regex<  rex, 
                            subs,  args, 
                            flags = );

    Parameters:

    begin

    The beginning of the character range to search.

    end

    The end of the character range to search.

    rex

    The regex pattern to search for.

    subs

    A range of integers designating sub-matches to be treated as tokens.

    args

    A let() expression with argument bindings for semantic actions.

    flags

    Optional match flags, used to control how the expression is matched against the sequence. (See match_flag_type.)

    Requires:

    [begin,end) is a valid range.

    Requires:

    subs is either an integer greater or equal to -1, or else an array or non-empty std::vector<> of such integers.

  6. (regex_token_iterator<  that);

    Postconditions:

    *this == that

  7. regex_token_iterator<  
    (regex_token_iterator<  that);

    Postconditions:

    *this == that

  8.  () ;
  9.  () ;
  10. regex_token_iterator<  ();

    If N == -1 then sets *this equal to the end of sequence iterator. Otherwise if N+1 < subs.size(), then increments N and sets result equal to ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[subs[N]].str())). Otherwise if what.prefix().first != what[0].second and if the element match_prev_avail is not set in flags then sets it. Then locates the next match as if by calling regex_search(what[0].second, end, what, *pre, flags), with the following variation: in the event that the previous match found was of zero length (what[0].length() == 0) then attempts to find a non-zero length match starting at what[0].second, only if that fails and provided what[0].second != suffix().second does it look for a (possibly zero length) match starting from what[0].second + 1. If such a match is found then sets N equal to zero, and sets result equal to ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[subs[N]].str())). Otherwise if no further matches were found, then let last_end be the endpoint of the last match that was found. Then if last_end != end and subs[0] == -1 sets N equal to -1 and sets result equal to value_type(last_end, end). Otherwise sets *this equal to the end of sequence iterator.

  11. regex_token_iterator<  ();

PrevUpHomeNext