cttl_impl::xtl_position_bof Class Reference

Defines behavior of begin(), beginning of the user input lexeme inside CTTL grammar expression. More...

#include <xtl_primary.h>

List of all members.

Static Public Member Functions

template<typename SubstrT >
static size_t bang_find (SubstrT &edge_)
 Implements repeatable search algorithm for beginning of the user input.
template<typename SubstrT >
static size_t find (SubstrT &edge_)
 Implements search algorithm for beginning of the user input.
template<typename SubstrT >
static size_t match (SubstrT &edge_)
 Implements match algorithm for beginning of the user input.


Detailed Description

Defines behavior of begin(), beginning of the user input lexeme inside CTTL grammar expression.

Definition at line 3355 of file xtl_primary.h.


Member Function Documentation

template<typename SubstrT >
static size_t cttl_impl::xtl_position_bof::bang_find ( SubstrT &  edge_  )  [static]

Implements repeatable search algorithm for beginning of the user input.

Template Parameters:
SubstrT specifies type of the parseable substring. Can be either cttl::const_edge or cttl::edge.
Parameters:
edge_ reference to the parseable substring.
Returns:
evaluation result: this algorithm always succeeds and returns absolute offset zero.

Definition at line 3429 of file xtl_primary.h.

03430     {
03431         return find( edge_ );
03432     }

template<typename SubstrT >
static size_t cttl_impl::xtl_position_bof::find ( SubstrT &  edge_  )  [static]

Implements search algorithm for beginning of the user input.

Template Parameters:
SubstrT specifies type of the parseable substring. Can be either cttl::const_edge or cttl::edge.
Parameters:
edge_ reference to the parseable substring.
Returns:
evaluation result: this algorithm always succeeds and returns absolute offset zero.

Definition at line 3406 of file xtl_primary.h.

03407     {
03408         // set beginning of the substring
03409         edge_.first.offset( 0 );
03410         CTTL_TRACE_RESULT( true, 'A' );
03411         return 0;
03412     }

template<typename SubstrT >
static size_t cttl_impl::xtl_position_bof::match ( SubstrT &  edge_  )  [static]

Implements match algorithm for beginning of the user input.

Template Parameters:
SubstrT specifies type of the parseable substring. Can be either cttl::const_edge or cttl::edge.
Parameters:
edge_ reference to the parseable substring.
Returns:
evaluation result: if algorithm succeeds, it returns absolute offset zero. Otherwise, it returns SubstrT::string_T::npos, indicating that the evaluation algorithm has failed.

Definition at line 3380 of file xtl_primary.h.

03381     {
03382         if ( edge_.first.offset() == 0 ) {
03383             CTTL_TRACE_RESULT( true, 'A' );
03384             return 0;
03385         }
03386         
03387         CTTL_TRACE_RESULT( false, 'A' );
03388         return SubstrT::string_T::npos;
03389     }


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

Generated on Sun Aug 23 13:43:47 2009 for Common Text Transformation Library by  doxygen 1.5.9