#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_OPENFILE_HPP_ #include #endif class Scan : public Emit { public: enum ScanSymbols{leftangle1,rightangle1,forwardslash1,ampersand1,semicolon1,space1, colon1,leftparen1,rightparen1,exclamation1,minus1,pound1,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,LineFeed=10}; 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 scanColon(void); void scanSpace(void); void scanRightParen(void); void scanLeftParen(void); void scanUnknown(void); WORD mUserSymbols; Table &mSymbolTable; FileHandle mLogFile; int mChar; }; inline void Scan::readch(void) { mChar=read(); } #endif