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

⟦5ebc6e3b3⟧ TextFile

    Length: 2239 (0x8bf)
    Types: TextFile
    Names: »B«

Derivation

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

TextFile

with Msg_Report;
with Object;
with Scanner;  
with Statements;  
with Unparse_Report;

package body More_Statements is
    type Node_Structure is
        record
            Rule : Natural range 0 .. 1 := 0;  
            Stat : Statements.Node := Statements.Empty_Node;
            Lign : Integer;
        end record;

    procedure Parse (N : in out Node; Error : out Boolean) is
        use Scanner;
        Failed : Boolean := False;
    begin  
        Msg_Report.Information ("I enter in more_statement's parse");

        N := new Node_Structure;
        N.Lign := Scanner.Line_Number;

        if More_Statements.Is_First (Scanner.Symbol) then  
            Scanner.Next;
            if Statements.Is_First (Scanner.Symbol) then  
                N.Rule := 1;
                Statements.Parse (N.Stat, Failed);  
            end if;
        end if;

        Msg_Report.Information
           ("I leave more_statement's parse with failed = " &
            Boolean'Image (Failed));

        Error := Failed;
    end Parse;


    procedure Unparse (N : Node) is

    begin  
        Unparse_Report.Write (".");  
        Unparse_Report.New_Line;
        if N.Rule = 1 then
            Statements.Unparse (N.Stat);
        end if;
    end Unparse;


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

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

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

        Msg_Report.Set_Line_Number (N.Lign);

        case N.Rule is
            when 0 =>
                Result := Inherited;

            when 1 =>
                Result := Statements.Interpret (N.Stat);  
        end case;

        Msg_Report.Information
           ("I leave more_statement'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_Statements;