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

⟦2870917f6⟧ TextFile

    Length: 2310 (0x906)
    Types: TextFile
    Names: »B«

Derivation

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

TextFile

with Lex, Error, Binary_Tree;
with If_Struct, Case_Structure, While_Structure,
     Action, Affect, Call_Sub_Routine;
with Debug;
package body Description is

    procedure Parse (N : in out Binary_Tree.Node; Success : in out Boolean) is
        N1 : Binary_Tree.Node;
    begin  
        Success := True;
        N1 := new Binary_Tree.Node_Structure;
        N1.The_Type := Binary_Tree.Description_Type;
        case Lex.Get is
            when Lex.Si =>
                If_Struct.Parse (N1.Right_Son, Success);
            when Lex.Selon =>
                Case_Structure.Parse (N1.Right_Son, Success);
            when Lex.Tant =>
                While_Structure.Parse (N1.Right_Son, Success);
            when Lex.Attendre | Lex.Pour | Lex.Puis | Lex.Au =>
                Action.Parse (N1.Right_Son, Success);
            when Lex.Identifier =>
                Affect.Parse (N1.Right_Son, Success);
            when Lex.Executer =>
                Call_Sub_Routine.Parse (N1.Right_Son, Success);
            when others =>
                Error.Append (35);  
                Success := False;
        end case;
        N := N1;
    end Parse;


    procedure Generate (N : Binary_Tree.Node; T : in out Natural) is
    begin
        Debug.Put (4);
        if not Binary_Tree."=" (N.Right_Son, null) then
            case N.Right_Son.The_Type is
                when Binary_Tree.Null_Type =>
                    Generate (N.Right_Son, T);
                when Binary_Tree.Si_Type =>
                    If_Struct.Generate (N.Right_Son, T);
                when Binary_Tree.Selon_Type =>
                    Case_Structure.Generate (N.Right_Son, T);
                when Binary_Tree.Tant_Que_Type =>
                    While_Structure.Generate (N.Right_Son, T);
                when Binary_Tree.Attendre_Type | Binary_Tree.Pour_Type |
                     Binary_Tree.Puis_Type | Binary_Tree.Autemps_Type =>
                    Action.Generate (N.Right_Son, T);
                when Binary_Tree.Affect_Type =>
                    Affect.Generate (N.Right_Son);
                when Binary_Tree.Executer_Type =>
                    Call_Sub_Routine.Generate (N.Right_Son, T);
                when others =>
                    null;
            end case;
        end if;
    end Generate;

end Description;