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

56
http/SCAN.HPP Normal file
View File

@@ -0,0 +1,56 @@
#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_CONSOLE_HPP_
#include <common/console.hpp>
#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