We reduce the provability problem of any formula of the Lambek calculus to some context-free parsing problem. This reduction, which is based on non-commutative proof-net theory, allows us to derive an automatic categorial deduction algorithm akin to the well-known Cocke-Kasami-Younger parsing algorithm.