|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 4452 (0x1164)
Types: TextFile
Names: »V«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
----------------------------------------------------------------
--
-- Abstract : This unit outlines the procedures and functions
-- : contained in this package. The visible section
-- : provides the interfaces necessary for commun-
-- : ication with the various subunits contained in
-- : the package.
-- :
-- : The package is concerned with the handling of the
-- : data structures that are utilized for the storage of the
-- : information, (words and acronyms), which is used
-- : within the Spelling Corrector tool.
--
----------------------------------------------------------------
with Text_Io, Token_Definition;
package Dictionary_Manager is
--Establishes the types of dictionaries available
type Dictionary_Type is (Master, Acronym, User);
type Dictionary_Ptr is private;
subtype File_Name_Type is Text_Io.File_Type;
--A variable used to count the number of words loaded into a dictionary
--structure. A routine must be installed to use this variable.
Word_Counter : Natural;
No_More_Words : exception; --raised when the NEXT_WORD
--procedure can no longer return
--the required number of words or
--the NEXT_WORD procedure is called with a
--word count of 0
Bad_Word : exception; --An illegal word format
--raised when the word is too short
--or illegal characters are contained
--in the first two characters of the
--word input to the manager.
Dictionary_Error : exception; --A nonexistent dictionary
--or dictionary error
Word_Not_Valid : exception; --A word not in the dictionary
--raised in the DELETE_WORD procedure
Hardware_Failure : exception; --Failure of IO devices
-- The following procedures and functions are documented in the
-- package body (DICTIONARY_MANAGER)
procedure Create_Dictionary (Dictionary_Kind : in Dictionary_Type;
Dictionary_In : out Dictionary_Ptr;
Filename : in String);
procedure List_Dictionary
(Dictionary : in Dictionary_Ptr; Filename : in String);
procedure List_Dictionary (Dictionary : in Dictionary_Ptr);
procedure Merge_Dictionary (Dictionary_A : in out Dictionary_Ptr;
Dictionary_B : in out Dictionary_Ptr;
Into_Dictionary : out Dictionary_Ptr);
procedure Enable_Dictionary (Dictionary : in Dictionary_Ptr);
procedure Insert_Word (Token : in Token_Definition.Token_Type;
Into_Dictionary : in Dictionary_Ptr);
procedure Delete_Word (Token : in Token_Definition.Token_Type;
From_Dictionary : in Dictionary_Ptr);
procedure Disable (Dictionary : in Dictionary_Ptr);
procedure Delete_Dictionary (Dictionary : in out Dictionary_Ptr);
procedure Token_Is_Found (In_Dictionary : out Dictionary_Ptr;
Word : in Token_Definition.Token_Type;
Found : out Boolean);
function Get_Master_Dictionary return Dictionary_Ptr;
function Get_Acronym_Dictionary return Dictionary_Ptr;
procedure Initiator (Token : in Token_Definition.Token_Type;
Number : in Positive);
procedure Next_Word (Word : out Token_Definition.Token_Type);
function More return Boolean;
function Alter (Dictionary : in Dictionary_Ptr) return Boolean;
private
type Word_Record;
type Word_Record_Ptr is access Word_Record;
type Word_Record is
record
Token : Token_Definition.Token_Type;
Next : Word_Record_Ptr;
end record;
Max_Hash_Buckets : constant Positive := 101;
subtype Hash_Bucket_Type is Positive
range Positive'First .. Max_Hash_Buckets;
type Dictionary_Hash_Structure is
array (Hash_Bucket_Type) of Word_Record_Ptr;
type Dictionary_Record;
type Dictionary_Ptr is access Dictionary_Record;
type Dictionary_Record is
record
Dictionary_Name : Dictionary_Type;
Enabled : Boolean := False;
Hash_Table : Dictionary_Hash_Structure;
Next_Dictionary : Dictionary_Ptr;
Alter_Flag : Boolean := False;
end record;
end Dictionary_Manager;