|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package Int_Lib, seg_044758
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Token_Pkg, Bounded_String, Int_Lex, String_Table; package Int_Lib is subtype I_String is String_Table.I_String; subtype I_Table is String_Table.I_Table; type Attribute is record Token : Token_Pkg.Token; Index : Natural; end record; type I_Result is array (1 .. 4) of Attribute; Nothing : constant Natural := 0; function Find (In_The_Table : in I_Table; The_String : in I_String) return Natural; -------------------------------------------------------------------------------- -- <SUBPROGRAM> -- <UNIT> Find -- -- <DESCRIPTION> Check if a string is in a table. -- -- <PARAMETERS> In_The_Table : (I_Table) Table for the search. -- The_String : (I_String) String to find. -- => returns the index in the table or Nothing(i.e 0) if it -- isn't inside. -- -- <EXCEPTIONS> Nothing -- -------------------------------------------------------------------------------- procedure Refresh_Table (Verb_Table, Object_Table, Direction_Table : I_Table; Extracted_String : I_String; Tab_Result : in out I_Result; Number : Natural; Not_Successful : in out Boolean); -------------------------------------------------------------------------------- -- <SUBPROGRAM> -- <UNIT> Refresh_Table -- -- <DESCRIPTION> Check if one word is a known word. If it's the case, it puts -- it in a table. -- -- <PARAMETERS> Verb_Table : (I_Table) the verbs table. -- Object_Table : (I_Table) The objects table. -- Direction_Table : (I_Table) The directions table. -- Extracted_String: (I_String) Word to be checked. -- Tab_Result : (I_Result) The table in which the word -- should be put into if it's a known word. -- Number : (Natural) The index where the word should -- be put in 'Tab_result' if it's a known word. -- Not_Successful : (Boolean) becomes True if the word is not -- a known word. -- -- <EXCEPTIONS> Nothing -- -------------------------------------------------------------------------------- procedure Check_Table (The_Table : in I_Result; Not_Ok : in out Boolean); -------------------------------------------------------------------------------- -- <SUBPROGRAM> -- <UNIT> Check_Table -- -- <DESCRIPTION> check if a result table is correct at a first semantical level. -- -- <PARAMETERS> The_Table : (I_Result) is a table created with extracted words -- which are known words. -- Not_ok : (Boolean) becomes True if the following of the -- words is not correct. -- -- <EXCEPTIONS> Nothing -- -------------------------------------------------------------------------------- procedure Interpretor (Verb_Table, Object_Table, Direction_Table : in I_Table; Tab_Result : in out I_Result); -------------------------------------------------------------------------------- -- <SUBPROGRAM> -- <UNIT> Interpretor -- -- <DESCRIPTION> Keeps asking a command line until a correct output table -- could be created. -- At that point you know that the succession of words is correct -- but you are not sure that it has a meaning. -- -- <PARAMETERS> Verb_Table : (I_Table) The verbs table. -- Object_Table : (I_Table) The objects table. -- Direction_Table : (I_Table) The directions table. -- Tab_Result : (I_Result) Table resulting from the interpre- -- tation of the command line. -- -- <EXCEPTIONS> Nothing -- -------------------------------------------------------------------------------- end Int_Lib;
nblk1=5 nid=0 hdr6=a [0x00] rec0=1f rec1=00 rec2=01 rec3=042 [0x01] rec0=13 rec1=00 rec2=02 rec3=090 [0x02] rec0=15 rec1=00 rec2=03 rec3=02e [0x03] rec0=15 rec1=00 rec2=04 rec3=024 [0x04] rec0=05 rec1=00 rec2=05 rec3=001 tail 0x217458df0863e8989eff5 0x42a00088462060003