A polynomial-time parsing algorithm for $K$-depth languages.