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

⟦ea0e4951f⟧ TextFile

    Length: 1723 (0x6bb)
    Types: TextFile
    Names: »B«

Derivation

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

TextFile

with Lex, Error, Debug, Symbol;
with Body_Description, Value, Description_List;
package body Case_List is

    procedure Parse (N : in out Binary_Tree.Node; Success : in out Boolean) is
        N1 : Binary_Tree.Node;
        N2 : Binary_Tree.Node;
        Ok : Boolean := True;
    begin  
        Success := True;
        N1 := new Binary_Tree.Node_Structure;
        N2 := new Binary_Tree.Node_Structure;
        N1.Left_Son := N2;
        N2.The_Type := Binary_Tree.L_Case_Type;
        Value.Parse (N2.Left_Son, Ok);
        Success := Success and Ok;
        if Lex.Current_Token_Is (Lex.Faire) then
            Debug.Put (270);
            Lex.Next;
            Body_Description.Parse (N2.Right_Son, Ok);
            Success := Success and Ok;
            if Lex.Current_Token_In ((Lex.Temps, Lex.Int, Lex.Identifier)) then
                Parse (N1.Right_Son, Ok);
                Success := Success and Ok;
            end if;
        else
            Error.Append (26);
            Success := False;
        end if;
        N := N1;
    end Parse;


    procedure Generate (N : Binary_Tree.Node; T : in out Natural; S : String) is
        N1 : Binary_Tree.Node;  
        Ok : Boolean := True;
        The_Var_Type : Symbol.Symbol_Type;
        The_Value, Value1 : Natural;
    begin
        N1 := N;
        loop
            Symbol.Get_Variable (S, The_Var_Type, The_Value, Ok);
            Value.Generate (N1.Left_Son.Left_Son, Value1);
            if Value1 = The_Value then
                Body_Description.Generate (N1.Left_Son.Right_Son, T);
            end if;  
            exit when Binary_Tree."=" (N1.Right_Son, null);
            N1 := N1.Right_Son;
        end loop;
    end Generate;

end Case_List;