-
Notifications
You must be signed in to change notification settings - Fork 3
/
word_parameters.ads
63 lines (41 loc) · 2.1 KB
/
word_parameters.ads
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
with TEXT_IO;
package WORD_PARAMETERS is
-- This package defines a number of parameters that areused in the program
-- The default values are set in the body, so that they may be changed easily
CHANGE_PARAMETERS_CHARACTER : CHARACTER := '#';
CHANGE_LANGUAGE_CHARACTER : CHARACTER := '~';
HELP_CHARACTER : CHARACTER := '?';
-- These files are used by the program if requested, but not necessary
-- They are all text files and human readable
-- MODE_FILE is used by the program to remember MODE values between runs
MODE_FILE : TEXT_IO.FILE_TYPE;
-- OUTPUT is used to write out and save the results of a run
OUTPUT : TEXT_IO.FILE_TYPE;
INPUT : TEXT_IO.FILE_TYPE;
-- UNKNOWNS is used to record the words that the program fails to find
UNKNOWNS : TEXT_IO.FILE_TYPE;
-- This is a flag to tell if there has been trimming for this word
TRIMMED : BOOLEAN := FALSE;
type MODE_TYPE is (
TRIM_OUTPUT,
HAVE_OUTPUT_FILE,
WRITE_OUTPUT_TO_FILE,
DO_UNKNOWNS_ONLY,
WRITE_UNKNOWNS_TO_FILE,
IGNORE_UNKNOWN_NAMES,
IGNORE_UNKNOWN_CAPS,
DO_COMPOUNDS,
DO_FIXES,
DO_TRICKS,
DO_DICTIONARY_FORMS,
SHOW_AGE,
SHOW_FREQUENCY,
DO_EXAMPLES,
DO_ONLY_MEANINGS,
DO_STEMS_FOR_UNKNOWN );
package MODE_TYPE_IO is new TEXT_IO.ENUMERATION_IO(MODE_TYPE);
type MODE_ARRAY is array (MODE_TYPE) of BOOLEAN;
WORDS_MODE : MODE_ARRAY; -- Initialized in body
procedure CHANGE_PARAMETERS;
procedure INITIALIZE_WORD_PARAMETERS;
end WORD_PARAMETERS;