#ifndef LEXER_H #define LEXER_H #include class Token; class Lexer { public: Lexer( Bu::Stream &rIn ); virtual ~Lexer(); enum Mode { modeNormal, modeCommand, }; void setMode( Mode e ) { eMode = e; } Mode getMode() const { return eMode; } Token nextToken(); int getScale() const { return iScale; } void setScale( int i ) { iScale = i; } int getRadix() const { return iRadix; } void setRadix( int i ); Token &operator[]( int iIdx ); private: Token nextTokenNormal(); Token nextTokenCommand(); private: Bu::Stream &rIn; Bu::String sBuf; int iBufPos; int iScale; int iRadix; char numRangeTop; char ascRangeTop; Mode eMode; }; #endif