|
|
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: B T
Length: 3784 (0xec8)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
with Block_Class;
with Boolean_Class;
with Integer_Class;
with Message;
with More_Unary;
with Msg_Report;
with Object;
with Pen_Class;
with Scanner;
with String_Class;
with String_Utilities;
with Turtle_Class;
with Unparse_Report;
package body More_Unary is
type Node_Structure is
record
Info : Natural range 0 .. 1 := 0;
Moun : More_Unary.Node := More_Unary.Empty_Node;
Umes : Message.Selector := Message.Void_Selector;
Lign : Integer;
end record;
function Su_Capitalize (A_String : String) return String
renames String_Utilities.Capitalize;
procedure Parse (N : in out Node; Error : out Boolean) is
Failed : Boolean := False;
use Scanner;
begin
Msg_Report.Information ("I enter in more_unary's parse");
N := new Node_Structure;
N.Lign := Scanner.Line_Number;
Message.Copy (N.Umes, Scanner.Value);
Msg_Report.Continue ("unary message is " & Message.Image (N.Umes));
Scanner.Next;
if More_Unary.Is_First (Scanner.Symbol) then
N.Info := 1;
More_Unary.Parse (N.Moun, Failed);
end if;
Msg_Report.Information ("I leave more_unary's parse with failed = " &
Boolean'Image (Failed));
Error := Failed;
end Parse;
procedure Unparse (N : Node) is
begin
Unparse_Report.Write (Su_Capitalize (Message.Image (N.Umes)) & " ");
if N.Info = 1 then
More_Unary.Unparse (N.Moun);
end if;
end Unparse;
function Is_First (T : Scanner.Token) return Boolean is
use Scanner;
begin
return T = L_Identifier;
end Is_First;
function Interpret (N : Node;
Inherited : Object.Reference := Object.Void_Reference)
return Object.Reference is
Result : Object.Reference;
An_Unary_Mess : Message.Selector := Message.Void_Selector;
begin
Msg_Report.Information ("I enter in more_unary's interpret");
Msg_Report.Set_Line_Number (N.Lign);
Message.Cat (An_Unary_Mess, N.Umes);
case Object.The_Class (Inherited) is
when Object.C_Block =>
Msg_Report.Information ("I send block class");
Result := Block_Class.Send (Inherited, An_Unary_Mess);
when Object.C_Integer =>
Msg_Report.Information ("I send integer class");
Result := Integer_Class.Send (Inherited, An_Unary_Mess);
when Object.C_Boolean =>
Msg_Report.Information ("I send boolean class");
Result := Boolean_Class.Send (Inherited, An_Unary_Mess);
when Object.C_String =>
Msg_Report.Information ("I send string class");
Result := String_Class.Send (Inherited, An_Unary_Mess);
when Object.C_Turtle =>
Msg_Report.Information ("I send turtle class");
Result := Turtle_Class.Send (Inherited, An_Unary_Mess);
when Object.C_Pen =>
Msg_Report.Information ("I send pen class");
Result := Pen_Class.Send (Inherited, An_Unary_Mess);
when Object.C_Void =>
null;
end case;
if N.Info = 1 then
Result := More_Unary.Interpret (N.Moun, Result);
end if;
Msg_Report.Information ("I leave more_unary'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 More_Unary;