-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMatcher.h
51 lines (38 loc) · 930 Bytes
/
Matcher.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include <deque>
#include <string>
#include "Logger.h"
#include "StandardType.h"
using namespace std;
using namespace Logger;
#define CT_UNKNOWN -1
#define CT_SKIP 0
#define CT_ALPHANUM 1
#define CT_SQUARE 2
#define CT_OPERATOR 3
#define CT_ALPHA 4
#define CT_NUM 5
#define Minst Matcher::Instance()
int getCharTypeAdvanced(char ch);
class Matcher {
private:
deque<char*> * tokens;
public:
void SetTokens(deque<char*> * newTokens);
deque<char*> * GetTokens();
static Matcher * instance;
static Matcher * Instance();
bool currentTokenIsName();
bool currentTokenIsNumber();
bool currentTokenIsOperator();
bool Empty();
void NextToken();
void PrevToken(char* token);
bool Equal(char* st);
bool Match(char* st);
void Matching(char* word);
char* GetName(bool required);
char* GetOperator(bool required);
BASE64 * GetNumberConstant(bool required);
char* GetStringConstant(bool required);
};