DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦0dec03333⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body More2_List, seg_0365f1

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Text_Io;
with Lex;
with Object;
with Bounded_String;
with String_Utilities;
with Bloc_Class;
with Error_Broadcaster;
package body More2_List is
    type Node_Structure is
        record
            Rule : Natural range 0 .. 1 := 0;
            Ident : Object.Message;
            Keyword : Object.Message;
            More2 : More2_List.Node := More2_List.Empty_Node;
        end record;

    procedure Parse (N : in out Node; Error : out Boolean) is
        Failed : Boolean := False;

    begin
        N := new Node_Structure;
        case Lex.Get_Token is

            when Lex.Key_Word =>
                Bounded_String.Copy (N.Keyword, Lex.Get_Value);
                Lex.Next_Token;
                if Lex.Token'Pos (Lex.Get_Token) /=
                   Lex.Token'Pos (Lex.Identifier) then
                    Error := Failed;
                else
                    Bounded_String.Copy (N.Ident, Lex.Get_Value);
                    Bloc_Class.Local_Put (N.Ident);
                    Lex.Next_Token;
                end if;
                if not Failed and Lex.Token'Pos (Lex.Get_Token) =
                                     Lex.Token'Pos (Lex.Key_Word) then  
                    N.Rule := 1;
                    More2_List.Parse (N.More2, Failed);
                end if;
            when others =>
                null;
        end case;
        Error := Failed;
    end Parse;
    function Is_First (T : Lex.Token) return Boolean is
        use Lex;
    begin
        return T = Lex.Key_Word;
    end Is_First;
    function Interpret (N : Node;
                        Inherited : Object.Reference := Object.Void_Reference)
                       return Object.Reference is
        Result : Object.Reference;
    begin
        case N.Rule is
            when 0 =>
                Result := Inherited;
            when 1 =>
                Result := Inherited;
                Result := More2_List.Interpret (N.More2, Result);
        end case;
        return Result;

    end Interpret;


    procedure Make_Selector (N : Node;
                             Selector : in out Object.Message;
                             Cardinality : in out Natural) is

    begin
        case N.Rule is
            when 0 =>
                Bounded_String.Append (Selector, N.Keyword);
                Cardinality := Cardinality + 1;
            when 1 =>
                Bounded_String.Append (Selector, N.Keyword);
                Cardinality := Cardinality + 1;
                Make_Selector (N.More2, Selector, Cardinality);
        end case;
    end Make_Selector;
    procedure Set_More (N : Node;
                        The_Argument : in out Object.Parameters.List) is
        Obj : Object.Reference;
    begin
        case N.Rule is
            when 0 =>  
                Object.Parameters.Get (The_Argument, Obj);
                Bloc_Class.Set (N.Ident, Obj);
            when 1 =>
                Object.Parameters.Get (The_Argument, Obj);
                Bloc_Class.Set (N.Ident, Obj);
                Set_More (N.More2, The_Argument);
        end case;
    end Set_More;

    procedure Set (N : Node; The_Argument : in out Object.Parameters.List) is
        Obj : Object.Reference;
        Selector : Object.Message;
        Cardinality : Integer := 0;
    begin
        Make_Selector (N, Selector, Cardinality);
        if String_Utilities.Equal
              (Bounded_String.Image (Object.Parameters.Selector (The_Argument)),
               Bounded_String.Image (Selector), True) then

            case N.Rule is
                when 0 =>  
                    Object.Parameters.Get (The_Argument, Obj);
                    Bloc_Class.Set (N.Ident, Obj);
                when 1 =>
                    Object.Parameters.Get (The_Argument, Obj);
                    Bloc_Class.Set (N.Ident, Obj);
                    Set_More (N.More2, The_Argument);
            end case;
        else  
            raise Error_Broadcaster.Unknown_Keyword_Message;
        end if;  
    end Set;
end More2_List;


E3 Meta Data

    nblk1=7
    nid=6
    hdr6=a
        [0x00] rec0=20 rec1=00 rec2=01 rec3=082
        [0x01] rec0=1d rec1=00 rec2=03 rec3=00e
        [0x02] rec0=1d rec1=00 rec2=04 rec3=022
        [0x03] rec0=18 rec1=00 rec2=02 rec3=064
        [0x04] rec0=09 rec1=00 rec2=07 rec3=000
        [0x05] rec0=0b rec1=00 rec2=06 rec3=000
        [0x06] rec0=1c rec1=28 rec2=00 rec3=020
    tail 0x2152fd3a084de891a14fa 0x42a00088462060003
Free Block Chain:
  0x6: 0000  00 05 01 1e 80 32 20 20 20 20 20 20 20 20 20 20  ┆     2          ┆
  0x5: 0000  00 00 00 4f 80 04 61 73 65 3b 04 00 00 00 00 00  ┆   O  ase;      ┆