A simple implementation of CYK algorithm to check the validity of a string according to the given grammer