This commit is contained in:
2024-08-07 09:16:27 -04:00
parent fdfadd5c7e
commit 5f971cf684
5200 changed files with 731717 additions and 0 deletions

62
http/HOLD/SCAN.HPP Normal file
View File

@@ -0,0 +1,62 @@
#ifndef _HTTP_SCAN_HPP_
#define _HTTP_SCAN_HPP_
#ifndef _COMMON_BLOCK_HPP_
#include <common/block.hpp>
#endif
#ifndef _HTTP_EMIT_HPP_
#include <http/emit.hpp>
#endif
#ifndef _HTTP_SYMBOL_HPP_
#include <http/symbol.hpp>
#endif
#ifndef _HTTP_TABLE_HPP_
#include <http/table.hpp>
#endif
#ifndef _COMMON_OPENFILE_HPP_
#include <common/openfile.hpp>
#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