separate (Compilation_Unit.Produce_Metrics)
procedure Pragma_Clause (Current_Compilation_Unit : in out Ada_Compilation_Unit;
                         Program_Unit : in Program_Unit_State_Machine;
                         Halstead : in Halstead_State_Machine;
                         Loc : in Loc_State_Machine;
                         Mccabe : in Mccabe_State_Machine) is

    --========================================================================
    -- Each PRAGMA counts as one LOC data declaration
    -- Pragma_Clause ::=
    --   { "PRAGMA" <IDENTIFIER> [ Aggregate ] }
    --========================================================================

    Current_Token : Token_Package.Token;
    Dummy_Count : Natural; -- don't care how many components there
    -- are in the AGGREGATE

begin
    -- Pragma_Clause

    Process_Pragmas:
        while Token_Package.Value_Of (Peek (From => Current_Compilation_Unit)) =
                 Token_Package.Pragma_Token loop

            Get_Next_Token (Out_Token => Current_Token,
                            From => Current_Compilation_Unit,
                            Current_Loc => Loc);

            -- increment Halstead PRAGMA operator count
            Halstead.Store_Operator ((Kind =>
                                         Halstead_Operator.Pragma_Halstead));

            -- increment LOC executable statements count
            Loc.Change_Executable_Statements_Count;

            Get_Next_Token (Out_Token => Current_Token,
                            From => Current_Compilation_Unit,
                            Current_Loc => Loc);

            if "/=" (Token_Package.Class_Of (Current_Token),
                     Token_Package.Identifier) then
                raise Syntax_Error;
            end if;

            -- increment Halstead operand count
            Halstead.Store_Operand (Halstead_Operand.Definition
                                       (Token_Package.Value_Of
                                           (This_Token => Current_Token)));

            if "/=" (Token_Package.Value_Of
                        (Peek (From => Current_Compilation_Unit)),
                     Token_Package.Semicolon_Token) then

                Aggregate (Current_Compilation_Unit => Current_Compilation_Unit,
                           Program_Unit => Program_Unit,
                           Halstead => Halstead,
                           Loc => Loc,
                           Mccabe => Mccabe,
                           Number_Of_Components => Dummy_Count);

            end if;

            Get_Next_Token (Out_Token => Current_Token,
                            From => Current_Compilation_Unit,
                            Current_Loc => Loc);

            if "/=" (Token_Package.Value_Of (Current_Token),
                     Token_Package.Semicolon_Token) then
                raise Syntax_Error;
            end if;

            -- increment Halstead SEMICOLON operator count
            Halstead.Store_Operator ((Kind =>
                                         Halstead_Operator.Semicolon_Halstead));

        end loop Process_Pragmas;

end Pragma_Clause;