|
|
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: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Analyzer, seg_039278
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Ada_Program;
with Compilation_Units;
with Declarations;
with Representation_Clauses;
with Text_Io;
with Type_Information;
package body Analyzer is
package Ap renames Ada_Program;
package Apc renames Ada_Program.Conversion;
package Cu renames Compilation_Units;
package D renames Declarations;
package Rc renames Representation_Clauses;
package Ti renames Type_Information;
procedure Enums (Elt : Ap.Element;
State : in out Boolean;
Control : in out Ap.Traversal_Control) is
use Ap, D, Ti;
begin
if Ap.Kind (Elt) = Ap.A_Declaration then
if D.Kind (Elt) = D.A_Type_Declaration then
if Ti.Kind (D.Type_Specification (Elt)) =
Ti.An_Enumeration_Type_Definition then
Text_Io.Put_Line (Ap.Image (Elt));
end if;
end if;
end if;
State := True;
Control := Ap.Continue;
end Enums;
procedure Representations (Elt : Ap.Element;
State : in out Boolean;
Control : in out Ap.Traversal_Control) is
use Ap, D, Rc, Ti;
E : Ap.Element;
begin
if Ap.Kind (Elt) = Ap.A_Representation_Clause then
if Rc.Kind (Elt) = Rc.An_Enumeration_Representation_Clause then
E := Rc.Associated_Type (Elt);
Text_Io.Put_Line (Ap.Image (E));
end if;
end if;
end Representations;
procedure Nothing (Elt : Ap.Element;
State : in out Boolean;
Control : in out Ap.Traversal_Control) is
begin
null;
end Nothing;
procedure Locate_Enumeration_Types (Units : String := "<Image>") is
Elt : Ap.Element := Cu.Parent_Compilation_Unit (Apc.Resolve (Units));
procedure Traverse is new Ap.Depth_First_Traversal
(State_Record => Boolean,
Pre_Operation => Enums,
Post_Operation => Nothing);
State : Boolean;
begin
Traverse (Root_Element => Elt,
State => State,
Major_Elements_Only => True);
end Locate_Enumeration_Types;
procedure Locate_Enumeration_Representations
(Units : String := "<Images>") is
Elt : Ap.Element := Cu.Parent_Compilation_Unit (Apc.Resolve (Units));
procedure Traverse is new Ap.Depth_First_Traversal
(State_Record => Boolean,
Pre_Operation => Representations,
Post_Operation => Nothing);
State : Boolean;
begin
Traverse (Root_Element => Elt,
State => State,
Major_Elements_Only => True);
end Locate_Enumeration_Representations;
end Analyzer;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=22 rec1=00 rec2=01 rec3=02c
[0x01] rec0=16 rec1=00 rec2=04 rec3=028
[0x02] rec0=1c rec1=00 rec2=02 rec3=014
[0x03] rec0=0e rec1=00 rec2=03 rec3=000
tail 0x21532292284eb76f0c668 0x42a00088462060003