#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, tString, tNegate, tEndOfLine, tEndOfInput, tUninitialized, tComputedValue }; Token(); Token( Type eType ); Token( Type eType, Bu::String *s ); Token( Type eType, Number *n ); Token( const Token &rSrc ); ~Token(); Token &operator=( const Token &rhs ); Type eType; union { Bu::String *sVal; class Number *nVal; }; }; Bu::Formatter &operator<<( Bu::Formatter &f, Token::Type eType ); Bu::Formatter &operator<<( Bu::Formatter &f, const Token &t ); #endif