示例#1
0
 def testDadaUmaGLCEpsilonLivreSeTransformarEmEpsilonLivreRetornaAMesmaGramatica(self):
   self.assertEqual(construirGLCComABOndeNumAsEhIgualNumBsEpsilonLivre(), util.transformar_em_epsilon_livre_glc(construirGLCComABOndeNumAsEhIgualNumBsEpsilonLivre()))
   self.assertEqual(construirGLCExpAritmeticaComRecEsquerdaDireta(), util.transformar_em_epsilon_livre_glc(construirGLCExpAritmeticaComRecEsquerdaDireta()))
示例#2
0
 def testDadaUmaGLCNaoEpsilonLivrePodeRetornarUmaGLCEpsilonLivre(self):
   glc_ok = construirGLCComABOndeNumAsEhIgualNumBsEpsilonLivre()
   glc_nok = construirGLCComABOndeNumAsEhIgualNumBsComEpsilon()
   self.assertNotEqual(glc_ok, glc_nok)
   self.assertEqual(glc_ok, util.transformar_em_epsilon_livre_glc(glc_nok))