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

⟦d7b94dbca⟧ Ada Source

    Length: 10240 (0x2800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Variable, seg_049296, seg_049431

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 Interface_Structure;
with Create_Structure;
with Nos_Chaines;
with Lex;

package body Variable is

    type Attribut is (Contenu, Etat, Possession);

    procedure Autre_Possession_Contenu_Etat
                 (Ok : in out Boolean; Le_Champ : Attribut; Le_Sens : Integer);

    procedure Existence_Parse (Ok : in out Boolean) is
        use Lex;
    begin
        if (Lex.Get_Token = L_Est) then
            Create_Structure.Associate_Existence (True);
            Lex.Next;
            Ok := True;
        else
            if (Lex.Get_Token = L_Sera) then
                Create_Structure.Associate_Existence (False);
                Lex.Next;
                Ok := True;
            else
                Ok := False;
            end if;
        end if;
    end Existence_Parse;


    procedure Description_Parse (Ok : in out Boolean; Le_Sens : Integer) is
        use Lex;
    begin
        if Lex.Get_Token = L_Description then
            if Lex.Next_Token = L_Colon then
                if Lex.Next_Token = L_Text then
                    case Le_Sens is
                        when 1 =>
                            Interface_Structure.Associate_Description_Sens1
                               (Lex.Get_Value);
                        when 2 =>
                            Interface_Structure.Associate_Description_Sens2
                               (Lex.Get_Value);
                        when others =>
                            Interface_Structure.Associate_Description
                               (Lex.Get_Value);
                    end case;
                    Lex.Next;
                    Ok := True;
                else
                    Ok := False;
                end if;
            else
                Ok := False;
            end if;
        else
            Ok := True;
        end if;
    end Description_Parse;


    procedure Position_Parse (Ok : in out Boolean) is
        use Lex;
    begin  
        Ok := False;
        if Lex.Get_Token = L_Position then
            if Lex.Next_Token = L_Colon then
                if Lex.Next_Token = L_Id then
                    Create_Structure.Associate_Position (Lex.Get_Value);
                    Lex.Next;
                    Ok := True;
                end if;
            end if;
        end if;
    end Position_Parse;

    procedure Etat_Parse (Ok : in out Boolean; Le_Sens : Integer) is
        use Lex;
    begin
        if Lex.Get_Token = L_Etat then
            if Lex.Next_Token = L_Colon then
                if Lex.Next_Token = L_Id then
                    case Le_Sens is
                        when 1 =>
                            Interface_Structure.Associate_Etat_Sens1
                               (Lex.Get_Value);
                        when 2 =>
                            Interface_Structure.Associate_Etat_Sens2
                               (Lex.Get_Value);
                        when others =>
                            Interface_Structure.Associate_Etat (Lex.Get_Value);
                    end case;
                    Lex.Next;
                    Autre_Possession_Contenu_Etat (Ok, Etat, Le_Sens);
                else
                    Ok := False;
                end if;
            else
                Ok := False;
            end if;
        else
            Ok := True;
        end if;
    end Etat_Parse;


    procedure Possession_Parse (Ok : in out Boolean) is
        use Lex;  
        Le_Sens : Integer := 0;
    begin  
        if Lex.Get_Token = L_Possession then
            if Lex.Next_Token = L_Colon then
                if Lex.Next_Token = L_Id then
                    Create_Structure.Associate_Possession (Lex.Get_Value);
                    Lex.Next;
                    Autre_Possession_Contenu_Etat (Ok, Possession, Le_Sens);
                else
                    Ok := False;
                end if;
            else
                Ok := False;
            end if;
        else
            Ok := True;
        end if;
    end Possession_Parse;


    procedure Contenu_Parse (Ok : in out Boolean) is
        use Lex;  
        Le_Sens : Integer := 0;
    begin  
        if Lex.Get_Token = L_Contenu then
            if Lex.Next_Token = L_Colon then
                if Lex.Next_Token = L_Id then
                    Create_Structure.Associate_Contenu (Lex.Get_Value);
                    Lex.Next;
                    Autre_Possession_Contenu_Etat (Ok, Contenu, Le_Sens);
                else
                    Ok := False;
                end if;
            else
                Ok := False;
            end if;
        else
            Ok := True;
        end if;
    end Contenu_Parse;


    procedure Autre_Possession_Contenu_Etat (Ok : in out Boolean;
                                             Le_Champ : Attribut;
                                             Le_Sens : Integer) is
        use Lex;
    begin
        if Lex.Get_Token = L_Coma then
            if Lex.Next_Token = L_Id then
                case Le_Champ is
                    when Contenu =>
                        Create_Structure.Associate_Contenu (Lex.Get_Value);
                    when Etat =>
                        case Le_Sens is
                            when 1 =>
                                Interface_Structure.Associate_Etat_Sens1
                                   (Lex.Get_Value);
                            when 2 =>
                                Interface_Structure.Associate_Etat_Sens2
                                   (Lex.Get_Value);
                            when others =>
                                Interface_Structure.Associate_Etat
                                   (Lex.Get_Value);
                        end case;
                    when Possession =>
                        Create_Structure.Associate_Possession (Lex.Get_Value);
                end case;
                Lex.Next;
                Autre_Possession_Contenu_Etat (Ok, Le_Champ, Le_Sens);
            else
                Ok := False;
            end if;
        else
            Ok := True;
        end if;
    end Autre_Possession_Contenu_Etat;

    procedure Valeur_Parse (Ok : in out Boolean) is
        use Lex;
    begin
        if Lex.Get_Token = L_Valeur then
            if Lex.Next_Token = L_Colon then
                if Lex.Next_Token = L_Number then
                    Create_Structure.Associate_Valeur
                       (Integer'Value (Nos_Chaines.Infinite_String.Image
                                          (Lex.Get_Value)));
                    Lex.Next;
                    Ok := True;
                else
                    Ok := False;
                end if;
            else
                Ok := False;
            end if;
        else
            Ok := True;
        end if;
    end Valeur_Parse;

end Variable;

E3 Meta Data

    nblk1=9
    nid=0
    hdr6=12
        [0x00] rec0=25 rec1=00 rec2=01 rec3=00e
        [0x01] rec0=00 rec1=00 rec2=07 rec3=038
        [0x02] rec0=1d rec1=00 rec2=05 rec3=006
        [0x03] rec0=1a rec1=00 rec2=08 rec3=022
        [0x04] rec0=1d rec1=00 rec2=02 rec3=020
        [0x05] rec0=22 rec1=00 rec2=09 rec3=01e
        [0x06] rec0=15 rec1=00 rec2=04 rec3=048
        [0x07] rec0=1e rec1=00 rec2=06 rec3=014
        [0x08] rec0=05 rec1=00 rec2=03 rec3=000
    tail 0x21546891a865b66a5c0d3 0x42a00088462060003