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

⟦deec39051⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Bloc, seg_038ea2, seg_038f41

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 Lex;
with Object;
with Error_Broadcaster;
with Statements;
with Arguments;
with Bloc_Class;  
with String_Utilities;
with Bounded_String;
with Unparser;
package body Bloc is

    type Node_Structure is
        record
            Rule : Natural range 0 .. 1 := 0;
            Arg : Arguments.Node := Arguments.Empty_Node;
            State : Statements.Node := Statements.Empty_Node;
        end record;

    procedure Open (N : in out Node) is
    begin  
        Bloc_Class.Set (N);
    end Open;
    procedure Parse (N : in out Node; Error : out Boolean) is
        Failed : Boolean := False;

    begin
        N := new Node_Structure;
        if Lex.Token'Pos (Lex.Get_Token) = Lex.Token'Pos (Lex.Open_Bracket) then
            Open (N);
            N.Rule := 1;  
            Lex.Next_Token;
            Arguments.Parse (N.Arg, Failed);
            if not Failed then
                Statements.Parse (N.State, Failed);
                if not Failed then
                    if Lex.Token'Pos (Lex.Get_Token) =
                       Lex.Token'Pos (Lex.Close_Bracket) then
                        Bloc_Class.Close;
                        Lex.Next_Token;
                    else
                        raise Error_Broadcaster.Brackect_Is_Missing;
                    end if;
                end if;

            end if;
        end if;
        Error := Failed;

    end Parse;

    procedure Unparse (N : in out Node) is
    begin
        case N.Rule is
            when 0 =>
                null;
            when 1 =>
                Unparser.Put_Line ("");
                Unparser.Set_Col (4);
                Unparser.Put ("{");
                Unparser.Put_Line ("");
                Arguments.Unparse (N.Arg);
                Unparser.Put ("");
                Statements.Unparse (N.State);
                Unparser.Unset_Col (4);
                Unparser.Put ("}");



        end case;
    end Unparse;

    function Is_First (T : Lex.Token) return Boolean is
    begin
        return (Lex.Token'Pos (T) = Lex.Token'Pos (Lex.Open_Bracket));
    end Is_First;
    procedure Interpret (N : Node;
                         The_Argument : in out Object.Parameters.List;
                         Result : in out Object.Reference) is

    begin

        case N.Rule is
            when 0 =>
                Result := Statements.Interpret (N.State, Result);
            when 1 =>
                Arguments.Set (N.Arg, The_Argument);
                Result := Statements.Interpret (N.State, Result);
        end case;

    end Interpret;  
    function Interpret (N : Node; The_Argument : Object.Message)
                       return Object.Reference is

    begin

        if String_Utilities.Equal
              ("valeur", Bounded_String.Image (The_Argument), True) then
            return (Statements.Interpret (N.State));
        else
            raise Error_Broadcaster.Unknown_Unary_Message;
        end if;
    end Interpret;
end Bloc;


E3 Meta Data

    nblk1=6
    nid=6
    hdr6=a
        [0x00] rec0=23 rec1=00 rec2=01 rec3=066
        [0x01] rec0=20 rec1=00 rec2=04 rec3=000
        [0x02] rec0=07 rec1=00 rec2=02 rec3=024
        [0x03] rec0=1c rec1=00 rec2=05 rec3=068
        [0x04] rec0=05 rec1=00 rec2=03 rec3=000
        [0x05] rec0=05 rec1=00 rec2=03 rec3=000
    tail 0x21531e9a084e86c8233b4 0x42a00088462060003
Free Block Chain:
  0x6: 0000  00 00 00 13 80 10 2e 53 74 61 74 65 2c 20 46 61  ┆      .State, Fa┆