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

⟦4fa166c70⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Variable, seg_046e6d

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 Error, Initialisation_Par_Agregats,
     Unbounded_String, Variable_Table, Dynamic_Value;

package body Variable is

    package Unlimited_String is new Unbounded_String (10);


    function Parse_Identifier return String is
        Name : Unlimited_String.Variable_String;
    begin
        if not (Variable.Is_First (Lexical_Analyzer.Get_Token)) then
            Error.Set_Type_Error (Error.Decl_Variable_Expected);
            raise Error.Excep_Syntaxe_Error;
        end if;
        Name := Unlimited_String.Value (Lexical_Analyzer.Get_Value);
        Lexical_Analyzer.Next;
        return Unlimited_String.Image (Name);
    end Parse_Identifier;

    procedure Parse_Comme is
        use Lexical_Analyzer;
    begin
        if (Lexical_Analyzer.Get_Token /= Comme) then
            Error.Set_Type_Error (Error.Comme_Expected);
            raise Error.Excep_Syntaxe_Error;
        end if;
        Lexical_Analyzer.Next;
    end Parse_Comme;

    procedure Parse_Type_Famille (Name : String) is  
        use Lexical_Analyzer;
    begin  
        case (Lexical_Analyzer.Get_Token) is
            when Identifier =>  
                Variable_Table.Create (Name, Lexical_Analyzer.Get_Value,
                                       Lexical_Analyzer.Get_Line_In_File,
                                       Lexical_Analyzer.Get_Position_In_Line);
                Lexical_Analyzer.Next;
            when Entier =>  
                Variable_Table.Create (Name, Dynamic_Value.Integer_Number,
                                       Lexical_Analyzer.Get_Line_In_File,
                                       Lexical_Analyzer.Get_Position_In_Line);
                Lexical_Analyzer.Next;
            when Chaine =>
                Variable_Table.Create (Name, Dynamic_Value.String_Of_Characters,
                                       Lexical_Analyzer.Get_Line_In_File,
                                       Lexical_Analyzer.Get_Position_In_Line);
                Lexical_Analyzer.Next;
            when others =>
                Error.Set_Type_Error (Error.Type_Unknown);
                raise Error.Excep_Syntaxe_Error;
        end case;
    end Parse_Type_Famille;

    procedure Parse_Point is
        use Lexical_Analyzer;
    begin
        if (Lexical_Analyzer.Get_Token /= Terminator) then
            Error.Set_Type_Error (Error.Point_Expected);
            raise Error.Excep_Syntaxe_Error;
        end if;  
        Lexical_Analyzer.Next;
    end Parse_Point;



    procedure Parse is
        procedure The_Resynchro is new Error.Resynchro (Variable.Is_Follow);  
        Name : Unlimited_String.Variable_String;
    begin
        Name := Unlimited_String.Value (Parse_Identifier);
        Parse_Comme;
        Parse_Type_Famille (Unlimited_String.Image (Name));  
        Initialisation_Par_Agregats.Parse;
        Parse_Point;  
    exception
        when Error.Excep_Syntaxe_Error | Error.Excep_Semantic_Error =>
            Error.Treat;
            The_Resynchro;
    end Parse;


    function Is_Follow (Un_Token : Lexical_Analyzer.Tokens) return Boolean is
        use Lexical_Analyzer;
    begin
        return ((Is_First (Un_Token)) or
                (Un_Token = Initialisations) or (Un_Token = Vie));
    end Is_Follow;



    function Is_First (Un_Token : Lexical_Analyzer.Tokens) return Boolean is
        use Lexical_Analyzer;
    begin
        return (Un_Token = Identifier);
    end Is_First;


end Variable;

E3 Meta Data

    nblk1=5
    nid=4
    hdr6=8
        [0x00] rec0=20 rec1=00 rec2=01 rec3=006
        [0x01] rec0=11 rec1=00 rec2=03 rec3=08a
        [0x02] rec0=1e rec1=00 rec2=02 rec3=050
        [0x03] rec0=17 rec1=00 rec2=05 rec3=000
        [0x04] rec0=09 rec1=00 rec2=03 rec3=000
    tail 0x21543d6b68652635057de 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 00 02 2f 80 01 3e 01 00 18 20 20 20 20 20 20  ┆   /  >         ┆