-
Notifications
You must be signed in to change notification settings - Fork 3
/
buildlexicon.h
107 lines (88 loc) · 1.64 KB
/
buildlexicon.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//<head>//////////////////////////////////////////////////////////////
//
//
// Conception & programmation :
// Lionel Clément
// e-mail : [email protected]
//
// samedi 10 mai 2008
//
//
////////////////////////////////////////////////////////////////</head>////
#ifndef LEXICON_H
#define LEXICON_H
#define LEXEDMAXSTRING 255
//#define SEP_PREF "<w><a ref=\""
#define SEP_PREF ""
// #define SEP_UW "UNKNOWN"
// kim changed to empty:
#define SEP_UW ""
//#define SEP_SUFF "\"/></w>\n"
#define SEP_SUFF "\n"
// kim changed to space:
//#define SEP_OR "\"/><a ref=\""
#define SEP_OR " "
typedef unsigned long int TYPEPTR;
struct Fsa {
public:
TYPEPTR fils;
TYPEPTR frere;
TYPEPTR info;
int car;
} ;
struct InfoBuff {
public:
TYPEPTR suivant;
TYPEPTR offset;
};
class Arbre
{
public:
class Arbre *fils;
class Arbre *frere;
class Info *info;
int car;
TYPEPTR adress;
Arbre(Arbre *Fils,
Arbre *Frere,
Info *Info,
unsigned int Car)
{
adress=0;
fils = Fils;
frere = Frere;
info = Info;
car = Car;
};
~Arbre() {};
void Add(char *,
TYPEPTR);
void SetIndexStaticFSA(unsigned long int &);
void PrintStaticFSA(FILE *);
void SetIndexStaticInfo(unsigned long int &);
void PrintStaticInfo(FILE *);
};
class Info
{
public:
class Info *suivant;
TYPEPTR offset;
TYPEPTR adress;
Info(Info *Suivant = NULL, TYPEPTR Offset = 0)
{
adress=0;
suivant=Suivant;
offset=Offset;
};
~Info(){};
Info *GetSuivant()
{
return suivant;
}
TYPEPTR GetOffset()
{
return offset;
}
void PrintStatic(FILE *);
};
#endif // LEXICON_H