CKY parser with CNF grammar