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

⟦9c494724b⟧ Ada Source

    Length: 13312 (0x3400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Instructions, seg_046937

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, Token_List, Erreur, Instruction_Si, Nom_De_Variable,
     Variable, Expression_Generale, Etat, Param_Afficher;
with Liste_D_Instructions, Models, Symbols, Comps_Dictionary, Verbs_Dictionary;

with Abstract_Tree, Bounded_String, Text_Io;

use Lexical, Token_List, Bounded_String;

package body Instructions is

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

    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;  
    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 :=");
                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 )");
                                    end if;
                                else
                                    Erreur.Syntaxe ("Manque ,");
                                end if;
                            else
                                Erreur.Syntaxe ("Manque ,");
                            end if;
                        else
                            Erreur.Syntaxe ("Manque (");
                        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 )");
                                end if;
                            else
                                Erreur.Syntaxe ("Manque ,");
                            end if;
                        else
                            Erreur.Syntaxe ("Manque (");
                        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 )");
                                end if;
                            else
                                Erreur.Syntaxe ("Manque ,");
                            end if;
                        else
                            Erreur.Syntaxe ("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;
                                Liste_D_Instructions.Attache
                                   (Liste,
                                    Liste_D_Instructions.Creer_Afficher (10));
                            else
                                Erreur.Syntaxe ("Manque )");
                            end if;
                        else
                            Erreur.Syntaxe ("Manque (");
                        end if;

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

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

                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=c
    nid=9
    hdr6=16
        [0x00] rec0=18 rec1=00 rec2=01 rec3=01a
        [0x01] rec0=11 rec1=00 rec2=06 rec3=032
        [0x02] rec0=16 rec1=00 rec2=04 rec3=01a
        [0x03] rec0=13 rec1=00 rec2=05 rec3=032
        [0x04] rec0=03 rec1=00 rec2=02 rec3=01e
        [0x05] rec0=11 rec1=00 rec2=0b rec3=04a
        [0x06] rec0=0e rec1=00 rec2=0a rec3=02c
        [0x07] rec0=17 rec1=00 rec2=0c rec3=032
        [0x08] rec0=16 rec1=00 rec2=07 rec3=042
        [0x09] rec0=1b rec1=00 rec2=08 rec3=036
        [0x0a] rec0=11 rec1=00 rec2=03 rec3=000
        [0x0b] rec0=0f rec1=a4 rec2=f6 rec3=50a
    tail 0x21543436886515fce1ea1 0x42a00088462060003
Free Block Chain:
  0x9: 0000  00 00 00 2c 80 04 6b 65 6e 3b 04 00 22 20 20 20  ┆   ,  ken;  "   ┆