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

⟦431f81098⟧ TextFile

    Length: 2473 (0x9a9)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Binary;
with Message;
with Msg_Report;
with Object;
with Scanner;
with String_Utilities;  
with Unparse_Report;

package body More_Binary is
    type Node_Structure is
        record  
            Bina : Binary.Node := Binary.Empty_Node;
            Bmes : Message.Selector := Message.Void_Selector;
            Lign : Integer;
        end record;

    function Su_Capitalize (A_String : String) return String
        renames String_Utilities.Capitalize;

    procedure Parse (N : in out Node; Error : out Boolean) is
        Failed : Boolean := False;  
        use Scanner;

    begin  
        Msg_Report.Information ("I enter in more_binary's parse");

        N := new Node_Structure;

        N.Lign := Scanner.Line_Number;

        Message.Copy (N.Bmes, Scanner.Value);

        Msg_Report.Continue ("binary message is " & Message.Image (N.Bmes));

        Scanner.Next;
        if Binary.Is_First (Scanner.Symbol) then  
            Binary.Parse (N.Bina, Failed);
        else
            Msg_Report.Syntax_Error ("incorrect first for more_binary :");
            Failed := True;  
        end if;

        Msg_Report.Information ("I leave more_binary's parse with failed = " &
                                Boolean'Image (Failed));  
        Error := Failed;  
    end Parse;


    procedure Unparse (N : Node) is

    begin  
        Unparse_Report.Write (Su_Capitalize (Message.Image (N.Bmes)) & " ");
        Binary.Unparse (N.Bina);
    end Unparse;


    function Is_First (T : Scanner.Token) return Boolean is
        use Scanner;
    begin
        return T = L_Binary_Msg;
    end Is_First;

    function Interpret (N : Node;
                        Inherited : Object.Reference := Object.Void_Reference)
                       return Object.Reference is

        Result : Object.Reference;  
        A_Bin_Mess : Message.Selector := Message.Void_Selector;  
        use Object;

    begin

        Msg_Report.Information ("I enter in more_binary's interpret");

        Msg_Report.Set_Line_Number (N.Lign);

        Message.Cat (A_Bin_Mess, N.Bmes);
        Result := Binary.Interpret (N.Bina, Inherited, A_Bin_Mess);

        Msg_Report.Information
           ("I leave more_binary's interpret with result :");
        Msg_Report.Continue
           ("class = " & Object.Class'Image (Object.The_Class (Result)) &
            " ident = " & Integer'Image (Object.Identificator (Result)));

        return Result;
    end Interpret;
end More_Binary;