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

⟦5c3468f48⟧ Ada Source

    Length: 14336 (0x3800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Instructions, seg_048657

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Lexical, Token_List, Erreur, Instruction_Si, Nom_De_Variable,
     Variable, Expression_Generale, Etat, Param_Afficher;
with Liste_D_Instructions, Models, Symbols,
     Comps_Dictionary, Verbs_Dictionary, Displays;

with Abstract_Tree, Bounded_String, Displays, Text_Io;

use Lexical, Token_List, Bounded_String;

package body Instructions is

    Instruction_First : Token_List.Object :=
       Make ((Si, Moins, Comp, Id, Detruire_Connexion, Lie_Connexion,
              Delie_Connexion, Detruire_Lien, Lie_Lien, Delie_Lien,
              Liste_Lien, Echanger_Lien, Afficher, Fin));

    Instruction_Follow : Token_List.Object :=
       Make ((Si, Comp, Id, Lie_Connexion, Delie_Connexion,
              Lie_Lien, Delie_Lien, Liste_Lien,
              Echanger_Lien, Afficher, Fin, Finsi, Finpour));

    procedure Instruction (Liste : in out Liste_D_Instructions.Object;
                           Models_Table : Models.Object;
                           Symbols_Table : Symbols.Object;
                           Comp : Comps_Dictionary.Object;
                           Dict : Verbs_Dictionary.Object) is
        Etat_Liaison : Lexical.Token;
        Nom_Var, Nom_Ext : Variable_String (32);
        Param1, Param2, Param3 : Variable_String (32);
        Operation : Token;
        Node : Abstract_Tree.Object;
        A_Display : Displays.Object;
    begin

        if Is_In (Lexical.Get_Token, Instruction_Si.First) then
            Instruction_Si.Parse (Liste, Models_Table,
                                  Symbols_Table, Comp, Dict);
        else
            if Is_In (Lexical.Get_Token, Variable.First) then
                Variable.Parse (Nom_Var, Nom_Ext);
                if Lexical.Get_Token = Affect then
                    Lexical.Next;

                    Expression_Generale.Parse
                       (Node, Models_Table, Symbols_Table);

                    Liste_D_Instructions.Attache
                       (Liste, Liste_D_Instructions.Creer_Affec
                                  (Nom_Var, Nom_Ext, Node));
                else
                    Erreur.Syntaxe ("Manque :=", Instruction_Follow);
                end if;
            else
                case Lexical.Get_Token is

                    when Echanger_Lien =>

                        Operation := Lexical.Get_Token;
                        Lexical.Next;
                        if Lexical.Get_Token = Parnto then
                            Lexical.Next;
                            Nom_De_Variable.Parse (Param1);
                            if Lexical.Get_Token = Virgul then
                                Lexical.Next;
                                Nom_De_Variable.Parse (Param2);
                                if Lexical.Get_Token = Virgul then
                                    Lexical.Next;
                                    Nom_De_Variable.Parse (Param3);
                                    if Lexical.Get_Token = Parntf then
                                        Lexical.Next;
                                        Liste_D_Instructions.Attache
                                           (Liste, Liste_D_Instructions.
                                                      Creer_Echanger_Lien
                                                      (Param1, Param2, Param3));
                                    else
                                        Erreur.Syntaxe ("Manque )",
                                                        Instruction_Follow);
                                    end if;
                                else
                                    Erreur.Syntaxe ("Manque ,",
                                                    Instruction_Follow);
                                end if;
                            else
                                Erreur.Syntaxe ("Manque ,", Instruction_Follow);
                            end if;
                        else
                            Erreur.Syntaxe ("Manque (", Instruction_Follow);
                        end if;

                    when Lie_Connexion | Delie_Connexion |
                         Lie_Lien | Delie_Lien =>

                        Operation := Lexical.Get_Token;
                        Lexical.Next;
                        if Lexical.Get_Token = Parnto then
                            Lexical.Next;
                            Nom_De_Variable.Parse (Param1);
                            if Lexical.Get_Token = Virgul then
                                Lexical.Next;
                                Nom_De_Variable.Parse (Param2);
                                if Lexical.Get_Token = Parntf then
                                    Lexical.Next;

                                    case Operation is
                                        when Lie_Connexion =>
                                            Liste_D_Instructions.Attache
                                               (Liste, Liste_D_Instructions.
                                                          Creer_Lie_Con
                                                          (Param1, Param2));
                                        when Delie_Connexion =>
                                            Liste_D_Instructions.Attache
                                               (Liste, Liste_D_Instructions.
                                                          Creer_Delie_Con
                                                          (Param1, Param2));
                                        when Lie_Lien =>
                                            Liste_D_Instructions.Attache
                                               (Liste, Liste_D_Instructions.
                                                          Creer_Lie_Lien
                                                          (Param1, Param2));
                                        when Delie_Lien =>
                                            Liste_D_Instructions.Attache
                                               (Liste, Liste_D_Instructions.
                                                          Creer_Lie_Lien
                                                          (Param1, Param2));
                                        when others =>
                                            null;
                                    end case;
                                else
                                    Erreur.Syntaxe ("Manque )",
                                                    Instruction_Follow);
                                end if;
                            else
                                Erreur.Syntaxe ("Manque ,", Instruction_Follow);
                            end if;
                        else
                            Erreur.Syntaxe ("Manque (", Instruction_Follow);
                        end if;


                    when Liste_Lien =>

                        Lexical.Next;
                        if Lexical.Get_Token = Parnto then
                            Lexical.Next;
                            Nom_De_Variable.Parse (Param1);
                            if Lexical.Get_Token = Virgul then
                                Lexical.Next;
                                Etat.Parse (Etat_Liaison);
                                if Lexical.Get_Token = Parntf then
                                    Lexical.Next;
                                    Liste_D_Instructions.Attache
                                       (Liste, Liste_D_Instructions.Creer_Liste
                                                  (Param1, Etat_Liaison));
                                else
                                    Erreur.Syntaxe ("Manque )",
                                                    Instruction_Follow);
                                end if;
                            else
                                Erreur.Syntaxe ("Manque ,", Instruction_Follow);
                            end if;
                        else
                            Erreur.Syntaxe ("Manque (", Instruction_Follow);
                        end if;


                    when Afficher =>

                        Lexical.Next;
                        if Lexical.Get_Token = Parnto then
                            Lexical.Next;
                            Displays.Create (A_Display);
                            Param_Afficher.Parse (A_Display);
                            if Lexical.Get_Token = Parntf then
                                Lexical.Next;
                                Liste_D_Instructions.Attache
                                   (Liste, Liste_D_Instructions.Creer_Afficher
                                              (A_Display));
                            else
                                Erreur.Syntaxe ("Manque )", Instruction_Follow);
                            end if;
                        else
                            Erreur.Syntaxe ("Manque (", Instruction_Follow);
                        end if;

                    when Fin =>
                        Lexical.Next;
                        Liste_D_Instructions.Attache
                           (Liste, Liste_D_Instructions.Creer_Fin);

                    when others =>
                        Erreur.Syntaxe ("Mauvaise instruction",
                                        Instruction_Follow);

                end case;
            end if;
        end if;

    end Instruction;

    procedure Parse (Liste : in out Liste_D_Instructions.Object;
                     Models_Table : Models.Object;
                     Symbols_Table : Symbols.Object;
                     Comp : Comps_Dictionary.Object;
                     Dict : Verbs_Dictionary.Object) is
    begin

        Instruction (Liste, Models_Table, Symbols_Table, Comp, Dict);
        while Is_In (Lexical.Get_Token, Instruction_First) loop
            Instruction (Liste, Models_Table, Symbols_Table, Comp, Dict);
        end loop;

    end Parse;

end Instructions;



E3 Meta Data

    nblk1=d
    nid=7
    hdr6=18
        [0x00] rec0=19 rec1=00 rec2=01 rec3=040
        [0x01] rec0=00 rec1=00 rec2=05 rec3=008
        [0x02] rec0=18 rec1=00 rec2=06 rec3=02c
        [0x03] rec0=15 rec1=00 rec2=02 rec3=052
        [0x04] rec0=11 rec1=00 rec2=04 rec3=010
        [0x05] rec0=14 rec1=00 rec2=08 rec3=090
        [0x06] rec0=04 rec1=00 rec2=03 rec3=04a
        [0x07] rec0=0e rec1=00 rec2=0a rec3=02c
        [0x08] rec0=16 rec1=00 rec2=0c rec3=030
        [0x09] rec0=11 rec1=00 rec2=0b rec3=03e
        [0x0a] rec0=18 rec1=00 rec2=09 rec3=00a
        [0x0b] rec0=1e rec1=00 rec2=0d rec3=000
        [0x0c] rec0=00 rec1=00 rec2=00 rec3=403
    tail 0x2174c8fc486597a423ea1 0x42a00088462060003
Free Block Chain:
  0x7: 0000  00 00 02 d2 80 1e 61 75 76 61 69 73 65 20 69 6e  ┆      auvaise in┆