move grammar parser into Cyk