separate (Compilation_Unit.Produce_Metrics)
procedure Expression (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;
                      Terminate_Tokens : in Set_Of_Tokens) is

    --=========================================================
    -- Expression ::=
    --    Expression_Token { Expression_Token }
    --=========================================================

    Current_Token : Token_Package.Token;
    Peek_Ahead_Token_Value : Token_Package.Token_Value;

    function Is_Member (This_Token : in Token_Package.Token_Value;
                        In_This_List : in Set_Of_Tokens) return Boolean is
        --==============================================================
        -- returns TRUE if This_Token is a member of Terminate_Tokens ==
        -- otherwise FALSE is returned.                               ==
        --==============================================================
    begin
        -- Is_Member

        for Index in In_This_List'Range loop
            if In_This_List (Index) = This_Token then
                return True;
            end if;
        end loop;
        return False;

    end Is_Member;

begin
    -- Expression

    Expression_Token (Current_Compilation_Unit => Current_Compilation_Unit,
                      Program_Unit => Program_Unit,
                      Halstead => Halstead,
                      Loc => Loc,
                      Mccabe => Mccabe);

    Process_Expression_Tokens:
        loop

            -- find out whether the next token is a termination token
            Peek_Ahead_Token_Value :=
               Token_Package.Value_Of (Peek (From => Current_Compilation_Unit));

            --** changed 11/13/85 by J. Margono
            --** reason: "exit .. when ... " was placed in the wrong place
            exit Process_Expression_Tokens when
               Is_Member (This_Token => Peek_Ahead_Token_Value,
                          In_This_List => Terminate_Tokens);
            Expression_Token
               (Current_Compilation_Unit => Current_Compilation_Unit,
                Program_Unit => Program_Unit,
                Halstead => Halstead,
                Loc => Loc,
                Mccabe => Mccabe);

        end loop Process_Expression_Tokens;

end Expression;