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: ┃ T V

⟦5839db04e⟧ TextFile

    Length: 1796 (0x704)
    Types: TextFile
    Names: »V«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦e24fb53b7⟧ 
            └─⟦this⟧ 

TextFile

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

    with function User_Defined_Evaluate
                     (Using_Operator : User_Defined_Operators;
                      Left, Right    : Integer) return Integer 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_Integer : Integer)  return Object;
    function Value (For_Alias : Alias.Name) return Object;

    -- user defined expression constructors

    generic
        Operator : User_Defined_Operators;
    function Unary_User_Expression (Using_Value : 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 Integer;
    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 "abs" (Using_Value : 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;