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 - metrics - download
Index: B T

⟦ee3dd3e96⟧ TextFile

    Length: 4265 (0x10a9)
    Types: TextFile
    Names: »B«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

separate (Find_Unit.Build_Ada_Compilation_Unit)
procedure Task_Tail (Current_Unit : in out
                        Compilation_Unit.Ada_Compilation_Unit) is
    --==============================================================
    -- This procedure builds the next part of the grammar for an   =
    -- Ada compilation unit. Based on the next token, we will      =
    -- complete different productions. At present, we are parsing  =
    -- a task program unit ( task specification, task body, or     =
    -- task type specification ). The first token must be 'TASK'   =
    -- or the exception Build_Syntax_Error will be raised.         =
    -- The grammar :                                               =
    --               <Task_Tail> = 'BODY' <id> 'IS' <Task_Body> |  =
    --                             <Id> <Task_Spec>          |     =
    --                             'TYPE' <Task_Spec>              =
    --                                                             =
    -- written  by  GER  with  help  from  b2  and  JM             =
    -- May 1985  at EVB Software Engineering                       =
    --==============================================================

    Current_Token : Token_Package.Token;
    -- Holds the current token

begin
    -- Task_Tail

    -- Parse either a task body, task specification, or
    -- a task type specification

    Get_Next_Significant_Token (Significant_Token => Current_Token,
                                Current_Unit => Current_Unit);

    case Token_Package.Value_Of (Current_Token) is
        when Token_Package.Body_Token =>
            Compilation_Unit.Add_Token_To_Compilation_Unit
               (Token_To_Add => Current_Token, Unit_To_Add_To => Current_Unit);

            -- Get the task name identifier

            Get_Next_Significant_Token (Significant_Token => Current_Token,
                                        Current_Unit => Current_Unit);

            if Token_Package.Class_Of (Current_Token) =
               Token_Package.Identifier then
                Compilation_Unit.Add_Token_To_Compilation_Unit
                   (Token_To_Add => Current_Token,
                    Unit_To_Add_To => Current_Unit);
            else
                raise Build_Syntax_Error;
            end if;

            -- Get an 'is' token

            Get_Next_Significant_Token (Significant_Token => Current_Token,
                                        Current_Unit => Current_Unit);

            if Token_Package.Value_Of (Current_Token) =
               Token_Package.Is_Token then
                Compilation_Unit.Add_Token_To_Compilation_Unit
                   (Token_To_Add => Current_Token,
                    Unit_To_Add_To => Current_Unit);
            else
                raise Build_Syntax_Error;
            end if;

            Task_Body (Current_Unit => Current_Unit);

        when Token_Package.Type_Token =>

            -- This is a task type specification

            Compilation_Unit.Add_Token_To_Compilation_Unit
               (Token_To_Add => Current_Token, Unit_To_Add_To => Current_Unit);

            -- Get the task type name identifier

            Get_Next_Significant_Token (Significant_Token => Current_Token,
                                        Current_Unit => Current_Unit);

            if Token_Package.Class_Of (Current_Token) =
               Token_Package.Identifier then
                Compilation_Unit.Add_Token_To_Compilation_Unit
                   (Token_To_Add => Current_Token,
                    Unit_To_Add_To => Current_Unit);
            else
                raise Build_Syntax_Error;
            end if;

            Task_Spec (Current_Unit => Current_Unit);
        when others =>

            -- Is this a task specification or an error ?

            if Token_Package.Class_Of (Current_Token) =
               Token_Package.Identifier then
                Compilation_Unit.Add_Token_To_Compilation_Unit
                   (Token_To_Add => Current_Token,
                    Unit_To_Add_To => Current_Unit);
                Task_Spec (Current_Unit => Current_Unit);
            else
                -- Not a task compilation unit
                raise Build_Syntax_Error;
            end if;

    end case;

end Task_Tail;