|
|
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 - metrics - download
Length: 8192 (0x2000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Interprete, seg_046aef
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Comps_Dictionary, Verbs_Dictionary, Player_Entries;
with Text_Io, Bounded_String;
package body Interprete is
The_Number_Of_Instructions : Integer := 0;
function Exist_Entries_In_Dictionaries
(C : Comps_Dictionary.Object; V : Verbs_Dictionary.Object)
return Boolean is
Exist : Boolean := True;
begin
Player_Entries.Open_Index;
if not Player_Entries.Index_At_End then
if not (Comps_Dictionary.Exist
(Player_Entries.Get_Indexed_Entry, C) or
Verbs_Dictionary.Exist
(Player_Entries.Get_Indexed_Entry, V)) then
Text_Io.Put_Line ("Erreur :" &
Player_Entries.Get_Indexed_Entry &
" est une donnee inconnue du scenario");
return False;
end if;
Player_Entries.Next_Index;
end if;
while not Player_Entries.Index_At_End loop
if not (Comps_Dictionary.Exist
(Player_Entries.Get_Indexed_Entry, C)) then
Exist := False;
Text_Io.Put_Line ("Erreur :" &
Player_Entries.Get_Indexed_Entry &
" n est pas un complement");
end if;
Player_Entries.Next_Index;
end loop;
return Exist;
end Exist_Entries_In_Dictionaries;
function Total_Entries return Integer is
begin
return The_Number_Of_Instructions;
end Total_Entries;
function Number_Of_Entries return Natural is
The_Number : Natural := 0;
begin
Player_Entries.Open_Index;
while not Player_Entries.Index_At_End loop
The_Number := The_Number + 1;
Player_Entries.Next_Index;
end loop;
return The_Number;
end Number_Of_Entries;
function Is_Entry (A, B, C : String) return Boolean is
Test_Entry : Boolean := False;
begin
Player_Entries.Open_Index;
if not Player_Entries.Index_At_End then
if Player_Entries.Get_Indexed_Entry = A then
Player_Entries.Next_Index;
if not Player_Entries.Index_At_End then
if (Player_Entries.Get_Indexed_Entry = B) then
Player_Entries.Next_Index;
if not Player_Entries.Index_At_End then
if (Player_Entries.Get_Indexed_Entry = C) then
Test_Entry := True;
end if;
elsif C = "" then
Test_Entry := True;
end if;
end if;
elsif B = "" then
Test_Entry := True;
end if;
end if;
end if;
return Test_Entry;
end Is_Entry;
function First_Comp_Value (C : Comps_Dictionary.Object) return String is
begin
Player_Entries.Open_Index;
while not Player_Entries.Index_At_End loop
if Comps_Dictionary.Exist (Player_Entries.Get_Indexed_Entry, C) then
return Player_Entries.Get_Indexed_Entry;
end if;
Player_Entries.Next_Index;
end loop;
return "";
end First_Comp_Value;
function Get_Player (C : Comps_Dictionary.Object;
V : Verbs_Dictionary.Object)
return Player_Entries.Token is
Valid_Entry : Boolean := False;
begin
Test_Entry:
while not Valid_Entry or (Number_Of_Entries = 0) loop
Valid_Entry := Player_Entries.Get_Player_Entry;
if not Valid_Entry then
Text_Io.Put_Line (Player_Entries.Get_Player_Error);
elsif Player_Entries.Is_Command then
exit Test_Entry;
else
Valid_Entry := Exist_Entries_In_Dictionaries (C, V);
end if;
end loop Test_Entry;
if Player_Entries."=" (Player_Entries.Get_Command,
Player_Entries.Id) then
The_Number_Of_Instructions := The_Number_Of_Instructions + 1;
end if;
return Player_Entries.Get_Command;
end Get_Player;
end Interprete;
nblk1=7
nid=6
hdr6=c
[0x00] rec0=1d rec1=00 rec2=01 rec3=000
[0x01] rec0=1d rec1=00 rec2=07 rec3=02a
[0x02] rec0=08 rec1=00 rec2=05 rec3=00e
[0x03] rec0=19 rec1=00 rec2=04 rec3=00a
[0x04] rec0=1a rec1=00 rec2=02 rec3=03c
[0x05] rec0=0f rec1=00 rec2=03 rec3=000
[0x06] rec0=11 rec1=00 rec2=03 rec3=001
tail 0x21749622c865187320bd4 0x42a00088462060003
Free Block Chain:
0x6: 0000 00 00 00 15 00 0f 20 20 20 20 20 20 20 20 65 6e ┆ en┆