<<< Lexeme symbol(true) | Table Of Contents | Lexeme begin(true) >>> |
Common Text Transformation Library http://cttl.sourceforge.net/
Category:
Format:
Algorithm:
Space sensitivity:
Searchability:
Usage example:
#define CTTL_TRACE_EVERYTHING #include "cttl/cttl.h" using namespace cttl; int main() { std::string inp = "XYZ"; const_edge<> substring( inp ); const_edge<> token = substring; size_t result = ( token( entity( isdigit ) ) | false // shorthand for 'symbol(false)' lexeme ).match( substring ); assert( result == std::string::npos ); return 0; }
Trace output format:
The trace symbol of symbol(false) lexeme is digit zero: '0'. The above example generates the following trace:
---------------------@XYZ?{| 0-3
---------------------@XYZ? {e 0-3
:3:1
~~~~~~~~~~~~~~~~~~~~~~~~@~ $ 0-3 FAIL isdigit
~~~~~~~~~~~~~~~~~~~~~~~~@~ e3 0-3 FAIL
}
~~~~~~~~~~~~~~~~~~~~~~~~@~ 0 0-3 FAIL
~~~~~~~~~~~~~~~~~~~~~~~~@~ | 0-3 FAIL
}
Copyright © 1997-2009 Igor Kholodov mailto:cttl@users.sourceforge.net.
Permission to copy 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.
<<< Lexeme symbol(true) | Table Of Contents | Lexeme begin(true) >>> |