#ifndef TOKEN_H #define TOKEN_H #include #include enum Punctuation { L_PAREN, R_PAREN, PLUS, MINUS, TIMES, DIVIDE, NUMERIC, VOID }; class Token { public: Punctuation type; int value; // only used for numeric Token (Punctuation t=VOID, int v=0) : type(t), value(v) { }; std::string toString() const; }; /* * print token */ std::ostream& operator<<(std::ostream& out, const Token& t); #endif