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

⟦4f4945929⟧ Ada Source

    Length: 45056 (0xb000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Create_Structure, seg_048446, seg_048ded

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 
└─⟦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 Text_Io;
with Nos_Listes;  
with Error;
with Afficher_Structure;
with Structure_Des_Variables;
use Structure_Des_Variables;
-- bien que pas tres propre le "use" nous permet d'eviter la reecriture de
-- "Structure_Des_Variables." devant tous les cas possibles pour le mutable
-- Element.


package body Create_Structure is

    type Pointeur_De_Chaine is access Nos_Chaines.String_Text;
    Variable_De_Recherche : Cellule;
    Une_Variable : P_Cellule;



    ---------------------------------------------------------------
    --|
    --| Initialise les divers champs d'une variable de type
    --| Element.
    --|
    --| Parametres d'entree :
    --|   Typ : nouveau type de la variable mutable Un_Element
    --|         (type Enum_Type)
    --|   Un_Element : l'element a initialiser
    --|                (type P_Element)
    --|
    ---------------------------------------------------------------
    procedure Initialise_Un_Element (Typ : Enum_Type;
                                     Un_Element : in out P_Element) is
    begin
        case Typ is
            when Communication =>
                Un_Element.Sens1.Source := null;
                Un_Element.Sens1.Destination := null;
                Nos_Chaines.Free (Un_Element.Sens1.Description_Communication);
                Liste_Etat.Free (Un_Element.Sens1.Etat_Communication);
                Un_Element.Sens2.Source := null;
                Un_Element.Sens2.Destination := null;
                Nos_Chaines.Copy
                   (Un_Element.Sens2.Description_Communication, "");
                Liste_Etat.Free (Un_Element.Sens2.Etat_Communication);
            when Compteur =>
                Un_Element.Valeur_Compteur := 0;
            when Lieu =>
                Nos_Chaines.Copy (Un_Element.Description_Lieu, "");
                Liste_Etat.Free (Un_Element.Etat_Lieu);
                Liste_Direction.Free (Un_Element.Direction_Lieu);
            when Objet =>
                Nos_Chaines.Copy (Un_Element.Description_Objet, "");
                Un_Element.Position_Objet := null;
                Liste_Etat.Free (Un_Element.Etat_Objet);
                Liste_Contenu.Free (Un_Element.Contenu_Objet);
            when Personnage =>
                Nos_Chaines.Copy (Un_Element.Description_Personnage, "");
                Un_Element.Position_Personnage := null;
                Liste_Etat.Free (Un_Element.Etat_Personnage);
                Liste_Possession.Free (Un_Element.Possession_Personnage);  
            when Preposition | Verbe =>
                Nos_Chaines.Copy (Un_Element.Signification, "");
            when others =>
                null;
        end case;
    end Initialise_Un_Element;

    ---------------------------------------------------------------
    --|
    --| Initialise les divers champs de la variable globale
    --| Une_Variable aux valeurs par defaut pour une Communication.
    --|
    ---------------------------------------------------------------
    procedure Create_Communication is
        Un_Element : P_Element;  
    begin  
        Une_Variable := new Cellule;
        Nos_Chaines.Copy (Une_Variable.Nom, "");
        Une_Variable.Type_Variable := Communication;
        Une_Variable.Existe := False;
        Un_Element := new Element (Communication);
        Initialise_Un_Element (Communication, Un_Element);
        Une_Variable.Specif := Un_Element;
        Une_Variable.Complet := False;
    end Create_Communication;

    ---------------------------------------------------------------
    --|
    --| Initialise les divers champs de la variable globale
    --| Une_Variable aux valeurs par defaut pour un Compteur.
    --|
    ---------------------------------------------------------------
    procedure Create_Compteur is
        Un_Element : P_Element;
    begin
        Une_Variable := new Cellule;
        Nos_Chaines.Copy (Une_Variable.Nom, "");
        Une_Variable.Type_Variable := Compteur;
        Une_Variable.Existe := False;
        Un_Element := new Element (Compteur);
        Initialise_Un_Element (Compteur, Un_Element);
        Une_Variable.Specif := Un_Element;
        Une_Variable.Complet := False;
    end Create_Compteur;

    ---------------------------------------------------------------
    --|
    --| Initialise les divers champs de la variable globale
    --| Une_Variable aux valeurs par defaut pour un Lieu.
    --|
    ---------------------------------------------------------------
    procedure Create_Lieu is
        Un_Element : Structure_Des_Variables.P_Element;
    begin
        Une_Variable := new Cellule;
        Nos_Chaines.Copy (Une_Variable.Nom, "");
        Une_Variable.Type_Variable := Lieu;
        Une_Variable.Existe := False;
        Un_Element := new Element (Lieu);
        Initialise_Un_Element (Lieu, Un_Element);
        Une_Variable.Specif := Un_Element;
        Une_Variable.Complet := False;
    end Create_Lieu;

    ---------------------------------------------------------------
    --|
    --| Initialise les divers champs de la variable globale
    --| Une_Variable aux valeurs par defaut pour un Objet.
    --|
    ---------------------------------------------------------------
    procedure Create_Objet is
        Un_Element : P_Element;
    begin
        Une_Variable := new Cellule;
        Nos_Chaines.Copy (Une_Variable.Nom, "");
        Une_Variable.Type_Variable := Objet;
        Une_Variable.Existe := False;
        Un_Element := new Element (Objet);
        Initialise_Un_Element (Objet, Un_Element);
        Une_Variable.Specif := Un_Element;
        Une_Variable.Complet := False;
    end Create_Objet;

    ---------------------------------------------------------------
    --|
    --| Initialise les divers champs de la variable globale
    --| Une_Variable aux valeurs par defaut pour un Personnage.
    --|
    ---------------------------------------------------------------
    procedure Create_Personnage is
        Un_Element : P_Element;
    begin
        Une_Variable := new Cellule;
        Nos_Chaines.Copy (Une_Variable.Nom, "");
        Une_Variable.Type_Variable := Personnage;
        Une_Variable.Existe := False;
        Un_Element := new Element (Personnage);
        Initialise_Un_Element (Personnage, Un_Element);
        Une_Variable.Specif := Un_Element;
        Une_Variable.Complet := False;
    end Create_Personnage;

    ---------------------------------------------------------------
    --|
    --| Initialise les divers champs de la variable globale
    --| Une_Variable aux valeurs par defaut pour une Preposition.
    --|
    ---------------------------------------------------------------
    procedure Create_Preposition is
        Un_Element : P_Element;  
    begin  
        Une_Variable := new Cellule;
        Nos_Chaines.Copy (Une_Variable.Nom, "");
        Une_Variable.Type_Variable := Preposition;
        Une_Variable.Existe := False;
        Un_Element := new Element (Preposition);
        Initialise_Un_Element (Preposition, Un_Element);
        Une_Variable.Specif := Un_Element;
        Une_Variable.Complet := False;
    end Create_Preposition;

    ---------------------------------------------------------------
    --|
    --| Initialise les divers champs de la variable globale
    --| Une_variable aux valeurs par defaut pour un Verbe.
    --|
    ---------------------------------------------------------------
    procedure Create_Verbe is
        Un_Element : P_Element;
    begin
        Une_Variable := new Cellule;
        Nos_Chaines.Copy (Une_Variable.Nom, "");
        Une_Variable.Type_Variable := Verbe;
        Une_Variable.Existe := False;
        Un_Element := new Element (Verbe);
        Initialise_Un_Element (Verbe, Un_Element);
        Une_Variable.Specif := Un_Element;
        Une_Variable.Complet := False;
    end Create_Verbe;

    ---------------------------------------------------------------
    --|
    --|
    --|
    ---------------------------------------------------------------
    procedure Create_Lieu_Complementaire (Le_Nom : Nos_Chaines.String_Text) is
        Nouvelle_Variable : Cellule;
        Un_Element : P_Element;
    begin  
        Nos_Chaines.Copy (Nouvelle_Variable.Nom, Le_Nom);
        Nouvelle_Variable.Type_Variable := Lieu;
        Nouvelle_Variable.Existe := False;
        Un_Element := new Element (Lieu);
        Initialise_Un_Element (Lieu, Un_Element);
        Nouvelle_Variable.Specif := Un_Element;
        Nouvelle_Variable.Complet := False;
        Structure_Des_Variables.Add (Nouvelle_Variable);
    end Create_Lieu_Complementaire;

    ---------------------------------------------------------------
    --|
    --|
    --|
    ---------------------------------------------------------------
    procedure Create_Objet_Complementaire (Le_Nom : Nos_Chaines.String_Text) is
        Nouvelle_Variable : Structure_Des_Variables.Cellule;
        Un_Element : Structure_Des_Variables.P_Element;
    begin
        Nos_Chaines.Copy (Nouvelle_Variable.Nom, Le_Nom);
        Nouvelle_Variable.Type_Variable := Objet;
        Nouvelle_Variable.Existe := False;
        Un_Element := new Element (Objet);
        Initialise_Un_Element (Objet, Un_Element);
        Nouvelle_Variable.Specif := Un_Element;
        Nouvelle_Variable.Complet := False;
        Structure_Des_Variables.Add (Nouvelle_Variable);
    end Create_Objet_Complementaire;

    ---------------------------------------------------------------
    --|
    --|
    --|
    ---------------------------------------------------------------
    procedure Create_Communication_Complementaire
                 (Le_Nom : Nos_Chaines.String_Text) is
        Nouvelle_Variable : Structure_Des_Variables.Cellule;
        Un_Element : Structure_Des_Variables.P_Element;
    begin
        Nos_Chaines.Copy (Nouvelle_Variable.Nom, Le_Nom);
        Nouvelle_Variable.Type_Variable := Communication;
        Nouvelle_Variable.Existe := False;
        Un_Element := new Element (Communication);
        Initialise_Un_Element (Communication, Un_Element);
        Nouvelle_Variable.Specif := Un_Element;
        Nouvelle_Variable.Complet := False;
        Structure_Des_Variables.Add (Nouvelle_Variable);
    end Create_Communication_Complementaire;


    ---------------------------------------------------------------
    --|
    --| Initialise le champ nom de la variable globale
    --| Une_Variable.
    --|
    --| Parametres d'entree :
    --|   Nom_Variable : nouveau nom de la variable
    --|                  (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    procedure Associate_Nom_Variable (Nom_Variable : Nos_Chaines.String_Text) is
        Nouvelle_Chaine : Pointeur_De_Chaine;
    begin
        Nos_Chaines.Copy (Une_Variable.Nom, Nom_Variable);
    end Associate_Nom_Variable;

    ---------------------------------------------------------------
    --|
    --| Initialise le champ description de la variable globale
    --| Une_Variable (cette routine n'a aucun effet si cette
    --| variable est du type Compteur).
    --|
    --| Parametres d'entree :
    --|   La_Description : nouvelle description de la variable
    --|                    (type Nos_Chaines.String_Text)
    --|   Le_Sens : sens concerne par l'initialisation pour les
    --|             variables de type Communication
    --|             (type Enum_Sens)
    --|
    ---------------------------------------------------------------
    procedure Associate_Description (La_Description : Nos_Chaines.String_Text;
                                     Le_Sens : Enum_Sens) is
        Nouvelle_Chaine : Pointeur_De_Chaine;
    begin
        case Une_Variable.Type_Variable is
            when Communication =>
                case Le_Sens is
                    when Sens1 =>
                        Nos_Chaines.Copy
                           (Une_Variable.Specif.Sens1.Description_Communication,
                            La_Description);
                    when Sens2 =>
                        Nos_Chaines.Copy
                           (Une_Variable.Specif.Sens2.Description_Communication,
                            La_Description);
                    when others =>
                        null;
                end case;
            when Lieu =>
                Nos_Chaines.Copy
                   (Une_Variable.Specif.Description_Lieu, La_Description);
            when Objet =>
                Nos_Chaines.Copy
                   (Une_Variable.Specif.Description_Objet, La_Description);
            when Personnage =>
                Nos_Chaines.Copy
                   (Une_Variable.Specif.Description_Personnage, La_Description);
            when others =>
                null;
        end case;
    end Associate_Description;

    ---------------------------------------------------------------
    --|
    --| Initialise le champ position de la variable globale
    --| Une_Variable (cette routine n'a aucun effet si cette
    --| variable n'est pas du type Objet ou Personnage).
    --|
    --| Parametres d'entree :
    --|   La_Position : nom de la nouvelle position
    --|                 (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    procedure Associate_Position (La_Position : Nos_Chaines.String_Text) is
        Trouve : Boolean;
        La_Variable_Complementaire : Cellule;
        Le_Lieu : P_Cellule;
    begin
        Nos_Chaines.Copy (La_Variable_Complementaire.Nom, La_Position);
        Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        if not Trouve then
            Create_Lieu_Complementaire (La_Position);
            Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        end if;
        Le_Lieu := new Cellule;
        Le_Lieu.all := La_Variable_Complementaire;
        case Une_Variable.Type_Variable is
            when Objet =>
                Une_Variable.Specif.Position_Objet := Le_Lieu;
            when Personnage =>
                Une_Variable.Specif.Position_Personnage := Le_Lieu;
            when others =>
                null;
        end case;
    end Associate_Position;

    ---------------------------------------------------------------
    --|
    --| Ajoute un etat a la liste d'etats de la variable globale
    --| Une_Variable (cette routine n'a aucun effet si cette
    --| variable est du type Compteur ou Lieu).
    --|
    --| Parametres d'entree :
    --|   Le_Etat : l'etat a ajouter
    --|             (type Nos_Chaines.String_Text)
    --|   Le_Sens : sens concerne par l'operation pour les
    --|             variables de type Communication
    --|             (type Enum_Sens)
    --|
    ---------------------------------------------------------------
    procedure Associate_Etat
                 (Le_Etat : Nos_Chaines.String_Text; Le_Sens : Enum_Sens) is
        Nouvel_Etat : Pointeur_De_Chaine;
    begin  
        Nouvel_Etat := new Nos_Chaines.String_Text;
        Nos_Chaines.Copy (Nouvel_Etat.all, Le_Etat);
        case Une_Variable.Type_Variable is
            when Communication =>
                case Le_Sens is
                    when Sens1 =>
                        Liste_Etat.Add (Une_Variable.Specif.
                                        Sens1.Etat_Communication,
                                        Nouvel_Etat.all);
                    when Sens2 =>
                        Liste_Etat.Add (Une_Variable.Specif.
                                        Sens2.Etat_Communication,
                                        Nouvel_Etat.all);
                    when others =>
                        null;
                end case;
            when Lieu =>
                Liste_Etat.Add (Une_Variable.Specif.Etat_Lieu, Nouvel_Etat.all);
            when Objet =>
                Liste_Etat.Add (Une_Variable.Specif.Etat_Objet,
                                Nouvel_Etat.all);  
            when Personnage =>  
                Liste_Etat.Add (Une_Variable.Specif.Etat_Personnage,
                                Nouvel_Etat.all);
            when others =>
                null;
        end case;
    end Associate_Etat;

    ---------------------------------------------------------------
    --|
    --| Ajoute une possession a la liste de possessions de la
    --| variable globale Une_Variable (cette routine n'a aucun
    --| effet si cette variable n'est pas du type Personnage ou
    --| si l'objet en question fait deja partie des possessions
    --| du Personnage).
    --|
    --| Parametres d'entree :
    --|   La_Possession : la possession  a ajouter
    --|                   (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    procedure Associate_Possession (La_Possession : Nos_Chaines.String_Text) is
        Trouve : Boolean;
        La_Variable_Complementaire : Cellule;
        Le_Objet : P_Cellule;
    begin
        Nos_Chaines.Copy (La_Variable_Complementaire.Nom, La_Possession);
        Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        if not Trouve then
            Create_Objet_Complementaire (La_Possession);
            Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        end if;
        Le_Objet := new Cellule;
        Le_Objet.all := La_Variable_Complementaire;
        case Une_Variable.Type_Variable is
            when Personnage =>
                Liste_Possession.Add
                   (Une_Variable.Specif.Possession_Personnage, Le_Objet);
            when others =>
                null;
        end case;
    end Associate_Possession;

    ---------------------------------------------------------------
    --|
    --| Ajoute un contenu a la liste de contenus de la
    --| variable globale Une_Variable (cette routine n'a aucun
    --| effet si cette variable n'est pas du type Objet ou
    --| si le nouveau contenu fait deja partie des contenus
    --| de l'objet).
    --|
    --| Parametres d'entree :
    --|   Le_Contenu : le contenu a ajouter
    --|                (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    procedure Associate_Contenu (Le_Contenu : Nos_Chaines.String_Text) is
        Trouve : Boolean;
        La_Variable_Complementaire : Cellule;
        Le_Objet : P_Cellule;
    begin
        Nos_Chaines.Copy (La_Variable_Complementaire.Nom, Le_Contenu);
        Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        if not Trouve then
            Create_Objet_Complementaire (Le_Contenu);
            Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        end if;
        Le_Objet := new Cellule;
        Le_Objet.all := La_Variable_Complementaire;
        case Une_Variable.Type_Variable is
            when Objet =>
                Liste_Contenu.Add (Une_Variable.Specif.Contenu_Objet, Le_Objet);
            when others =>
                null;
        end case;  
    end Associate_Contenu;

    ---------------------------------------------------------------
    --|
    --| Initialise le champ source de la variable globale
    --| Une_Variable (cette routine n'a aucun effet si cette
    --| variable n'est pas du type Communication)
    --|
    --| Parametres d'entree :
    --|   La_Source : le lieu "source" de la communication
    --|               (type P_Lieu)
    --|   Le_Sens : sens concerne par l'operation pour les
    --|             variables de type Communication
    --|             (type Enum_Sens)
    --|
    ---------------------------------------------------------------
    procedure Associate_Source
                 (La_Source : Nos_Chaines.String_Text; Le_Sens : Enum_Sens) is
        Trouve : Boolean;
        La_Variable_Complementaire : Cellule;
        Le_Lieu : P_Cellule;
    begin
        Nos_Chaines.Copy (La_Variable_Complementaire.Nom, La_Source);
        Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        if not Trouve then
            Create_Lieu_Complementaire (La_Source);
            Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        end if;
        Le_Lieu := new Cellule;
        Le_Lieu.all := La_Variable_Complementaire;
        case Une_Variable.Type_Variable is
            when Communication =>
                case Le_Sens is
                    when Sens1 =>
                        Une_Variable.Specif.Sens1.Source := Le_Lieu;
                    when Sens2 =>
                        Une_Variable.Specif.Sens2.Source := Le_Lieu;
                    when others =>
                        null;
                end case;
            when others =>
                null;
        end case;
    end Associate_Source;

    ---------------------------------------------------------------
    --|
    --| Initialise le champ destination de la variable globale
    --| Une_Variable (cette routine n'a aucun effet si cette
    --| variable n'est pas du type Communication)
    --|
    --| Parametres d'entree :
    --|   La_Destination : le lieu "destination" de la communication
    --|                    (type P_Lieu)
    --|   Le_Sens : sens concerne par l'operation pour les
    --|             variables de type Communication
    --|             (type Enum_Sens)
    --|
    ---------------------------------------------------------------
    procedure Associate_Destination (La_Destination : Nos_Chaines.String_Text;
                                     Le_Sens : Enum_Sens) is
        Trouve : Boolean;
        La_Variable_Complementaire : Cellule;
        Le_Lieu : P_Cellule;
    begin
        Nos_Chaines.Copy (La_Variable_Complementaire.Nom, La_Destination);
        Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        if not Trouve then
            Create_Lieu_Complementaire (La_Destination);
            Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        end if;
        Le_Lieu := new Cellule;
        Le_Lieu.all := La_Variable_Complementaire;
        case Une_Variable.Type_Variable is
            when Communication =>
                case Le_Sens is
                    when Sens1 =>
                        Une_Variable.Specif.Sens1.Destination := Le_Lieu;
                    when Sens2 =>
                        Une_Variable.Specif.Sens2.Destination := Le_Lieu;
                    when others =>
                        null;
                end case;
            when others =>
                null;
        end case;
    end Associate_Destination;

    ---------------------------------------------------------------
    --|
    --| Ajoute une direction a la liste des directions de la
    --| variable globale Une_Variable (cette routine n'a aucun
    --| effet si cette variable n'est pas du type Lieu)
    --|
    --| Parametres d'entree :
    --|   La_direction   : le sens de cette direction
    --|                    (type Nos_Chaines.String_Text)
    --|   La_destination : le nom du lieu destination
    --|                    (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    procedure Associate_Direction
                 (La_Direction : Nos_Chaines.String_Text;
                  La_Communication : Nos_Chaines.String_Text) is
        Trouve : Boolean;  
        La_Variable_Complementaire : Cellule;
        La_Sortie : Type_Direction;
    begin
        Nos_Chaines.Copy (La_Variable_Complementaire.Nom, La_Communication);
        Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        if not Trouve then
            Create_Communication_Complementaire (La_Communication);
            Structure_Des_Variables.Find (La_Variable_Complementaire, Trouve);
        end if;
        La_Sortie.Communication := new Cellule;
        La_Sortie.Communication.all := La_Variable_Complementaire;
        Nos_Chaines.Copy (La_Sortie.Direction, La_Direction);
        case Une_Variable.Type_Variable is
            when Lieu =>
                Liste_Direction.Add
                   (Une_Variable.Specif.Direction_Lieu, La_Sortie);
            when others =>
                null;
        end case;
    end Associate_Direction;

    ---------------------------------------------------------------
    --|
    --| Initialise le champ Existe de la variable globale
    --| Une_Variable.
    --|
    --| Parametres d'entree :
    --|   Existence : le nouvel etat d'existence de la variable
    --|               (type boolean)
    --|
    ---------------------------------------------------------------
    procedure Associate_Existence (Existence : Boolean) is
    begin
        Une_Variable.Existe := Existence;
    end Associate_Existence;

    ---------------------------------------------------------------
    --|
    --| Initialise le champ Valeur de la variable globale
    --| Une_Variable (cette routine n'a aucun effet si cette
    --| variable n'est pas du type Compteur).
    --|
    --| Parametres d'entree :
    --|   La_Valeur : la nouvelle valeur du compteur
    --|               (type integer)
    --|
    ---------------------------------------------------------------
    procedure Associate_Valeur (La_Valeur : Integer) is
    begin
        case Une_Variable.Type_Variable is
            when Compteur =>
                Une_Variable.Specif.Valeur_Compteur := La_Valeur;
            when others =>
                null;
        end case;
    end Associate_Valeur;

    ---------------------------------------------------------------
    --|
    --| Initialise le champ Signification de la variable globale
    --| Une_Variable (cette routine n'a aucun effet si cette
    --| variable n'est pas du type Preposition ou Verbe).
    --|
    --| Parametres d'entree :
    --|   La_Signification : nouvelle signification de la variable
    --|                      (type Nos_Chaines.String_Text)
    --|
    ---------------------------------------------------------------
    procedure Associate_Signification
                 (La_Signification : Nos_Chaines.String_Text) is
    begin  
        case Une_Variable.Type_Variable is
            when Preposition | Verbe =>
                Nos_Chaines.Copy (Une_Variable.Specif.Signification,
                                  La_Signification);
                Une_Variable.Existe := True;
            when others =>
                null;
        end case;
    end Associate_Signification;

    ---------------------------------------------------------------
    --|
    --| Enrichit l'arbre des variables de la variable globale
    --| Une_Variable dont les champs viennent d'etre initialiser
    --| si aucune autre des variables deja presentes dans la
    --| structure n'a le meme nom.
    --|
    --| Parametres de sortie :
    --|   Ok : Teste la validite de la nouvelle variable. Ok sera
    --|        mis a False si une autre variable porte deja le
    --|        meme nom.
    --|        (type boolean)
    --|
    ---------------------------------------------------------------
    procedure Make_Variable (Ok : in out Boolean) is  
        Trouve : Boolean;
        Variable_De_Recherche : Cellule;
        Une_Cellule : P_Cellule;
    begin
        Nos_Chaines.Copy (Variable_De_Recherche.Nom, Une_Variable.Nom);
        Structure_Des_Variables.Find (Variable_De_Recherche, Trouve);
        if Trouve then
            if (Variable_De_Recherche.Type_Variable =
                Une_Variable.Type_Variable) then
                if (Variable_De_Recherche.Complet = True) then
                    Ok := False;
                    Error.Semantic (Une_Variable.Nom, Error.Redefinition);
                else
                    Une_Variable.Complet := True;
                    Structure_Des_Variables.Replace (Une_Variable.all);
                end if;
            else
                Ok := False;
                Error.Semantic (Une_Variable.Nom, Error.Redefinition);
            end if;
        else
            Une_Variable.Complet := True;
            Structure_Des_Variables.Add (Une_Variable.all);
        end if;
    end Make_Variable;

end Create_Structure;

E3 Meta Data

    nblk1=2b
    nid=3
    hdr6=40
        [0x00] rec0=21 rec1=00 rec2=01 rec3=052
        [0x01] rec0=00 rec1=00 rec2=1c rec3=00a
        [0x02] rec0=14 rec1=00 rec2=02 rec3=018
        [0x03] rec0=16 rec1=00 rec2=19 rec3=008
        [0x04] rec0=18 rec1=00 rec2=0a rec3=046
        [0x05] rec0=18 rec1=00 rec2=25 rec3=048
        [0x06] rec0=1a rec1=00 rec2=09 rec3=064
        [0x07] rec0=1a rec1=00 rec2=26 rec3=01a
        [0x08] rec0=18 rec1=00 rec2=1a rec3=02a
        [0x09] rec0=1b rec1=00 rec2=1d rec3=04e
        [0x0a] rec0=16 rec1=00 rec2=27 rec3=050
        [0x0b] rec0=18 rec1=00 rec2=15 rec3=054
        [0x0c] rec0=06 rec1=00 rec2=12 rec3=020
        [0x0d] rec0=16 rec1=00 rec2=2b rec3=02c
        [0x0e] rec0=18 rec1=00 rec2=0f rec3=022
        [0x0f] rec0=16 rec1=00 rec2=08 rec3=00a
        [0x10] rec0=19 rec1=00 rec2=1b rec3=03c
        [0x11] rec0=05 rec1=00 rec2=10 rec3=01c
        [0x12] rec0=14 rec1=00 rec2=07 rec3=066
        [0x13] rec0=18 rec1=00 rec2=28 rec3=05a
        [0x14] rec0=18 rec1=00 rec2=0b rec3=052
        [0x15] rec0=17 rec1=00 rec2=14 rec3=030
        [0x16] rec0=19 rec1=00 rec2=06 rec3=006
        [0x17] rec0=12 rec1=00 rec2=29 rec3=00e
        [0x18] rec0=18 rec1=00 rec2=1e rec3=04c
        [0x19] rec0=18 rec1=00 rec2=20 rec3=036
        [0x1a] rec0=17 rec1=00 rec2=2a rec3=024
        [0x1b] rec0=18 rec1=00 rec2=21 rec3=024
        [0x1c] rec0=1b rec1=00 rec2=1f rec3=016
        [0x1d] rec0=18 rec1=00 rec2=04 rec3=028
        [0x1e] rec0=18 rec1=00 rec2=11 rec3=036
        [0x1f] rec0=14 rec1=00 rec2=23 rec3=000
        [0x20] rec0=01 rec1=00 rec2=03 rec3=000
        [0x21] rec0=04 rec1=00 rec2=0e rec3=000
        [0x22] rec0=13 rec1=00 rec2=2b rec3=00e
        [0x23] rec0=00 rec1=00 rec2=19 rec3=010
        [0x24] rec0=10 rec1=00 rec2=0f rec3=054
        [0x25] rec0=14 rec1=00 rec2=23 rec3=046
        [0x26] rec0=04 rec1=00 rec2=1b rec3=000
        [0x27] rec0=10 rec1=00 rec2=0f rec3=016
        [0x28] rec0=10 rec1=00 rec2=23 rec3=074
        [0x29] rec0=0c rec1=00 rec2=0c rec3=001
        [0x2a] rec0=ee rec1=43 rec2=9f rec3=52b
    tail 0x2174c692086593c8769af 0x42a00088462060003
Free Block Chain:
  0x3: 0000  00 0e 00 07 80 01 3b 01 00 00 00 05 00 00 00 00  ┆      ;         ┆
  0xe: 0000  00 13 00 1d 80 0c 68 65 2c 20 54 72 6f 75 76 65  ┆      he, Trouve┆
  0x13: 0000  00 17 00 9d 80 19 69 6e 65 20 3a 20 50 6f 69 6e  ┆      ine : Poin┆
  0x17: 0000  00 22 00 55 80 3a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ┆ " U :----------┆
  0x22: 0000  00 24 01 ad 80 17 74 65 5f 43 6f 6e 74 65 6e 75  ┆ $    te_Contenu┆
  0x24: 0000  00 0c 03 fc 80 18 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ┆      ----------┆
  0xc: 0000  00 0d 00 c2 80 2c 43 68 61 69 6e 65 73 2e 49 6e  ┆     ,Chaines.In┆
  0xd: 0000  00 16 03 fc 00 38 20 20 20 20 20 20 20 20 20 20  ┆     8          ┆
  0x16: 0000  00 05 03 f9 80 07 20 54 79 70 20 69 73 07 00 21  ┆       Typ is  !┆
  0x5: 0000  00 18 00 25 80 07 65 6e 74 29 20 69 73 07 00 09  ┆   %  ent) is   ┆
  0x18: 0000  00 00 01 40 80 07 74 69 6f 6e 29 29 3b 07 00 1d  ┆   @  tion));   ┆