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

⟦0e052e9dd⟧ Ada Source

    Length: 18432 (0x4800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Parse, seg_0379a5

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 Lex;
with Text_Io;
package body Parse is

    procedure Body_Description;
    procedure Description_List;

    procedure Error is
    begin
        Text_Io.Put ("Error ...");
        Text_Io.Put_Line (" ");
    end Error;


    procedure Value is
    begin
        case Lex.Get is
            when Lex.Identifier =>
                Lex.Next;
            when Lex.Int =>
                Lex.Next;  
            when Lex.Hour =>
                Lex.Next;
            when others =>
                Error;
        end case;
    end Value;


    procedure Factor;


    procedure Term is
    begin
        Factor;
        while Lex.Current_Token_Is (Lex.Multiply) loop
            Lex.Next;
            Factor;
        end loop;
    end Term;


    procedure Expression is  
        use Lex;
    begin
        Term;
        while (Lex.Current_Token_In ((Lex.Plus, Lex.Minus))) loop
            case Lex.Get is
                when Lex.Plus =>
                    Lex.Next;
                    Term;
                when Lex.Minus =>
                    Lex.Next;
                    Term;  
                when others =>
                    Error;
            end case;
        end loop;  
    end Expression;



    procedure Factor is
    begin  
        if Lex.Current_Token_Is (Lex.Open_Bracket) then
            Lex.Next;
            Expression;
            if Lex.Current_Token_Is (Lex.Close_Bracket) then
                Lex.Next;
            else
                Error;
            end if;
        else
            Value;
        end if;
    end Factor;

    procedure Relational_Operator is
    begin  
        if Lex.Current_Token_In ((Lex.Less_Than, Lex.Greater_Than,
                                  Lex.Less_Or_Equal, Lex.Greater_Or_Equal,
                                  Lex.Equal, Lex.Not_Equal)) then
            Lex.Next;
        else
            Error;
        end if;
    end Relational_Operator;

    procedure Condition is
    begin
        Value;
        Relational_Operator;
        Value;
    end Condition;

    procedure Liste_Value is
    begin
        Value;
        if Lex.Current_Token_In ((Lex.Temps, Lex.Int, Lex.Identifier)) then
            Liste_Value;
        end if;
    end Liste_Value;

    procedure Call_Sub_Routine is
    begin
        if Lex.Current_Token_Is (Lex.Executer) then
            Lex.Next;
            if Lex.Current_Token_Is (Lex.Identifier) then
                Lex.Next;
                if Lex.Current_Token_Is (Lex.Avec) then
                    Lex.Next;
                    if Lex.Current_Token_Is (Lex.Open_Bracket) then
                        Lex.Next;
                        Liste_Value;
                        if Lex.Current_Token_Is (Lex.Close_Bracket) then
                            Lex.Next;
                        else
                            Error;
                        end if;
                    else
                        Error;
                    end if;
                end if;
            else
                Error;
            end if;
        end if;
    end Call_Sub_Routine;

    procedure Affect is
    begin
        if Lex.Current_Token_Is (Lex.Identifier) then
            Lex.Next;
            if Lex.Current_Token_Is (Lex.Let) then
                Lex.Next;
                Expression;
            else
                Error;
            end if;  
        else
            Error;
        end if;
    end Affect;

    procedure Primitives is
    begin
        case Lex.Get is
            when Lex.Activer =>
                Lex.Next;
                if Lex.Current_Token_Is (Lex.Identifier) then
                    Lex.Next;
                else
                    Error;
                end if;
            when Lex.Desactiver =>
                Lex.Next;
                if Lex.Current_Token_Is (Lex.Identifier) then
                    Lex.Next;
                else
                    Error;
                end if;
            when Lex.Fixer =>  
                Lex.Next;
                if Lex.Current_Token_Is (Lex.Identifier) then
                    Lex.Next;
                    if Lex.Current_Token_Is (Lex.A) then
                        Lex.Next;
                        Value;
                    else
                        Error;
                    end if;
                end if;  
            when Lex.Evoluer =>
                Lex.Next;
                if Lex.Current_Token_Is (Lex.Identifier) then
                    Lex.Next;
                    if Lex.Current_Token_Is (Lex.En) then
                        Lex.Next;
                        Value;
                        if Lex.Current_Token_Is (Lex.A) then
                            Lex.Next;
                            Value;
                        end if;  
                    else
                        Error;
                    end if;  
                else
                    Error;
                end if;
            when others =>
                Error;
        end case;
    end Primitives;

    procedure Primitives_List is
    begin
        Primitives;
        if Lex.Current_Token_In ((Lex.Activer, Lex.Desactiver,
                                  Lex.Fixer, Lex.Evoluer)) then
            Primitives_List;
        end if;
    end Primitives_List;

    procedure Action is
    begin  
        case Lex.Get is
            when Lex.Attendre =>
                Lex.Next;
                if Lex.Current_Token_Is (Lex.Identifier) then
                    Lex.Next;
                end if;  
            when Lex.Pour =>
                Lex.Next;
                if Lex.Current_Token_Is (Lex.Identifier) then
                    Lex.Next;
                    if Lex.Current_Token_Is (Lex.Faire) then
                        Lex.Next;
                        if Lex.Current_Token_Is (Lex.Open_Bracket) then
                            Lex.Next;
                            Primitives_List;
                            if Lex.Current_Token_Is (Lex.Close_Bracket) then
                                Lex.Next;
                            else
                                Error;
                            end if;  
                        else
                            Error;
                        end if;  
                    else
                        Lex.Next;
                        Primitives;
                    end if;
                end if;  
            when Lex.Puis =>
                Lex.Next;
                Body_Description;
            when Lex.Au =>
                if Lex.Current_Token_Is (Lex.Temps) then
                    Lex.Next;
                    Value;
                    if Lex.Current_Token_Is (Lex.Faire) then
                        Lex.Next;
                        Description_List;
                    else
                        Error;
                    end if;  
                else
                    Error;
                end if;  
            when others =>
                Error;
        end case;
    end Action;

    procedure While_Structure is
    begin
        if Lex.Current_Token_Is (Lex.Tant) then
            Lex.Next;
            if Lex.Current_Token_Is (Lex.Que) then
                Lex.Next;
                Condition;
                if Lex.Current_Token_Is (Lex.Faire) then
                    Lex.Next;
                    Description_List;
                    if Lex.Current_Token_Is (Lex.Fin) then
                        Lex.Next;
                        if Lex.Current_Token_Is (Lex.Tant) then
                            Lex.Next;
                            if Lex.Current_Token_Is (Lex.Que) then
                                Lex.Next;
                            else
                                Error;
                            end if;  
                        else
                            Error;
                        end if;  
                    else
                        Error;
                    end if;
                else
                    Error;
                end if;  
            else
                Error;
            end if;  
        end if;
    end While_Structure;

    procedure Case_List is
    begin
        Value;
        if Lex.Current_Token_Is (Lex.Faire) then
            Lex.Next;
            Body_Description;
            if Lex.Current_Token_In ((Lex.Temps, Lex.Int, Lex.Identifier)) then
                Case_List;
            end if;  
        else
            Error;
        end if;
    end Case_List;

    procedure Case_Structure is
    begin
        if Lex.Current_Token_Is (Lex.Selon) then
            Lex.Next;
            if Lex.Current_Token_Is (Lex.Identifier) then
                Lex.Next;
                if Lex.Current_Token_Is (Lex.Est) then
                    Lex.Next;
                    Case_List;
                    if Lex.Current_Token_Is (Lex.Fin) then
                        Lex.Next;
                        if Lex.Current_Token_Is (Lex.Selon) then
                            Lex.Next;
                        else
                            Error;
                        end if;  
                    else
                        Error;
                    end if;  
                else
                    Error;
                end if;  
            else
                Error;
            end if;
        end if;
    end Case_Structure;


    procedure Liste is
    begin
        while not Lex.Current_Token_Is (Lex.End_Bracket) loop
            Affect;
        end loop;
    end Liste;

    procedure Body_Description is
    begin
        if Lex.Current_Token_Is (Lex.Begin_Bracket) then
            Lex.Next;
            Description_List;
            if Lex.Current_Token_Is (Lex.End_Bracket) then
                Lex.Next;
            else
                Error;
            end if;
        end if;
    end Body_Description;

    procedure Description_List is
    begin
        Body_Description;
        if Lex.Current_Token_In ((Lex.Si, Lex.Selon, Lex.Tant,
                                  Lex.Attendre, Lex.Pour, Lex.Puis, Lex.Au,
                                  Lex.Identifier, Lex.Executer)) then
            Lex.Next;
            Description_List;
        end if;
    end Description_List;

    procedure If_Struct is
    begin
        if Lex.Current_Token_Is (Lex.Si) then
            Lex.Next;
            Condition;
            if Lex.Current_Token_Is (Lex.Alors) then
                Lex.Next;
                Description_List;
                if Lex.Current_Token_Is (Lex.Sinon) then
                    Description_List;
                    if Lex.Current_Token_Is (Lex.Fin) then
                        Lex.Next;
                        if Lex.Current_Token_Is (Lex.Si) then
                            Lex.Next;
                        else
                            Error;
                        end if;
                    else
                        Error;
                    end if;
                else
                    Error;
                end if;
            end if;
        end if;
    end If_Struct;


    procedure Control_Struct is
    begin
        case Lex.Get is
            when Lex.Si =>
                If_Struct;
            when Lex.Selon =>
                Case_Structure;
            when Lex.Tant =>
                While_Structure;
            when Lex.Attendre | Lex.Pour | Lex.Puis | Lex.Au =>
                Action;
            when Lex.Identifier =>
                Affect;
            when Lex.Executer =>
                Call_Sub_Routine;
            when others =>
                Error;
        end case;
    end Control_Struct;

    procedure Spectacle_Definition is
    begin
        Body_Description;
    end Spectacle_Definition;


    procedure List_Identifier is
    begin
        Lex.Next;
        if Lex.Current_Token_Is (Lex.Identifier) then
            List_Identifier;
        end if;
    end List_Identifier;


    procedure Parameter is
    begin
        if Lex.Current_Token_Is (Lex.Qui) then
            Lex.Next;
            if Lex.Current_Token_Is (Lex.Utilise) then
                Lex.Next;
            end if;
        end if;
    end Parameter;

    procedure Sub_Routine_Definition is
    begin
        if Lex.Current_Token_Is (Lex.Identifier) then
            Lex.Next;
            Parameter;
            if Lex.Current_Token_Is (Lex.Est) then
                Lex.Next;
                Body_Description;
                if Lex.Current_Token_Is (Lex.Identifier) then
                    Sub_Routine_Definition;
                end if;
            else
                Error;
            end if;
        end if;
    end Sub_Routine_Definition;


    procedure Spectacle_Description is
    begin
        Sub_Routine_Definition;
        Spectacle_Definition;
    end Spectacle_Description;


    procedure Address is
    begin
        if Lex.Current_Token_Is (Lex.Int) then
            Lex.Next;
        end if;
        if Lex.Current_Token_Is (Lex.Based) then
            Lex.Next;
        end if;
    end Address;

    procedure Theater_Description is
    begin
        if Lex.Current_Token_Is (Lex.Int) then
            Lex.Next;
            if Lex.Current_Token_Is (Lex.Est) then
                Lex.Next;
                if Lex.Current_Token_Is (Lex.Int) then
                    Lex.Next;
                    if Lex.Current_Token_Is (Lex.En) then
                        Lex.Next;
                        Address;
                        if Lex.Current_Token_Is (Lex.Int) then
                            Theater_Description;
                        end if;
                    else
                        Error;
                    end if;
                else
                    Error;
                end if;
            else
                Error;
            end if;
        end if;
    end Theater_Description;


    procedure Actor_Type is
    begin
        case Lex.Get is
            when Lex.Binaire =>
                Lex.Next;
            when Lex.Fugitif =>
                Lex.Next;
            when Lex.Discret =>
                Lex.Next;
            when Lex.Temporel =>
                Lex.Next;
            when others =>
                Error;
        end case;
    end Actor_Type;

    procedure Actor_List is
    begin
        if Lex.Current_Token_Is (Lex.Int) then
            Lex.Next;
            Actor_Type;
            if Lex.Current_Token_Is (Lex.Int) then
                Actor_List;
            end if;
        end if;
    end Actor_List;


    procedure Material_Description is
    begin
        if Lex.Current_Token_Is (Lex.Int) then
            Lex.Next;
            if Lex.Current_Token_Is (Lex.Sait) then
                Lex.Next;
                if Lex.Current_Token_Is (Lex.Faire) then
                    Lex.Next;
                    if Lex.Current_Token_Is (Lex.Open_Bracket) then
                        Lex.Next;
                        Actor_List;
                        if Lex.Current_Token_Is (Lex.Close_Bracket) then
                            Lex.Next;
                            if Lex.Current_Token_Is (Lex.Int) then
                                Material_Description;
                            end if;
                        else
                            Error;
                        end if;
                    else
                        Error;
                    end if;
                else
                    Error;
                end if;
            else
                Error;
            end if;
        end if;
    end Material_Description;

    procedure Shownet_File is
    begin
        case Lex.Get is
            when Lex.Materiel =>
                Material_Description;
            when Lex.Theatre =>
                Theater_Description;
            when Lex.Spectacle =>
                Spectacle_Description;
            when others =>
                Error;
        end case;
    end Shownet_File;

    procedure Start is
    begin
        Lex.Next;
        Shownet_File;
    end Start;

end Parse;

E3 Meta Data

    nblk1=11
    nid=0
    hdr6=22
        [0x00] rec0=32 rec1=00 rec2=01 rec3=00e
        [0x01] rec0=24 rec1=00 rec2=02 rec3=00c
        [0x02] rec0=21 rec1=00 rec2=03 rec3=020
        [0x03] rec0=26 rec1=00 rec2=04 rec3=024
        [0x04] rec0=1b rec1=00 rec2=05 rec3=004
        [0x05] rec0=21 rec1=00 rec2=06 rec3=036
        [0x06] rec0=19 rec1=00 rec2=07 rec3=04c
        [0x07] rec0=1d rec1=00 rec2=08 rec3=016
        [0x08] rec0=24 rec1=00 rec2=09 rec3=006
        [0x09] rec0=21 rec1=00 rec2=0a rec3=036
        [0x0a] rec0=20 rec1=00 rec2=0b rec3=030
        [0x0b] rec0=20 rec1=00 rec2=0c rec3=01a
        [0x0c] rec0=28 rec1=00 rec2=0d rec3=008
        [0x0d] rec0=24 rec1=00 rec2=0e rec3=038
        [0x0e] rec0=25 rec1=00 rec2=0f rec3=022
        [0x0f] rec0=1b rec1=00 rec2=10 rec3=042
        [0x10] rec0=23 rec1=00 rec2=11 rec3=000
    tail 0x21530e34884e54db13393 0x42a00088462060003