|
|
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: 7168 (0x1c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Binary, seg_037e24, seg_038ab8
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Arguments;
with Boolean_Class;
with Integer_Class;
with Message;
with More_Binary;
with Msg_Report;
with Object;
with Scanner;
with String_Class;
with Unary;
package body Binary is
type Node_Structure is
record
Info : Natural range 0 .. 1 := 0;
Unar : Unary.Node := Unary.Empty_Node;
Mobi : More_Binary.Node := More_Binary.Empty_Node;
Lign : Integer;
end record;
procedure Parse (N : in out Node; Error : out Boolean) is
Failed : Boolean := False;
begin
Msg_Report.Information ("I enter in binary's parse");
N := new Node_Structure;
N.Lign := Scanner.Line_Number;
Unary.Parse (N.Unar, Failed);
if not Failed then
if More_Binary.Is_First (Scanner.Symbol) then
N.Info := 1;
More_Binary.Parse (N.Mobi, Failed);
end if;
end if;
Msg_Report.Information ("I leave binary's parse with failed = " &
Boolean'Image (Failed));
Error := Failed;
end Parse;
procedure Unparse (N : Node) is
begin
Unary.Unparse (N.Unar);
if N.Info = 1 then
More_Binary.Unparse (N.Mobi);
end if;
end Unparse;
function Is_First (T : Scanner.Token) return Boolean is
use Scanner;
begin
return Unary.Is_First (T);
end Is_First;
function Interpret (N : Node;
Inherited : Object.Reference := Object.Void_Reference;
A_Bin_Mess : Message.Selector := Message.Void_Selector)
return Object.Reference is
Result, First_Object : Object.Reference;
An_Argument : Arguments.List := Arguments.Void_Arguments;
use Object;
begin
Msg_Report.Information ("I enter in binary's interpret");
Msg_Report.Set_Line_Number (N.Lign);
Msg_Report.Information ("Binary message is " &
Message.Image (A_Bin_Mess));
Result := Unary.Interpret (N.Unar);
if Inherited = Object.Void_Reference then
if N.Info = 1 then
Result := More_Binary.Interpret (N.Mobi, Result);
end if;
else
First_Object := Inherited;
Arguments.Write (An_Argument, Result);
case Object.The_Class (First_Object) is
when Object.C_Block =>
null;
when Object.C_Integer =>
Result := Integer_Class.Send
(First_Object, A_Bin_Mess, An_Argument);
when Object.C_Boolean =>
Result := Boolean_Class.Send
(First_Object, A_Bin_Mess, An_Argument);
when Object.C_String =>
Result := String_Class.Send
(First_Object, A_Bin_Mess, An_Argument);
when Object.C_Turtle =>
null;
when Object.C_Pen =>
null;
when Object.C_Void =>
null;
end case;
if N.Info = 1 then
Result := More_Binary.Interpret (N.Mobi, Result);
end if;
end if;
Msg_Report.Information ("I leave binary's interpret with result :");
Msg_Report.Continue
("class = " & Object.Class'Image (Object.The_Class (Result)) &
" ident = " & Integer'Image (Object.Identificator (Result)));
return Result;
end Interpret;
end Binary;
nblk1=6
nid=4
hdr6=a
[0x00] rec0=29 rec1=00 rec2=01 rec3=006
[0x01] rec0=23 rec1=00 rec2=03 rec3=06c
[0x02] rec0=08 rec1=00 rec2=06 rec3=034
[0x03] rec0=1c rec1=00 rec2=02 rec3=042
[0x04] rec0=16 rec1=00 rec2=05 rec3=000
[0x05] rec0=42 rec1=61 rec2=3b rec3=1b6
tail 0x21531356284e59126366f 0x42a00088462060003
Free Block Chain:
0x4: 0000 00 00 00 04 80 01 6e 01 20 20 20 20 20 20 20 20 ┆ n ┆