DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦b79c942df⟧ TextFile

    Length: 1561 (0x619)
    Types: TextFile
    Names: »B«

Derivation

└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Object, Binary, Message, More_Value, Argument, Scanner, Text_Io;
package body Value is

    type Node_Structure is
        record  
            Rule : Natural range 0 .. 1 := 0;
            Bin : Binary.Node := Binary.Empty_Node;
            More : More_Value.Node := More_Value.Empty_Node;
            Mess : Message.List;
            Args : Argument.List;
        end record;

    procedure Parse (N : in out Node; Error : out Boolean) is
        Failed : Boolean := False;  
        use Scanner;
    begin  
        Text_Io.Put_Line ("I am in value.parse");
        N := new Node_Structure;
        Binary.Parse (N.Bin, Failed);
        if not Failed and More_Value.Is_First (Scanner.Get_Token) then  
            N.Rule := 1;
            More_Value.Parse (N.More, Failed);
        end if;
        Error := Failed;
    end Parse;

    function Interpret (N : Node) return Object.Reference is
        Obj, Result : Object.Reference;
    begin  
        Text_Io.Put_Line ("I am in value.interpret");
        case N.Rule is
            when 0 =>
                Result := Binary.Interpret (N.Bin);
            when 1 =>
                Obj := Binary.Interpret (N.Bin);
                Message.Init (N.Mess);  
                Argument.Init (N.Args);
                More_Value.Interpret (N.More, N.Mess, N.Args);
                Text_Io.Put_Line ("value.interpret send a message to");
                Object.En_Texte (Obj);
                Result := Message.Send (Obj, N.Mess, N.Args);
        end case;
        return Result;
    end Interpret;
end Value;