TOP --> CcDoc
Converts a C++ source file into tokens with associated types.
public CCcDocLexer ( ) ;
Default constructor.
public enum LEXICON_TYPE { COMMENT , DOUBLE_QUOTE , FLOAT , ID , INTEGER , KEYWORD , OPERATOR , PRAGMA , PUNCTUATOR , RESERVED , SINGLE_QUOTE , UNKNOWN , END_OF_FILE } ;
TOKEN TYPEs.
public LEXICON_TYPE ScanNextToken ( CJdlBufferedFileReader & file , const char * & token ) ;
Scan the next token.
The example below shows how to dump all of the lexicons in a file.
CJdlBufferedFileReader file; file.Open("main.cpp"); CCcDocLexer scanner; const char* token; CCcDocLexer::LEXICON_TYPE type = CCcDocLexer::END_OF_FILE; while( (type = scanner.ScanNextToken(file,token)) != CCcDocLexer::END_OF_FILE ) { printf("L:%s:%d:%s\n",scanner.GetName(type),::strlen(token),token); }
public static bool IsKeyword ( const char * token ) ;
Is this token a keyword?
token | The token. |
public static bool IsReserved ( const char * token ) ;
Is this token a reserved word?
token | The token. |
public static bool IsPunctuator ( const char * token ) ;
Is this token a punctuator?
token | The token. |
public static const char * GetName ( LEXICON_TYPE type ) ;
Get the name of a token type.
type | The token type. |
public bool IsDebug ( ) const ;
Is the CCDOC_LEXER_DEBUG environment variable set?
public static void LoadStringDataFromRcFile ( CJdlStringList & list , const char * rcfile , const char * section ) ;
Resource file load routine.
The | output list. If nothing is loaded the number of items in the returned string doesn't change. |
rcfile | The name of the RC file. |
section | The section within the file. |
This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.
Click here to return to the top of the page.