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

xtl_bool Class Template Reference

#include <xtl_primary.h>

Inheritance diagram for xtl_bool:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<bool accept_emty_universe = false>
class cttl_impl::xtl_bool< accept_emty_universe >

Defines behavior of true and false C++ literals inside CTTL grammar expressions.

Template class xtl_bool provides implementation for family of lexemes

    begin( true )   xtl_bool< true >( true )     always succeeds
    begin( false )  xtl_bool< true >( false )    always fails
   symbol( true )   xtl_bool< false >( true )    succeeds unless at the end of the universe
           true     xtl_bool< false >( true )    shorthand for symbol( true )
  !symbol( true )   !xtl_bool< false >( true )   always succeeds
 !!symbol( true )   !!xtl_bool< false >( true )  always succeeds
   symbol( false )  xtl_bool< false >( false )   always fails
           false    xtl_bool< false >( false )   shorthand for symbol( false )

See also:

Definition at line 372 of file xtl_primary.h.

Public Member Functions

 xtl_bool (bool value_)
 Constructs and initializes the object.
template<typename UniverseT>
size_t match (UniverseT &edge_)
 Implements grammar evaluation method for symbol match algorithm, starting at the upper boundary of the parseable universe.
template<typename UniverseT>
size_t find (UniverseT &edge_)
 Implements grammar evaluation method for symbol 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 repeatable search algorithm, starting at the upper boundary of the parseable universe.
template<typename UniverseT>
size_t internal_match (UniverseT &edge_)
 Implements match grammar evaluation method.


Member Function Documentation

size_t bang_find UniverseT &  edge_  )  [inline]
 

Implements grammar evaluation method for 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.
Returns:
evaluation result: if method succeeds, it returns absolute offset corresponding to the upper boundary of the matched symbol. Otherwise, it returns UniverseT::string_T::npos, indicating that the evaluation method has failed.

Definition at line 463 of file xtl_primary.h.

size_t find UniverseT &  edge_  )  [inline]
 

Implements grammar evaluation method for symbol 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.
Returns:
evaluation result: if method succeeds, it returns absolute offset corresponding to the upper boundary of the matched symbol. Otherwise, it returns UniverseT::string_T::npos, indicating that the evaluation method has failed.

Definition at line 438 of file xtl_primary.h.

size_t internal_match UniverseT &  edge_  )  [inline]
 

Implements match grammar evaluation method.

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.
Returns:
evaluation result: if method succeeds, it returns absolute offset of the upper boundary of the universe. Otherwise, it returns UniverseT::string_T::npos, indicating that the evaluation method has failed.

Definition at line 487 of file xtl_primary.h.

size_t match UniverseT &  edge_  )  [inline]
 

Implements grammar evaluation method for symbol 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.
Returns:
evaluation result: if method succeeds, it returns absolute offset corresponding to the upper boundary of the matched symbol. Otherwise, it returns UniverseT::string_T::npos, indicating that the evaluation method has failed.

Definition at line 408 of file xtl_primary.h.


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