-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasicTypes.h
executable file
·137 lines (128 loc) · 2.95 KB
/
basicTypes.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#ifndef BASIC_TYPES_H
#define BASIC_TYPES_H
#include <iostream>
#pragma mark -
#pragma mark Basic const and type define
extern const char basic_end_seperators[];
extern const int basic_end_seperators_count;
//if addition of basic_symbols is needed, add end seperators in the front and change the corresponding const down below.
extern const char basic_component_symbols[];// define a symbol that's considerred a part of word
extern const char basic_symbols[];
const int basic_symbols_removable = 8;
const int basic_symbols_count = 13;
const int basic_component_symbols_count = 1;
const int basic_words_count = 12;
const int INVALID_SYMBOL= -1;
//const int NULL = 0;
enum basic_words_type {
type_undeclared,
type_adjectives,
type_adverbs,
type_perpositions,
type_conjunctions,
type_numerals,
type_interjections,
type_verbs_t,
type_verbs_i,
type_nouns,
type_pronouns,
type_articals
};
const std::string basic_words_type_str[basic_words_count] = {
"Not defined yet..",
"adjective",
"adverb",
"perposition",
"conjunction",
"numeral",
"interjection",
"transitive verb",
"intransitive verb",
"noun",
"pronoun",
"article"
};
//std::ostream& operator<<(std::ostream& out, basic_words_type_list list);
#define LIN_STYPE
#ifdef LIN_STYLE
enum basic_words_grammerPos {
pos_Undeclared,
pos_NounPhrase,
pos_VerbPhrase,
pos_Object,
pos_Complement,
pos_Predicative,
pos_Attributive,
pos_Adverbial,
pos_Symbol
};
const int basic_words_grammerPos_count = 9;
const std::string basic_words_grammerPos_str[basic_words_grammerPos_count] = {
"Not defined yet..",
"Subject",
"Verb",
"Object",
"Complement",
"Predicative",
"Attributive",
"Adverbial",
"Symbol"
};
#else //ifdef LIN_STYLE
enum basic_words_grammerPos {
pos_Undeclared,
pos_Suject,
pos_Verb,
pos_Object,
pos_Complement,
pos_Predicative,
pos_Attributive,
pos_Adverbial,
pos_Symbol
};
const int basic_words_grammerPos_count = 9;
const std::string basic_words_grammerPos_str[basic_words_grammerPos_count] = {
"Not defined yet..",
"Subject",
"Verb",
"Object",
"Complement",
"Predicative",
"Attributive",
"Adverbial",
"Symbol"
};
#endif //ifdef LIN_STYLE
enum basic_base_class_identifier {
id_GBase,
id_GContent,
id_GLinkedList,
id_GListNode,
id_GListNode_GWord,
id_GListNode_GSymbol,
id_GWord,
id_GSymbol,
id_GSentence,
id_GPhrase,
id_GDataBase
};
#pragma mark -
#pragma mark Basic class phrototype:
/****************************************************************************************
See phrototype of each class at the beginning of classes, all classes contain
"
const basic_base_class_identifier GIdentifier();
"
for identification purpose
***************************************************************************************/
class GBase;
class GSymbol;
class GListNode;
class GLinkedList;
class GWord;
class GSentence;
class GPhrase;
class GDataBase;
class graParser;
class lexParser;
#endif //BASIC_TYPES_H