// token.h file for Token class #ifndef TOKENH #define TOKENH enum TokenClass {RESERVED, IDENTIFIER, NUMBER, SYMBOL, TEMP, NEWLINE=10, ENDOFTEXT}; typedef int TokenValue; class Token { public: Token(); Token(TokenClass tc, TokenValue tv); void setClass(TokenClass tc); // stores token class tc in tClass void setValue(TokenValue tv); // stores token value tv in tValue void setNext(TokenClass atc); // set to next member of token class. int getClass() const; // retrieves the token class TokenClass getClass2() const; // retrieves the token class int getValue() const; // retrieves the token value void display() const; // displays the token private: // (You could overload operator <<) TokenClass tClass; TokenValue tValue; }; #endif