the implementation of CYK algorithm for context-free grammars in Java 8