DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦2e07cc909⟧ TextFile

    Length: 5588 (0x15d4)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Text_Io, Token, Lex;
use Token;
package body Traite_Erreur is

    Tab_Dec_Mat : constant array (1 .. 3) of Token.Object :=
       (L_Id, L_Experience, L_Eof);
    Tab_Liste_Mat : constant array (1 .. 2) of Token.Object := (L_Fin, L_Eof);
    Tab_Liste_Act : constant array (1 .. 2) of Token.Object := (L_Fin, L_Eof);
    Tab_Dec_Glob : constant array (1 .. 4) of Token.Object :=
       (L_Experience, L_Scene, L_Spectacle, L_Eof);
    Tab_Dec_Exp : constant array (1 .. 3) of Token.Object :=
       (L_Scene, L_Spectacle, L_Eof);
    Tab_Nom_Exp : constant array (1 .. 2) of Token.Object := (L_Est, L_Eof);
    Tab_Dec_Scene : constant array (1 .. 2) of Token.Object :=
       (L_Spectacle, L_Eof);
    Tab_Liste_Scene : constant array (1 .. 2) of Token.Object := (L_Fin, L_Eof);
    Tab_Liste_Inst : constant array (1 .. 2) of Token.Object := (L_Fin, L_Eof);

    procedure Print_Erreur (Nom_Erreur : Liste_Erreurs) is
    begin
        case Nom_Erreur is
            when Err_Dec_Mat =>
                Text_Io.Put_Line ("Erreur dans la declaration materiel");
            when Err_Liste_Mat =>
                Text_Io.Put_Line ("Erreur dans la liste materiel");
            when Err_Liste_Act =>
                Text_Io.Put_Line ("Erreur dans la liste des acteurs");
            when Err_Dec_Glob =>
                Text_Io.Put_Line ("Erreur dans les declarations globales");
            when Err_Dec_Exp =>
                Text_Io.Put_Line ("Erreur dans la declaration experience");
            when Err_Nom_Exp =>
                Text_Io.Put_Line ("Erreur dans le nom de l'experience");
            when Err_Dec_Scene =>
                Text_Io.Put_Line ("Erreur dans la declaration scene");
            when Err_Liste_Scene =>
                Text_Io.Put_Line ("Erreur dans la liste scene");
            when Err_Liste_Inst =>
                Text_Io.Put_Line ("Erreur dans la liste des instructions");
        end case;
    end Print_Erreur;

    function Token_In_Table
                (L_Token : Token.Object; Table_Follow : Liste_Follows)
                return Boolean is
        Ok : Boolean := False;

    begin
        case Table_Follow is
            when Follow_Dec_Mat =>
                for I in Tab_Dec_Mat'Range loop
                    if Token.Object'Pos (L_Token) =
                       Token.Object'Pos (Tab_Dec_Mat (I)) then
                        Ok := True;
                    end if;
                    exit when Ok;
                end loop;
            when Follow_Liste_Mat =>
                for I in Tab_Liste_Mat'Range loop
                    if Token.Object'Pos (L_Token) =
                       Token.Object'Pos (Tab_Liste_Mat (I)) then
                        Ok := True;
                    end if;
                    exit when Ok;
                end loop;
            when Follow_Liste_Act =>
                for I in Tab_Liste_Act'Range loop
                    if Token.Object'Pos (L_Token) =
                       Token.Object'Pos (Tab_Liste_Act (I)) then
                        Ok := True;
                    end if;
                    exit when Ok;
                end loop;
            when Follow_Dec_Glob =>
                for I in Tab_Dec_Glob'Range loop
                    if Token.Object'Pos (L_Token) =
                       Token.Object'Pos (Tab_Dec_Glob (I)) then
                        Ok := True;
                    end if;
                    exit when Ok;
                end loop;
            when Follow_Dec_Exp =>
                for I in Tab_Dec_Exp'Range loop
                    if Token.Object'Pos (L_Token) =
                       Token.Object'Pos (Tab_Dec_Exp (I)) then
                        Ok := True;
                    end if;
                    exit when Ok;
                end loop;
            when Follow_Nom_Exp =>
                for I in Tab_Nom_Exp'Range loop
                    if Token.Object'Pos (L_Token) =
                       Token.Object'Pos (Tab_Nom_Exp (I)) then
                        Ok := True;
                    end if;
                    exit when Ok;
                end loop;
            when Follow_Dec_Scene =>
                for I in Tab_Dec_Scene'Range loop
                    if Token.Object'Pos (L_Token) =
                       Token.Object'Pos (Tab_Dec_Scene (I)) then
                        Ok := True;
                    end if;
                    exit when Ok;
                end loop;
            when Follow_Liste_Scene =>
                for I in Tab_Liste_Scene'Range loop
                    if Token.Object'Pos (L_Token) =
                       Token.Object'Pos (Tab_Liste_Scene (I)) then
                        Ok := True;
                    end if;
                    exit when Ok;
                end loop;
            when Follow_Liste_Inst =>
                for I in Tab_Liste_Inst'Range loop
                    if Token.Object'Pos (L_Token) =
                       Token.Object'Pos (Tab_Liste_Inst (I)) then
                        Ok := True;
                    end if;
                    exit when Ok;
                end loop;
        end case;
        return Ok;
    end Token_In_Table;

    procedure Parse_Erreur (Nom_Erreur : Liste_Erreurs;
                            Table_Follow : Liste_Follows) is
        L_Token : Token.Object;

    begin
        Print_Erreur (Nom_Erreur);
        L_Token := Lex.Lex_Get_Token;
        while (not Token_In_Table (L_Token, Table_Follow)) loop
            Lex.Lex_Next;
            L_Token := Lex.Lex_Get_Token;
        end loop;
    end Parse_Erreur;

end Traite_Erreur;