#ifndef TOKEN_H #define TOKEN_H #include #include #include using namespace std; struct Token { enum Type { INT, STRING, VARNAME, FUNCTION, OPERATOR }; const Type type; const int int_val; const string str_val; Token(const Type t, const string &s); Token(const Type t, const int i); Token(const Token * const tok); ~Token(void); // convert the token to a string string &appendToString(string &str) const; }; ostream &operator<<(ostream &out, const Token * const token); ostream &operator<<(ostream &out, const Token &token); ostream &operator<<(ostream &is, const Token::Type type); #endif // TOKEN_H