Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

xtl_opunarplus Class Template Reference

#include <xtl_op_impl.h>

Inheritance diagram for xtl_opunarplus:

Inheritance graph
[legend]
Collaboration diagram for xtl_opunarplus:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename ExprT>
class cttl_impl::xtl_opunarplus< ExprT >

Implements behavior of various flavors of Kleene plus operators.

ExprT
Template parameter specifying type of grammar expression object, determined by the C++ compiler at compile time.
See also:

Definition at line 780 of file xtl_op_impl.h.

Public Member Functions

 xtl_opunarplus (ExprT const &expr_, size_t upper_limit_=0, size_t lower_limit_=0)
 Constructs and initializes the object.
template<typename UniverseT>
size_t match (UniverseT &edge_)
 Implements grammar evaluation method for Kleene star match algorithm, starting at the upper boundary of the parseable universe.
template<typename UniverseT>
size_t find (UniverseT &edge_)
 Implements grammar evaluation method for Kleene star search algorithm, starting at the upper boundary of the parseable universe.
template<typename UniverseT>
size_t bang_find (UniverseT &edge_)
 Implements grammar evaluation method for Kleene star repeatable search algorithm, starting at the upper boundary of the parseable universe.

Protected Member Functions

template<typename UniverseT>
size_t unarplus (UniverseT &edge_, size_t saved_end_offset_, size_t first_match_offset_)
 Helper function to handle limits of the kleene plus evaluation.

Protected Attributes

size_t m_upper_limit
 Upper limit for Kleene matches.
size_t m_lower_limit
 Lower limit for Kleene matches.


Constructor & Destructor Documentation

xtl_opunarplus ExprT const &  expr_,
size_t  upper_limit_ = 0,
size_t  lower_limit_ = 0
[inline]
 

Constructs and initializes the object.

Parameters:
expr_ immutable reference to CTTL grammar expression of the operand.
upper_limit_ If not zero, suggests the upper limit for a number of matches.
lower_limit_ If not zero, suggests the lower limit for a number of matches.

Definition at line 889 of file xtl_op_impl.h.


Member Function Documentation

size_t bang_find UniverseT &  edge_  )  [inline]
 

Implements grammar evaluation method for Kleene star repeatable search algorithm, starting at the upper boundary of the parseable universe.

UniverseT
Template parameter specifying type of the parseable universe. Can be either cttl::const_edge or cttl::edge.
Parameters:
edge_ reference to the parseable universe.
Postcondition:
If method succeeds, the universe, specified by the edge_ parameter, gets consumed accordingly to the size of the matched symbols.
Returns:
evaluation result: if method succeeds, it returns absolute offset corresponding to the upper boundary of the matched symbols. Otherwise, it returns UniverseT::string_T::npos, indicating that the evaluation method has failed.

Definition at line 993 of file xtl_op_impl.h.

size_t find UniverseT &  edge_  )  [inline]
 

Implements grammar evaluation method for Kleene star search algorithm, starting at the upper boundary of the parseable universe.

UniverseT
Template parameter specifying type of the parseable universe. Can be either cttl::const_edge or cttl::edge.
Parameters:
edge_ reference to the parseable universe.
Postcondition:
If method succeeds, the universe, specified by the edge_ parameter, gets consumed accordingly to the size of the matched symbols.
Returns:
evaluation result: if method succeeds, it returns absolute offset corresponding to the upper boundary of the matched symbols. Otherwise, it returns UniverseT::string_T::npos, indicating that the evaluation method has failed.

Definition at line 958 of file xtl_op_impl.h.

size_t match UniverseT &  edge_  )  [inline]
 

Implements grammar evaluation method for Kleene star match algorithm, starting at the upper boundary of the parseable universe.

UniverseT
Template parameter specifying type of the parseable universe. Can be either cttl::const_edge or cttl::edge.
Parameters:
edge_ reference to the parseable universe.
Postcondition:
If method succeeds, the universe, specified by the edge_ parameter, gets consumed accordingly to the size of the matched symbols.
Returns:
evaluation result: if method succeeds, it returns absolute offset corresponding to the upper boundary of the matched symbols. Otherwise, it returns UniverseT::string_T::npos, indicating that the evaluation method has failed.

Definition at line 923 of file xtl_op_impl.h.

size_t unarplus UniverseT &  edge_,
size_t  saved_end_offset_,
size_t  first_match_offset_
[inline, protected]
 

Helper function to handle limits of the kleene plus evaluation.

UniverseT
Template parameter specifying type of the parseable universe. Can be either cttl::const_edge or cttl::edge.
Parameters:
edge_ reference to the parseable universe.
saved_end_offset_ Statically captured offset to watch mutablility of the universe. universe is considered mutated if saved_end_offset no longer matches the end of the universe.
first_match_offset_ Offset of the first matched symbol.

Definition at line 808 of file xtl_op_impl.h.


The documentation for this class was generated from the following file:
Generated on Thu Nov 2 17:45:38 2006 for Common Text Transformation Library by  doxygen 1.3.9.1