Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 516 Bytes

File metadata and controls

9 lines (7 loc) · 516 Bytes

CYK-algorithm-with-all-possible-parse-trees

C++ code to implement CYK algorithm with given Context Free Grammar in Chomsky Normal Form and input string. This code also prints all possible parse trees for the input string even if the grammar is ambigous.

INPUT: (CFG and input string) You can give CFG as input in input.txt file in specified form. input string can be given once you run the executable.

OUTPUT: Output is by default directed to output.txt, it can be changed in main.cpp to print on the console .