#ifndef TOKEN_H #define TOKEN_H class Number; namespace Bu { class String; class Formatter; }; class Token { public: enum Type { tNumber, tVariable, tCommand, tPlus, tMinus, tDivide, tMultiply, tModulus, tOpenParen, tCloseParen, tEquals, tEndOfLine, tEndOfInput }; Token( Type eType ); Token( Type eType, Bu::String *s ); Token( Type eType, Number *n ); Token( const Token &rSrc ); ~Token(); Type eType; union { Bu::String *sVal; class Number *nVal; }; }; Bu::Formatter &operator<<( Bu::Formatter &f, Token::Type eType ); #endif