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

Z.cpp


SourceForge.net Logo     CTTL on    
    SourceForge    
    Download    
    Latest    
    Documentation    
    Index    
    Library    
    News    
    CVS    
    Repository    
   Other    
   Links    

A tiny program that matches a single character inside user input. Demonstrates essentials of CTTL grammar evaluation statements.

// sample code: Z.cpp

#include "cttl/cttl.h"

using namespace cttl;

int main()
{
    input<> inp( "Z" );
    const_edge<> U( new_edge( inp ) );
    // evaluation method is "match"
    // grammar expression is "symbol( 'Z' )"
    size_t P = symbol( 'Z' ).match( U );
    assert( P == 0 );
    return 0;
}



Copyright © 1997-2006 Igor Kholodov mailto:cttl@users.sourceforge.net.

Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies. This document is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.


Generated on Thu Nov 2 17:44:56 2006 for Common Text Transformation Library by  doxygen 1.3.9.1