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

⟦a3c3e5692⟧ Ada Source

    Length: 43008 (0xa800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Error, package body Parse, seg_0392dc, seg_039331, seg_03933e

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 Lexical;
with Semantique;
use Lexical;--a cause de lexical.token
package body Parse is

    Essai : constant := 40;
    Anticipe_Fin : exception;


    package Error is
        procedure Reset;
        procedure Inc;
        function Valeur return Natural;
        procedure Affiche (Type_Error : String);
        procedure Affiche (Nature : in Token;
                           Regle : in out Token;
                           Type_Error : String);  
        function Erreurs_Generees return Boolean;
    end Error;


    package body Error is separate;


    function Quid return Token is
        Response : Lexical.Token;
    begin
        Lexical.Next;
        Response := Lexical.Get_Token;
        return Response;
    end Quid;


    function Expr_Bis return Token is
        Lu : Token;
        Id_Vue : Boolean := False;
    begin
        Lu := Quid;
        loop
            case Lu is
                when L_Plus | L_Sub | L_Star | L_Open | L_Close =>
                    Id_Vue := False;
                    Semantique.Empiler (Un_Jeton => Lu);
                    Lu := Quid;
                when L_Number | L_Temps =>  
                    if not Id_Vue then
                        Id_Vue := True;  
                        Semantique.Empiler (Un_Jeton => L_Number,
                                            Une_Valeur => Lexical.Get_Value);
                        Lu := Quid;  
                    else
                        exit;
                    end if;
                when L_Id =>
                    if not Id_Vue then
                        Semantique.Empiler (Un_Id => Lexical.Get_Value);
                        Id_Vue := True;
                        Lu := Quid;
                    else
                        exit;
                    end if;
                when others =>
                    exit;
            end case;
        end loop;
        return Lu;
    end Expr_Bis;


    function Calcul return Token is
        Lu : Token;
    begin  
        Semantique.Demarre_Calcul;
        Lu := Expr_Bis;
        Semantique.Evaluer_Expression;
        return Lu;
    end Calcul;


    procedure Expression_Red is
        Lu : Token;
    begin
        Lu := Quid;
        case Lu is
            when L_Id =>
                Semantique.Lire_Nombre (Un_Id => Lexical.Get_Value);
                null;
            when L_Number | L_Temps =>
                Semantique.Lire_Nombre (Un_Nombre => Lexical.Get_Value);
            when L_Eof =>
                Error.Affiche ("fin de fichier dans une expression ?");
                raise Anticipe_Fin;
            when others =>
                null;
        end case;
        null;
    end Expression_Red;


    function Bloc_Groupe return Token;
    function Bloc_Groupe_Bis return Token is
        Lu : Token;
    begin
        Lu := Quid;
        if Lu = L_Virgule then
            Lu := Bloc_Groupe;
        end if;
        return Lu;
    end Bloc_Groupe_Bis;


    function Bloc_Groupe return Token is
        Lu : Token;
    begin  
        Lu := Quid;
        case Lu is
            when L_Hasard =>  
                Semantique.Nouveau_Bloc_Groupe (Lu);
                Lu := Quid;
                if Lu = L_De then
                    Lu := Quid;
                    if Lu = L_Open then
                        Lu := Bloc_Groupe;
                        if Lu = L_Close then
                            null;
                        end if;
                    end if;
                end if;
            when L_Premier =>
                Lu := Quid;
                if Lu = L_De then
                    Lu := Quid;
                    if Lu = L_Open then
                        Lu := Bloc_Groupe;
                        if Lu = L_Close then
                            null;
                        end if;
                    end if;
                end if;  
            when L_Id =>
                Semantique.Ajouter_Bloc_Groupe (Un_Groupe => Lexical.Get_Value);
                Lu := Bloc_Groupe_Bis;
            when L_Number | L_Temps =>
                Semantique.Ajouter_Bloc_Groupe
                   (Une_Valeur => Lexical.Get_Value);
                Lu := Bloc_Groupe_Bis;
            when others =>
                null;  
        end case;
        return Lu;
    end Bloc_Groupe;


    function Op_Groupe return Token is
        Lu : Token;
    begin
        Lu := Quid;
        case Lu is
            when L_Avec =>
                Lu := Quid;
                if Lu = L_Open then
                    Semantique.Nouveau_Bloc_Groupe (L_Avec);
                    Lu := Bloc_Groupe;
                    if Lu = L_Close then
                        Semantique.Fermer_Bloc_Groupe;
                    else
                        Error.Affiche ("il manque la ')' dans 'avec ()'");
                    end if;
                else
                    Error.Affiche ("il manque la '(' dans 'avec ('");
                end if;
            when L_Sans =>  
                Lu := Quid;
                if Lu = L_Open then
                    Semantique.Nouveau_Bloc_Groupe (L_Sans);
                    Lu := Bloc_Groupe;
                    if Lu = L_Close then
                        Semantique.Fermer_Bloc_Groupe;
                    else
                        Error.Affiche ("il manque la ')' dans 'sans ()'");
                    end if;
                else
                    Error.Affiche ("il manque la '(' dans 'sans ('");
                end if;
            when others =>
                null;
        end case;
        null;
        return Lu;
    end Op_Groupe;


    function Groupe return Token is
        Lu : Token;
    begin
        Lu := Quid;
        if Lu = L_Id then
            Semantique.Nouveau_Bloc_Groupe_Affecte (Lexical.Get_Value);
            Lu := Quid;
            if Lu = L_Est then
                Lu := Quid;
                Semantique.Nouveau_Bloc_Groupe;
                if Lu = L_Open then
                    Lu := Bloc_Groupe;
                    if Lu = L_Close then
                        Semantique.Fermer_Bloc_Groupe;
                        Lu := Op_Groupe;
                        Semantique.Fermer_Bloc_Groupe_Affecte;
                    else
                        Error.Affiche
                           ("il manque la ')' pour la definition du groupe");
                    end if;
                else
                    Error.Affiche ("il manque la '(' pour 'groupe xxx est ('");
                end if;
            else
                Error.Affiche ("il manque le 'est' pour 'groupe xxx est'");
            end if;
        else
            Error.Affiche ("il manque l'identificateur de groupe");
        end if;
        return Lu;
    end Groupe;


    function Oper_Temps return Token;
    function Groupe_Tps return Token is
        Lu : Token;
    begin
        Lu := Quid;
        case Lu is
            when L_Open =>
                Semantique.Nouveau_Bloc_Groupe_Temps (Lu);
                Error.Affiche ("il manque la virgule");
                Lu := Oper_Temps;  
                if Lu = L_Close then
                    Semantique.Fermer_Bloc_Groupe_Temps;
                    Lu := Quid;
                else
                    Error.Affiche ("manque ')'");
                end if;
            when L_Id =>
                Semantique.Ajouter_Bloc_Groupe_Temps
                   (Un_Nom => Lexical.Get_Value);
                Error.Affiche ("il manque la virgule");
                Lu := Quid;
                if Lu = L_Virgule then
                    Lu := Groupe_Tps;
                end if;
                null;
            when L_Temps =>
                Semantique.Ajouter_Bloc_Groupe_Temps
                   (Un_Nom => Lexical.Get_Value);
                Error.Affiche ("il manque la virgule");
                Lu := Quid;
                if Lu = L_Virgule then
                    Lu := Groupe_Tps;
                end if;
                null;
            when L_Virgule =>
                Lu := Oper_Temps;
            when others =>
                null;
        end case;
        return Lu;
    end Groupe_Tps;


    function Oper_Temps return Token is
        Lu : Token;
    begin
        Lu := Quid;
        case Lu is
            when L_Duree =>
                Semantique.Nouveau_Bloc_Groupe_Temps (Lu);
                if Quid = L_De then
                    if Quid = L_Open then
                        if Quid = L_Id then
                            Semantique.Ajouter_Bloc_Groupe_Temps
                               (Un_Nom => Lexical.Get_Value);
                            Lu := Quid;
                            if Lu = L_Close then
                                Lu := Quid;
                            end if;
                        else
                            Error.Affiche
                               ("if faut un identificateur ou un nombre");
                        end if;
                    else
                        Error.Affiche ("il faut une '(' apres 'duree de'");
                    end if;
                else
                    Error.Affiche ("il faut un 'de' apres 'duree'");
                end if;
            when L_Hasard =>
                Semantique.Nouveau_Bloc_Groupe_Temps (Lu);
                if Quid = L_De then
                    Lu := Groupe_Tps;
                else
                    Error.Affiche ("il faut un 'de' apres 'hasard'");
                end if;
            when L_Premier =>
                Semantique.Nouveau_Bloc_Groupe_Temps (Lu);
                if Quid = L_De then
                    Lu := Groupe_Tps;
                else
                    Error.Affiche ("il faut un 'de' apres 'premier'");
                end if;
            when L_Open =>
                Semantique.Nouveau_Bloc_Groupe_Temps (Lu);
                Lu := Oper_Temps;
                if Lu = L_Close then
                    Lu := Quid;
                else
                    Error.Affiche ("manque ')'");  
                end if;
            when L_Id =>
                Semantique.Ajouter_Bloc_Groupe_Temps
                   (Un_Nom => Lexical.Get_Value);
                Lu := Groupe_Tps;
            when L_Temps | L_Number =>
                Semantique.Ajouter_Bloc_Groupe_Temps
                   (Un_Nombre => Lexical.Get_Value);
                Lu := Groupe_Tps;
            when L_Close =>
                Semantique.Fermer_Bloc_Groupe_Temps;
                Lu := Quid;
            when others =>  
                Error.Affiche ("il manque une ')'");
        end case;
        return Lu;
    end Oper_Temps;


    function Ordre_Bis return Token is
        Lu : Token;
    begin
        Lu := Quid;
        if Lu = L_De then
            Expression_Red;
            Semantique.Controle_Option (L_De);
            Semantique.Complete_Action;
            Lu := Quid;
            if Lu = L_Vers then
                Expression_Red;
                Semantique.Controle_Option (L_Vers);
                Lu := Quid;
                if Lu = L_En then
                    Expression_Red;
                    Semantique.Controle_Option (L_En);
                    Lu := Quid;
                end if;
            end if;
        end if;
        Semantique.Insere_Action;
        return Lu;
    end Ordre_Bis;


    function Ordre return Token is
        Lu : Token;
    begin  
        Semantique.Nouveau_Bloc_Groupe;
        Lu := Bloc_Groupe;
        if Lu = L_Close then
            Lu := Ordre_Bis;
            Semantique.Complete_Action;  
        end if;
        return Lu;
    end Ordre;


    function Petites_Instructions return Token is
        Lu : Token;
    begin
        Lu := Quid;
        case Lu is
            when L_Id =>
                Semantique.Complete_Action (Une_Action => Lexical.Get_Value);  
                Lu := Ordre_Bis;
            when L_Open =>
                Lu := Ordre;
            when L_Equal =>
                Lu := Calcul;
            when others =>
                null;
        end case;
        return Lu;
    end Petites_Instructions;


    function Instructions return Token;


    function Liste_Instructions return Token is
        Lu : Token;
    begin
        Lu := Quid;
        loop
            case Lu is
                when L_Dans =>
                    Lu := Oper_Temps;
                    Semantique.Ouvrir_Bloc (L_Dans);
                    if Lu = L_Faire then
                        Lu := Quid;
                        if Lu = L_Debut then
                            Lu := Instructions;
                            if Lu = L_Fin then
                                Semantique.Fermer_Bloc (L_Dans);
                                Lu := Quid;
                            end if;
                        else
                            Error.Affiche
                               ("pas de 'debut' dans le bloc 'dans.. faire'");
                            Lu := Instructions;
                        end if;
                    else
                        Error.Affiche
                           ("pas de 'debut' dans le bloc 'dans ..faire');");
                    end if;
                when L_Repeter =>
                    Expression_Red;  
                    Semantique.Ouvrir_Bloc (L_Repeter);
                    Lu := Quid;
                    if Lu = L_Fois then
                        Lu := Quid;
                        if Lu = L_Debut then
                            Lu := Instructions;
                            if Lu = L_Fin then
                                Semantique.Fermer_Bloc (L_Repeter);
                                Lu := Quid;
                            end if;
                        else
                            Error.Affiche
                               ("pas de 'debut' dans le bloc 'repeter'");
                            Lu := Instructions;
                        end if;
                    else
                        Error.Affiche
                           ("pas de 'fois' dans le bloc 'repeter');");
                    end if;
                when L_Repeter_Ad_Eternam =>
                    Semantique.Ouvrir_Bloc (Lu);
                    Lu := Quid;
                    if Lu = L_Debut then
                        Lu := Instructions;
                        if Lu = L_Fin then
                            Semantique.Fermer_Bloc (L_Repeter_Ad_Eternam);
                            Lu := Quid;
                        end if;
                    else
                        Error.Affiche
                           ("pas de 'debut' dans le bloc 'repeter_ad_eternam'");
                        Lu := Instructions;
                    end if;
                when L_Toutes =>
                    Lu := Quid;
                    if Lu = L_Les then
                        if Oper_Temps = L_Pendant then
                            if Oper_Temps = L_Faire then
                                Semantique.Ouvrir_Bloc (L_Toutes);
                                if Quid = L_Debut then
                                    Lu := Instructions;
                                    if Lu = L_Fin then
                                        Semantique.Fermer_Bloc (L_Toutes);
                                        Lu := Quid;
                                    end if;  
                                else
                                    Error.Affiche
                                       ("pas de 'debut' dans le bloc 'toutes'");
                                end if;
                            else
                                Error.Affiche
                                   ("pas de 'faire' dans le bloc 'toutes'");
                            end if;
                        else
                            Error.Affiche
                               ("pas de 'pendant' dans le bloc 'toutes'");
                        end if;
                    else
                        Error.Affiche ("pas de 'les' dans le bloc 'toutes'");
                    end if;
                when L_Id =>
                    Semantique.Complete_Liste (Lexical.Get_Value);
                    Lu := Petites_Instructions;
                when L_Groupe =>
                    Lu := Groupe;
                when L_Fin =>
                    exit; --ok
                when L_Eof =>
                    exit; -- c'est fini
                when L_Debut => --un debut sans fin
                    Lu := Instructions;
                    Error.Affiche ("?");  
                when others =>
                    Error.Affiche ("pas d'instructions");
                    Lu := Quid;
                    null;
            end case;
        end loop;
        return Lu;
    end Liste_Instructions;


    function Instructions return Token is
        Lu : Token;
    begin
        Lu := Liste_Instructions;
        return Lu;
    end Instructions;


    procedure Def_Enchainement (Lu : in out Token) is
    begin
        case Lu is
            when L_Enchainement =>
                Semantique.Ouvrir_Bloc_Enchainement;
                Lu := Quid;
                if Lu = L_Debut then
                    Lu := Quid;
                    loop
                        case Lu is
                            when L_Id =>
                                Semantique.Genere_Scene (Lexical.Get_Value);
                                Lu := Quid;
                            when L_Fin =>
                                exit;
                            when others =>
                                Error.Affiche
                                   ("Il ne peut y avoir que des scenes declarees a cet endroit");
                                Lu := Quid;
                        end case;
                    end loop;
                    if Lu = L_Fin then
                        Semantique.Fermer_Bloc_Enchainement;
                        Lu := Quid;
                    end if;
                    if Lu = L_Eof then
                        Text_Io.Put_Line
                           ("--------------------------------------------------------");
                        if Error.Erreurs_Generees then  
                            Text_Io.Put_Line
                               (" Fin compilation - Erreurs generees (Voir Fichier_Err)");  
                        else
                            Text_Io.Put_Line
                               ("Fin compilation..................");  
                        end if;
                        Text_Io.Put_Line
                           ("--------------------------------------------------------");
                    end if;
                end if;
            when L_Eof =>
                Error.Affiche
                   ("deja la fin du fichier dans le bloc enchainement ????");
            when others =>
                Error.Inc;
                if Error.Valeur < Essai then
                    Error.Affiche ("redefinition du bloc enchainement");  
                    Lu := Quid;
                    Def_Enchainement (Lu);
                    Error.Reset;
                end if;
        end case;
    end Def_Enchainement;


    function Bloc_Sequence return Token is
        Lu : Token;
    begin
        Lu := Quid;  
        if Lu = L_Scene then
            Lu := Quid;
            if Lu = L_Id then
                Semantique.Ouvrir_Nouveau_Bloc_Scene (Lexical.Get_Value);
                Lu := Quid;
                if Lu = L_Debut then
                    Lu := Instructions;
                    if Lu = L_Fin then
                        Semantique.Fermer_Bloc_Scene;
                        Lu := Bloc_Sequence;
                    else
                        Error.Affiche
                           ("pas de 'fin' de bloc dans la partie scenario");
                    end if;
                else
                    Error.Affiche ("pas de 'debut' de scene");
                end if;
            else
                Error.Affiche ("pas d'identificateur de scene");
            end if;
        else
            null;
        end if;
        return Lu;
    end Bloc_Sequence;


    procedure Def_Scenario (Lu : in out Token) is
    begin
        case Lu is
            when L_Scenario =>  
                Semantique.Ouvrir_Nouveau_Bloc_Scenario;
                Lu := Quid;
                if Lu = L_Debut then
                    Lu := Bloc_Sequence;
                    if Lu = L_Fin then
                        Semantique.Fermer_Bloc_Scenario;
                        Lu := Quid;
                    else
                        Error.Affiche ("pas de 'fin' de scenario");
                    end if;
                else
                    Error.Affiche ("pas de 'debut' de scenario");
                end if;
            when L_Eof =>
                Error.Affiche
                   ("deja la fin du fichier dans le bloc scenario ???");
                raise Anticipe_Fin;
            when others =>  
                Error.Inc;
                if Error.Valeur < Essai then
                    Error.Affiche ("redefinition du bloc scenario");
                    Lu := Quid;
                    Def_Scenario (Lu);
                end if;
                Error.Reset;
        end case;
    end Def_Scenario;


    function Bloc_Experience return Token is
        Lu : Token;
    begin
        Lu := Quid;
        if Lu = L_Effet then
            if Quid = L_Id then
                if Quid = L_Open then
                    if Bloc_Groupe = L_Close then
                        if Quid = L_Debut then
                            if Instructions = L_Fin then
                                Lu := Bloc_Experience;
                            end if;
                        end if;
                    end if;
                end if;
            end if;
        end if;
        return Lu;
    end Bloc_Experience;


    procedure Def_Experience (Lu : in out Token) is
    begin
        case Lu is
            when L_Experience =>
                if Quid = L_Debut then
                    if Bloc_Experience = L_Fin then
                        Lu := Quid;
                        null;
                    else
                        Error.Affiche ("Pas de 'fin' du bloc experiences");
                    end if;
                else
                    Error.Affiche ("Pas de 'debut' du bloc experiences");
                end if;
            when L_Eof =>
                Error.Affiche
                   ("deja la fin du fichier dans le bloc experiences????");
                raise Anticipe_Fin;
            when others =>  
                Lu := Quid;
                Error.Affiche
                   ("Pas de bloc experience ");-- Ce bloc est facultatif
        end case;
    end Def_Experience;


    function Bloc_Acteur return Token is
        Lu : Token;
    begin
        Lu := Quid;
        if Lu = L_Id then
            Semantique.Nouvel_Acteur (Lexical.Get_Value);
            Lu := Quid;
            if Lu = L_Est then
                Lu := Quid;
                if Lu = L_Id then
                    Semantique.Donner_Type_Acteur (Lexical.Get_Value);
                    Lu := Quid;
                    if Lu = L_Sur then
                        Lu := Quid;
                        if Lu = L_Station then
                            Lu := Quid;
                            if Lu = L_Number then
                                Semantique.Donner_Adresse_Station
                                   (Lexical.Get_Value);
                                Semantique.Fin_Nouvel_Acteur;
                                Lu := Bloc_Acteur;
                            else
                                Error.Affiche (L_Fin, Lu,
                                               "pas de numero de station");
                            end if;
                        else
                            Error.Affiche
                               (L_Fin, Lu,
                                "pas de 'station' pour le bloc acteur");
                        end if;
                    else
                        Error.Affiche (L_Fin, Lu,
                                       "pas de 'sur' pour le bloc acteur");
                    end if;
                else
                    Error.Affiche (L_Fin, Lu, "pas d'identificateur de type");
                end if;
            else
                Error.Affiche (L_Fin, Lu, "pas de 'est' pour le bloc acteur");
            end if;
        else
            null;
        end if;
        return Lu;
    end Bloc_Acteur;


    procedure Def_Acteurs (Lu : in out Token) is
    begin
        case Lu is
            when L_Acteurs =>
                Semantique.Ouvrir_Bloc_Acteur;
                Lu := Quid;
                if Lu = L_Debut then

                    Lu := Bloc_Acteur;
                    if Lu = L_Fin then
                        Semantique.Fermer_Bloc_Acteur;
                        Lu := Quid;
                        null;
                    else
                        Error.Affiche ("pas de 'fin' pour le bloc acteur");
                    end if;
                else
                    Error.Affiche ("pas de 'debut' pour le bloc acteur");
                end if;
            when L_Eof =>
                Error.Affiche
                   ("deja la fin du fichier dans le bloc acteurs ????");
                raise Anticipe_Fin;
            when others =>
                Error.Affiche ("pas de bloc acteur");
                Error.Inc;
                if Error.Valeur < Essai then
                    Error.Affiche ("redefinition du bloc acteurs ");
                    Lu := Quid;
                    Def_Acteurs (Lu);
                end if;
                Error.Reset;
        end case;
    end Def_Acteurs;


    function Contenu_Option_Bis return Token is
        Lu : Token;
    begin
        Lu := Quid;
        if Lu = L_En then
            Semantique.Option (Lu);
            Lu := Quid;
            if Lu = L_Close then
                null;
            else
                Error.Affiche (L_Close, Lu,
                               "une parenthese fermente est attendue");
            end if;
        end if;
        return Lu;
    end Contenu_Option_Bis;


    function Contenu_Option return Token is
        Lu : Token;
    begin
        Lu := Quid;
        if Lu = L_Vers then
            Semantique.Option (Lu);
            Lu := Contenu_Option_Bis;
            if Lu = L_Close then
                null;
            end if;
        end if;
        return Lu;
    end Contenu_Option;


    function Option return Token is
        Lu : Token;
    begin
        Lu := Quid;
        if Lu = L_Open then
            Semantique.Ouvrir_Champ_Option;
            if Quid = L_De then
                Semantique.Option (L_De);  
                Lu := Contenu_Option;
                if Lu = L_Close then
                    Lu := Quid;
                end if;
            end if;
        end if;
        return Lu;
    end Option;


    function Liste return Token is
        Lu : Token;
    begin
        Lu := Quid;
        while Lu = L_Id loop
            Semantique.Nouvelle_Action (Lexical.Get_Value);
            if Quid = L_Est then
                if Quid = L_Number then
                    Semantique.Donner_Code_Action (Lexical.Get_Value);
                    Lu := Option;
                    Semantique.Fermer_Champ_Option;
                    Semantique.Fin_Nouvelle_Action;
                else
                    Error.Affiche ("pas de code bitbus");
                    exit;
                end if;
            else
                Error.Affiche (L_Fin, Lu, "pas de 'est' dans la liste");
                exit;
            end if;
        end loop;
        return Lu;
    end Liste;


    function Bloc_Materiel return Token is
        Lu : Token;
    begin
        Lu := Quid;
        if Lu = L_Id then
            Semantique.Nouveau_Type (Lexical.Get_Value);
            Lu := Quid;
            if Lu = L_Fait then
                Lu := Quid;
                if Lu = L_Debut then
                    Lu := Liste;
                    if Lu = L_Fin then
                        Semantique.Fin_Nouveau_Type;
                        Lu := Bloc_Materiel;
                        if Lu = L_Ok then
                            Lu := Bloc_Materiel;
                        end if;
                    else      --recuperation des erreurs
                        Error.Affiche (L_Fin, Lu, "pas de 'fin' de liste");
                    end if;
                else
                    Error.Affiche (L_Ok, Lu, "pas de 'debut' de liste");
                end if;
            else
                Error.Affiche (L_Ok, Lu, "pas de 'fait' dans le bloc");
            end if;  
        end if;
        return Lu;
    end Bloc_Materiel;


    procedure Def_Materiel (Lu : in out Token) is
    begin
        case Lu is
            when L_Materiel =>
                Lu := Quid;
                if Lu = L_Debut then
                    Semantique.Ouvrir_Bloc_Materiel;--
                    Lu := Bloc_Materiel;
                    if Lu = L_Fin then
                        Semantique.Fermer_Bloc_Materiel;--
                        Lu := Quid;
                        null;
                    else
                        Error.Affiche (L_Fin, Lu,
                                       "pas de fin du bloc materiel");
                    end if;
                else
                    Error.Affiche (L_Debut, Lu,
                                   "pas de debut du bloc materiel");
                end if;
            when L_Eof =>  
                Error.Affiche
                   ("deja la fin du fichier dans le bloc materiel ???");
                raise Anticipe_Fin;
            when others =>
                Error.Affiche (L_Fin, Lu, "pas de definition du materiel");
                Error.Inc;
                if Error.Valeur < Essai then
                    Lu := Quid;
                    Def_Materiel (Lu);
                end if;
                Error.Reset;
        end case;
    end Def_Materiel;


    procedure Code is
        Lu : Token;
    begin
        Error.Reset;
        Lu := Quid;
        Def_Materiel (Lu);
        Def_Acteurs (Lu);
        Def_Experience (Lu);
        Def_Scenario (Lu);
        Def_Enchainement (Lu);  
    end Code;


    procedure Parseur is
    begin
        Code;
    end Parseur;

end Parse;

E3 Meta Data

    nblk1=29
    nid=29
    hdr6=50
        [0x00] rec0=2b rec1=00 rec2=01 rec3=00e
        [0x01] rec0=18 rec1=00 rec2=1e rec3=01a
        [0x02] rec0=0b rec1=00 rec2=26 rec3=00c
        [0x03] rec0=27 rec1=00 rec2=02 rec3=00e
        [0x04] rec0=1a rec1=00 rec2=04 rec3=04e
        [0x05] rec0=1d rec1=00 rec2=28 rec3=058
        [0x06] rec0=05 rec1=00 rec2=27 rec3=040
        [0x07] rec0=1e rec1=00 rec2=05 rec3=04e
        [0x08] rec0=1d rec1=00 rec2=07 rec3=030
        [0x09] rec0=0b rec1=00 rec2=06 rec3=060
        [0x0a] rec0=21 rec1=00 rec2=23 rec3=010
        [0x0b] rec0=06 rec1=00 rec2=09 rec3=046
        [0x0c] rec0=18 rec1=00 rec2=25 rec3=024
        [0x0d] rec0=1e rec1=00 rec2=0a rec3=00a
        [0x0e] rec0=23 rec1=00 rec2=0b rec3=05a
        [0x0f] rec0=03 rec1=00 rec2=0e rec3=022
        [0x10] rec0=21 rec1=00 rec2=0d rec3=058
        [0x11] rec0=12 rec1=00 rec2=1f rec3=01a
        [0x12] rec0=15 rec1=00 rec2=08 rec3=076
        [0x13] rec0=15 rec1=00 rec2=24 rec3=018
        [0x14] rec0=16 rec1=00 rec2=0c rec3=016
        [0x15] rec0=21 rec1=00 rec2=03 rec3=042
        [0x16] rec0=13 rec1=00 rec2=22 rec3=0a2
        [0x17] rec0=0f rec1=00 rec2=0f rec3=03c
        [0x18] rec0=1c rec1=00 rec2=10 rec3=06c
        [0x19] rec0=04 rec1=00 rec2=21 rec3=012
        [0x1a] rec0=1e rec1=00 rec2=11 rec3=02c
        [0x1b] rec0=0b rec1=00 rec2=20 rec3=042
        [0x1c] rec0=1f rec1=00 rec2=13 rec3=016
        [0x1d] rec0=1d rec1=00 rec2=14 rec3=022
        [0x1e] rec0=14 rec1=00 rec2=15 rec3=01a
        [0x1f] rec0=1f rec1=00 rec2=16 rec3=052
        [0x20] rec0=1e rec1=00 rec2=17 rec3=062
        [0x21] rec0=12 rec1=00 rec2=18 rec3=00a
        [0x22] rec0=22 rec1=00 rec2=12 rec3=01e
        [0x23] rec0=01 rec1=00 rec2=19 rec3=04c
        [0x24] rec0=1e rec1=00 rec2=1a rec3=06c
        [0x25] rec0=1d rec1=00 rec2=1b rec3=016
        [0x26] rec0=23 rec1=00 rec2=1c rec3=004
        [0x27] rec0=05 rec1=00 rec2=1d rec3=001
        [0x28] rec0=52 rec1=55 rec2=bd rec3=048
    tail 0x21736f59c84ec413ae8ff 0x42a00088462060003
Free Block Chain:
  0x29: 0000  00 00 00 04 80 01 20 01 38 0b 00 00 00 00 00 00  ┆        8       ┆