NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CScanner Class Reference

Search Toolkit Book for CScanner

Class for lexical tokens extraction from macro string. More...

#include <gui/objutils/macro_parse.hpp>

+ Collaboration diagram for CScanner:

Classes

struct  SData
 
struct  SLexem
 
struct  SLocation
 

Public Types

enum  EToken {
  eTokenILLEGAL = -1 , eTokenEOS = 0 , eTokenKWMACRO , eTokenKWVARS ,
  eTokenKWFOR , eTokenKWEACH , eTokenKWFROM , eTokenKWCHOICE ,
  eTokenKWRANGE , eTokenKWWHERE , eTokenKWDO , eTokenKWDONE ,
  eTokenKWDOPARL , eTokenKWPARLAUTO , eTokenFUNCTION , eTokenIDENT ,
  eTokenASNSELECTOR , eTokenNAMEDANNOT , eTokenINTNUMBER , eTokenFLOATNUMBER ,
  eTokenSTRING , eTokenASK , eTokenBOOLCONST , eTokenASSIGNMENT ,
  eTokenLEFTPAREN , eTokenRIGHTPAREN , eTokenLEFTBRACKET , eTokenRIGHTBRACKET ,
  eTokenLEFTBRACE , eTokenRIGHTBRACE , eTokenCOMMA , eTokenSEMICOLON ,
  eTokenMINUS , eTokenPLUS , eTokenDOT , eTokenMULT ,
  eTokenDIV , eTokenGREATER , eTokenLESS , eTokenNOTLESS ,
  eTokenNOTGREATER , eTokenNOTEQUAL , eTokenCOMMENT
}
 

Public Member Functions

 CScanner (const char *sMacroText)
 
virtual ~CScanner ()
 
void Reset (const char *sMacroText)
 
int Next (bool parseComment=false)
 
int NextASNSelector ()
 
int NextNamedAnnot ()
 
CScanner::EToken GetToken ()
 
const SLexemGetLexemInfo () const
 
SLocation GetErrorLocation () const
 

Private Member Functions

void x_InitScanner ()
 
int x_GetQuotedString ()
 
void x_InitForNextLexem ()
 
int x_SetCurrentLexem (Int4 &pos, CScanner::EToken token)
 
 CScanner (const CScanner &)
 Prohibit copy constructor and assignment operator. More...
 
CScanneroperator= (const CScanner &)
 

Private Attributes

const char * m_StrMacro
 
SLexem m_CurrentLexem
 

Static Private Attributes

static const int MAX_STRING_LEXEM_LENGTH = 4094
 Max buffer size for lexem string info. More...
 

Detailed Description

Class for lexical tokens extraction from macro string.

sequentially gets macro lexems from the input string

Definition at line 59 of file macro_parse.hpp.


The documentation for this class was generated from the following files:
Modified on Thu Apr 11 15:10:44 2024 by modify_doxy.py rev. 669887