// Token.cpp Dave Reed 9/30/03 //////////////////////////////////////////////// #include #include "Token.h" using namespace std; Token::Token(string v, TOKEN_TYPE t) // constructor: initializes value and type fields for the token // NOTE: DEFAULT VALUE IS "", DEFAULT TYPE IS "UNKNOWN" { value = v; type = t; } string Token::GetValue() const // accessor: returns the value of the token { return value; } void Token::SetValue(string v) // modifier: sets the value of the token { value = v; } TOKEN_TYPE Token::GetType() const // accessor: returns the type of the token { return type; } void Token::SetType(TOKEN_TYPE t) // modifier: sets the valypeue of the token { type = t; }