-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUG.h
73 lines (64 loc) · 1.21 KB
/
BUG.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#pragma once
#define FUNC 15
#define UCHAR 2
#define CHAR 3
#define USINT 4
#define SINT 5
#define UINT 6
#define INT 7
#define ULINT 8
#define LINT 9
#define ULLINT 10
#define LLINT 11
#define FLOAT 22
#define DOUBLE 24
#define OTHER 13
#define HEAP 1
#define STACK 2
#define IN_OPEA 3
#define IN_SYM 4
#define IN_LEN 5
#define WORD(c) ((c>='a'&&c<='z')||(c>='A'&&c<='Z')||c=='_')
#define NUMB(c) (c>='0'&&c<='9')
typedef struct token{
char name[50];
char rank;
int num;
struct token *next;
int type;
bool point;
int pointtype;
}TK,*TK_t;
typedef struct thebug {
char name[50];//function name
int line;//ÐÐÊý
int bugtype;
char rank;
struct thebug * next;
}BG,*BG_t;
class BUG
{
public:
BUG();
~BUG();
BG bugs;
TK tokens;
BG_t find(char * filename);
private:
int line;
void textAn(char *text,int length);
struct keyword
{
char name[20];
int token;
char argv[50];
}key[20];
TK_t temp_tokens;
BG_t temp_bugs;
char opera[23][10];
bool strcmp_typekey(char *text, int &length, int &type);
void lineNum(char* const text, int line, int length);
bool instertBu(char*name, int line, int bugType,int rank);
void lineAn(char*text, int line,int length);
void lineFindFun(char*text, int line, int length);
};