separate (Find_Unit.Build_Ada_Compilation_Unit)
procedure Task_Unit (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_Unit> = 'TASK' <Task_Tail>              =
    --                                                             =
    -- 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_Unit

    -- Parse the keyword 'Task'

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

    if Token_Package.Value_Of (Current_Token) = Token_Package.Task_Token then
        Compilation_Unit.Add_Token_To_Compilation_Unit
           (Token_To_Add => Current_Token, Unit_To_Add_To => Current_Unit);
    else
        -- This is not a task compilation unit
        raise Build_Syntax_Error;
    end if;

    -- Invoke a procedure to parse the rest of the task

    Task_Tail (Current_Unit => Current_Unit);
end Task_Unit;