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

⟦e1a47a8c0⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Instructions, seg_040dad

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 Lexical, Erreur, Instruction_Si, Nom_De_Variable,
     Variable, Expression_Generale, Etat, Param_Afficher;
use Lexical;

package body Instructions is


    procedure Instruction is
    begin
        case Lexical.Get_Token is

            when Si =>
                Instruction_Si.Parse;

            when Id | Comp =>
                Variable.Parse;
                if (Lexical.Get_Token = Affect) then
                    Lexical.Next;
                    Expression_Generale.Parse;
                else
                    Erreur.Parse ("Manque :=");
                end if;

            when Detruire_Connexion | Echanger_Lien =>

                Lexical.Next;
                if (Lexical.Get_Token = Parnto) then
                    Lexical.Next;
                    Nom_De_Variable.Parse;
                    if (Lexical.Get_Token = Virgul) then
                        Lexical.Next;
                        Nom_De_Variable.Parse;
                        if (Lexical.Get_Token = Virgul) then
                            Lexical.Next;
                            Nom_De_Variable.Parse;
                            if (Lexical.Get_Token = Parntf) then
                                Lexical.Next;
                            else
                                Erreur.Parse ("Manque )");
                            end if;
                        else
                            Erreur.Parse ("Manque ,");
                        end if;
                    else
                        Erreur.Parse ("Manque ,");
                    end if;
                else
                    Erreur.Parse ("Manque (");
                end if;

            when Lie_Connexion | Delie_Connexion |
                 Detruire_Lien | Lie_Lien | Delie_Lien =>

                Lexical.Next;
                if (Lexical.Get_Token = Parnto) then
                    Lexical.Next;
                    Nom_De_Variable.Parse;
                    if (Lexical.Get_Token = Virgul) then
                        Lexical.Next;
                        Nom_De_Variable.Parse;
                        if (Lexical.Get_Token = Parntf) then
                            Lexical.Next;
                        else
                            Erreur.Parse ("Manque )");
                        end if;
                    else
                        Erreur.Parse ("Manque ,");
                    end if;
                else
                    Erreur.Parse ("Manque (");
                end if;


            when Liste_Lien =>
                Lexical.Next;
                if (Lexical.Get_Token = Parnto) then
                    Lexical.Next;
                    Nom_De_Variable.Parse;
                    if (Lexical.Get_Token = Virgul) then
                        Lexical.Next;
                        Etat.Parse;
                        if (Lexical.Get_Token = Parntf) then
                            Lexical.Next;
                        else
                            Erreur.Parse ("Manque )");
                        end if;
                    else
                        Erreur.Parse ("Manque ,");
                    end if;
                else
                    Erreur.Parse ("Manque (");
                end if;


            when Afficher =>
                Lexical.Next;
                if (Lexical.Get_Token = Parnto) then
                    Lexical.Next;
                    Param_Afficher.Parse;
                    if (Lexical.Get_Token = Parntf) then
                        Lexical.Next;
                    else
                        Erreur.Parse ("Manque )");
                    end if;
                else
                    Erreur.Parse ("Manque (");
                end if;

            when Fin =>
                Lexical.Next;


            when others =>
                Erreur.Parse ("Mauvaise instruction");
        end case;

    end Instruction;


    function Is_In_First (T : Token) return Boolean is
    begin
        case T is

            when Si | Id | Comp | Detruire_Connexion | Lie_Connexion |
                 Delie_Connexion | Detruire_Lien | Lie_Lien | Delie_Lien |
                 Liste_Lien | Echanger_Lien | Afficher | Fin =>
                return True;

            when others =>
                return False;

        end case;
    end Is_In_First;


    procedure Parse is
    begin

        Instruction;

        while (Is_In_First (Lexical.Get_Token)) loop

            Instruction;

        end loop;

    end Parse;

end Instructions;



E3 Meta Data

    nblk1=5
    nid=0
    hdr6=a
        [0x00] rec0=22 rec1=00 rec2=01 rec3=010
        [0x01] rec0=18 rec1=00 rec2=02 rec3=054
        [0x02] rec0=1a rec1=00 rec2=03 rec3=032
        [0x03] rec0=20 rec1=00 rec2=04 rec3=008
        [0x04] rec0=25 rec1=00 rec2=05 rec3=001
    tail 0x2153b8698861262216e59 0x42a00088462060003