CNF to CFG and CYK string parser