#ifndef _HTTP_SCAN_HPP_ #define _HTTP_SCAN_HPP_ #ifndef _COMMON_BLOCK_HPP_ #include #endif #ifndef _HTTP_EMIT_HPP_ #include #endif #ifndef _HTTP_SYMBOL_HPP_ #include #endif #ifndef _HTTP_TABLE_HPP_ #include #endif #ifndef _COMMON_CONSOLE_HPP_ #include #endif class Scan : public Emit { public: enum ScanSymbols{leftangle1,rightangle1,forwardslash1,ampersand1,semicolon1,exclamation1,minus1,pound1,startliteral1,literal1,name1,equal1,newline1,numeral1,endtext1,unknown1,stop1}; Scan(PureViewOfFile &srcView,PureViewOfFile &dstView,Table &symbolTable,WORD allowUserSymbols=TRUE); virtual ~Scan(); void analyze(void); private: enum {SpaceChar=32,TabChar=9}; void readch(void); void skipSeparators(void); void scanNewLine(void); void scanNumeral(void); void scanWord(void); void scanLiteral(void); void scanLeftAngle(void); void scanRightAngle(void); void scanForwardSlash(void); void scanAmpersand(void); void scanSemicolon(void); void scanPound(void); void scanExclamation(void); void scanMinus(void); void scanEqual(void); void scanUnknown(void); WORD mUserSymbols; Console mWinConsole; Table &mSymbolTable; int mChar; }; inline void Scan::readch(void) { mChar=read(); } #endif