Esempio n. 1
0
 def test10(self):
     print("===== Test 10 =====")
     self._use_grammar3()
     input_str = 'ab'
     print('Input string: ' + input_str)
     result = (CYK.is_in_cfl(input_str, self._grammar))
     print('Result = ' + str(result))
Esempio n. 2
0
 def test1a(self):
     print("===== Test 1a =====")
     self._use_grammar1()
     #self._grammar.display()
     input_str = 'ab'
     print('Input string: ' + input_str)
     result = (CYK.is_in_cfl(input_str, self._grammar))
     print('Result = ' + str(result))