#include <ConfigScanner.h>
Inherited by ConfigEofToken, ConfigErrorToken, ConfigNumberToken, ConfigSpecialToken, ConfigStringToken, and ConfigWordToken.
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. | |