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

⟦9b856517b⟧ Ada Source

    Length: 12288 (0x3000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Interpreter, seg_037d88

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 Custom;
with Object;
with Errors;

package body Interpreter is

    procedure Go (The_Root : Statements.Node; Terminal : String) is
        Result_Object : Object.Reference := Object.Void_Reference;
    begin
        Result_Object := Statements.Interpret (The_Root);

    exception

        when Errors.Affectation_To_Predefined_Id =>
            Errors.Interpret_Log
               ("Attempt to change the value of a predefined identifier !",
                Terminal);

        when Errors.Block_Argument_Required_For_Boolean =>
            Errors.Interpret_Log
               ("Expecting a block object as an argument, in a message sent to a boolean object !",
                Terminal);

        when Errors.Block_Argument_Required_For_Integer =>
            Errors.Interpret_Log
               ("Expecting a block object as an argument, in a message sent to an integer object !",
                Terminal);

        when Errors.Block_Argument_Required_For_Tantque_Msg =>
            Errors.Interpret_Log
               ("Expecting a block object as argument of the 'TantQueVrai' or 'TantQueFaux' message !",
                Terminal);

        when Errors.Bloc_Msg_With_Not_Enough_Arguments =>
            Errors.Interpret_Log
               ("A message is sent to a block with not enough arguments specified !",
                Terminal);

        when Errors.Bloc_Msg_With_Too_Many_Arguments =>
            Errors.Interpret_Log
               ("A message is sent to a block with too many arguments specified !",
                Terminal);

        when Errors.Boolean_Object_Required_As_Argument =>
            Errors.Interpret_Log
               ("Expecting a boolean object as argument of a message !",
                Terminal);

        when Errors.Division_By_Zero =>
            Errors.Interpret_Log
               ("Attempting to make an integer division by Zero !!!", Terminal);

        when Errors.Get_Value_Of_Undefined_Identifier =>
            Errors.Interpret_Log
               ("Trying to get the value of an undeclared identifier  !",
                Terminal);

        when Errors.Inconsistent_Msg_Selector_For_Block =>
            Errors.Interpret_Log
               ("Inconsistent message sent to a block !  (check the arguments names...)",
                Terminal);

        when Errors.Integer_Object_Required_As_Argument =>
            Errors.Interpret_Log
               ("Expecting an integer object as argument in a message !",
                Terminal);

        when Errors.Integer_Required_As_Argument_For_Pen =>
            Errors.Interpret_Log
               ("Expecting an integer object as argument in a message for a pen !",
                Terminal);

        when Errors.Integer_Required_As_Argument_For_Turtle =>
            Errors.Interpret_Log
               ("Expecting an integer object as argument in a message for a turtle !",
                Terminal);

        when Errors.Max_Block_Number_Exceeded =>
            Errors.Interpret_Log
               ("The maximum number of blocks (" &
                Natural'Image (Custom.Block_Max_Number) &
                " ) was exceeded ! Cannot create the block object...",
                Terminal);

        when Errors.Max_Pen_Number_Exceeded =>
            Errors.Interpret_Log
               ("The maximum number of pens (" &
                Natural'Image (Custom.Pen_Max_Number) &
                " ) was exceeded ! Cannot create the pen object...", Terminal);

        when Errors.Max_String_Number_Exceeded =>
            Errors.Interpret_Log
               ("The maximum number of strings (" &
                Natural'Image (Custom.String_Max_Number) &
                " ) was exceeded ! Cannot create the string object...",
                Terminal);

        when Errors.Max_Turtle_Number_Exceeded =>
            Errors.Interpret_Log
               ("The maximum number of turtles (" &
                Natural'Image (Custom.Turtle_Max_Number) &
                " ) was exceeded ! Cannot create the turtle object...",
                Terminal);

        when Errors.Message_Sent_To_Empty_Object =>
            Errors.Interpret_Log
               ("A message was sent to the empty object !", Terminal);

        when Errors.Multiply_Defined_Argument =>
            Errors.Interpret_Log
               ("A block argument was multiply defined ! Check the arguments list declaration...",
                Terminal);

        when Errors.Set_Value_To_Undefined_Identifier =>
            Errors.Interpret_Log
               ("Trying to modify the value of an undeclared identifier !",
                Terminal);

        when Errors.Several_Arguments_With_Same_Name =>
            Errors.Interpret_Log
               ("Several block arguments were defined with the same name ! Check the arguments list declaration...",
                Terminal);

        when Errors.String_Object_Required_As_Argument =>
            Errors.Interpret_Log
               ("Expecting a string object as argument of a message !",
                Terminal);

        when Errors.String_Required_As_Argument_For_Pen =>
            Errors.Interpret_Log
               ("Expecting an string object as argument in a message for a pen !",
                Terminal);

        when Errors.Tantque_Msg_To_Non_Boolean_Block =>
            Errors.Interpret_Log
               ("The 'TantQueVrai' or 'TantQueFaux' message must be sent to a block object only !",
                Terminal);

        when Errors.Target_String_Is_Too_Long =>
            Errors.Interpret_Log
               ("Trying to append 2 strings : the result string will be too long !  ( Max =" &
                Natural'Image (Custom.String_Max_Length) & ")",
                Terminal);

        when Errors.Unary_Message_To_Block_With_Arguments =>
            Errors.Interpret_Log
               ("Sending a unary message to a block which needs arguments !",
                Terminal);

        when Errors.Undefined_Message_For_Block =>
            Errors.Interpret_Log
               ("Block objects understand no message of this kind (binary messages) !",
                Terminal);

        when Errors.Undefined_Message_For_Pen =>
            Errors.Interpret_Log
               ("pen objects understand no message of this kind (binary messages) !",
                Terminal);

        when Errors.Undefined_Message_For_String =>
            Errors.Interpret_Log
               ("String objects understand no message of this kind (keywords messages) !",
                Terminal);

        when Errors.Undefined_Message_For_Turtle =>
            Errors.Interpret_Log
               ("turtle objects understand no message of this kind (binary messages) !",
                Terminal);

        when Errors.Unknown_Message_For_Block =>
            Errors.Interpret_Log
               ("Sending an unknown message to a block object !", Terminal);

        when Errors.Unknown_Message_For_Boolean =>
            Errors.Interpret_Log
               ("Sending an unknown message to a boolean object !", Terminal);

        when Errors.Unknown_Message_For_Integer =>
            Errors.Interpret_Log
               ("Sending an unknown message to an integer object !", Terminal);

        when Errors.Unknown_Message_For_Pen =>
            Errors.Interpret_Log
               ("Sending an unknown message to a pen object !", Terminal);

        when Errors.Unknown_Message_For_String =>
            Errors.Interpret_Log
               ("Sending an unknown message to an string object !", Terminal);

        when Errors.Unknown_Message_For_Turtle =>
            Errors.Interpret_Log
               ("Sending an unknown message to a turtle object !", Terminal);

    end Go;

end Interpreter;



E3 Meta Data

    nblk1=b
    nid=9
    hdr6=10
        [0x00] rec0=1e rec1=00 rec2=01 rec3=050
        [0x01] rec0=18 rec1=00 rec2=07 rec3=036
        [0x02] rec0=17 rec1=00 rec2=05 rec3=01c
        [0x03] rec0=18 rec1=00 rec2=0b rec3=02c
        [0x04] rec0=16 rec1=00 rec2=03 rec3=024
        [0x05] rec0=18 rec1=00 rec2=08 rec3=024
        [0x06] rec0=18 rec1=00 rec2=06 rec3=05c
        [0x07] rec0=1e rec1=00 rec2=02 rec3=000
        [0x08] rec0=02 rec1=00 rec2=04 rec3=01a
        [0x09] rec0=16 rec1=00 rec2=07 rec3=044
        [0x0a] rec0=0d rec1=00 rec2=05 rec3=000
    tail 0x2153120fe84e58af13653 0x42a00088462060003
Free Block Chain:
  0x9: 0000  00 04 03 fc 80 16 72 65 64 5f 46 6f 72 5f 54 61  ┆      red_For_Ta┆
  0x4: 0000  00 0a 00 1f 80 09 65 72 6d 69 6e 61 6c 29 3b 09  ┆      erminal); ┆
  0xa: 0000  00 00 00 05 80 02 6d 69 02 6e 74 71 75 65 5f 4d  ┆      mi ntque_M┆