ConfigToken Class Reference

#include <ConfigScanner.h>

Inherited by ConfigEofToken, ConfigErrorToken, ConfigNumberToken, ConfigSpecialToken, ConfigStringToken, and ConfigWordToken.

List of all members.


Detailed Description

Class ConfigToken and its descendants are used by class ConfigScanner to hand one token at a time to an object of class ConfigParser.


Public Types

enum  TokenCode {
  a, b, c, a, b, c,
  a, b, c, tcLAST
}
 token codes.


Public Member Functions

virtual void get (std::istream *is)=0
 read the next token (abstract)

virtual void print () const =0
 print the current token (abstract)

bool isBool () const
 predicate to check if token represents a boolean literal.

bool isAsnop () const
 predicate to check if token represents an assignment operator.

bool isCard () const
 predicate to check if token represents a card.

bool isDelim () const
 predicate to check if token represents a delimiter.

bool isUnit () const
 predicate to check if token represents a unit.

bool isKind (TokenCode t) const
 predicate to check if token represents a delimiter.

TokenCode code () const
 return current token code.

bool toBool () const
 return as boolean.

Int toInt () const
 return as integer value.

Real toReal () const
 return as real value.

String toString () const
 return as string.

String tokenString () const
 return string for this token.

String tokenString (TokenCode t) const
 return string for specified token.


Protected Attributes

TokenCode theTokenCode
 the token code

Int theIntValue
 the integer value

Real theRealValue
 the real value

String theString
 the string


Static Private Attributes

CharCptr stringTable []
 table containg a string representation of the tokens.

TokenCode kindTable []
 table specifying kind (rack, card, number etc.) of token.


The documentation for this class was generated from the following files:
Generated on Tue Oct 12 14:12:04 2004 for Rulbus Device Class Library for Microsoft Windows by doxygen 1.3.4