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

⟦756e32dda⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Generic_Expression, seg_04a2f4, seg_04a8e3, seg_04b332

Derivation

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

E3 Source Code



with Alias;
with Output_Stream;  
with Slot;
generic  
    type User_Defined_Operators is (<>);

    with function User_Defined_Unary_Evaluate
                     (Using_Operator : User_Defined_Operators;
                      Right          : Slot.Object) return Slot.Object is <>;
    with function User_Defined_Binary_Evaluate
                     (Using_Operator : User_Defined_Operators;
                      Left, Right    : Slot.Object) return Slot.Object is <>;

    with function User_Defined_Image
                     (Op : User_Defined_Operators) return String is
       User_Defined_Operators'Image;

package Generic_Expression is

    type Object is private;
    Null_Expression : constant Object;

    -- primary expression constructors

    function Value (For_Object : Slot.Object) return Object;

    function Value (For_Integer : Integer)     return Object;
    function Value (For_Boolean : Boolean)     return Object;
    function Value (For_Float : Float)         return Object;
    function Value (For_Character : Character) return Object;
    function Value (For_Duration : Duration)   return Object;
    function Value (For_String : String)       return Object;

    function Value (For_Alias : Alias.Name) return Object;

    -- user defined expression constructors

    generic
        Operator : User_Defined_Operators;
    function Unary_User_Expression (Right : Object) return Object;

    generic
        Operator : User_Defined_Operators;
    function Binary_User_Expression (Left, Right : Object) return Object;

    -- general operations

    function  Evaluate (The_Expression : Object) return Slot.Object;
    procedure Put      (The_Object : Object; Where : Output_Stream.Object);

    package System_Defined_Expression is

        function "+" (Left, Right : Object) return Object;
        function "-" (Left, Right : Object) return Object;
        function "*" (Left, Right : Object) return Object;
        function "/" (Left, Right : Object) return Object;
        function "&" (Left, Right : Object) return Object;

        function "-"   (Right : Object) return Object;
        function "abs" (Right : Object) return Object;

    end System_Defined_Expression;

    Illegal_Operation : exception;  
private

    type Sub_Classes is (Primary, Unary, Binary, Undefined);
    type Object_Structure (Sub_Class : Sub_Classes);
    type Object      is access Object_Structure;
    Null_Expression : constant Object := null;

end Generic_Expression;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=1e rec1=00 rec2=01 rec3=022
        [0x01] rec0=00 rec1=00 rec2=04 rec3=010
        [0x02] rec0=1a rec1=00 rec2=02 rec3=064
        [0x03] rec0=12 rec1=00 rec2=03 rec3=000
    tail 0x2174e9f50866e7bb08e56 0x42a00088462063c03