Example #1
0
    def buildRecursiveErrorSpace(self):
        newerrors =   errors.geterrorset(self.tokenstring, errors.alloperatorerrors)
        newerrors = self.addUniqueErrors(newerrors) #Gettem out of the way, + reduce search space 
      
        while newerrors != []:
            for elem in newerrors[:]:
                nexterrors =  errors.geterrorset(elem[0], errors.alloperatorerrors)

                nexterrors = self.addUniqueErrors([(x[0], elem[1]+", "+x[1]) for x in nexterrors])
                newerrors += nexterrors
                newerrors.remove(elem)
Example #2
0
    def buildRecursiveErrorSpace(self):
        newerrors = errors.geterrorset(self.tokenstring,
                                       errors.alloperatorerrors)
        newerrors = self.addUniqueErrors(
            newerrors)  #Gettem out of the way, + reduce search space

        while newerrors != []:
            for elem in newerrors[:]:
                nexterrors = errors.geterrorset(elem[0],
                                                errors.alloperatorerrors)

                nexterrors = self.addUniqueErrors([
                    (x[0], elem[1] + ", " + x[1]) for x in nexterrors
                ])
                newerrors += nexterrors
                newerrors.remove(elem)
Example #3
0
 def testErrorSet(self):
     variants = errors.geterrorset(["NEG", "1", "PLUS", "2"], errors.alloperatorerrors)
     self.assertIn(["1", "PLUS", '2'], [x[0] for x in variants])
     self.assertIn(["NEG", "1", "TIMES", '2'], [x[0] for x in variants])
Example #4
0
 def testErrorSet(self):
     variants = errors.geterrorset(["NEG", "1", "PLUS", "2"],
                                   errors.alloperatorerrors)
     self.assertIn(["1", "PLUS", '2'], [x[0] for x in variants])
     self.assertIn(["NEG", "1", "TIMES", '2'], [x[0] for x in variants])
Example #5
0
 def buildErrorSpace(self):
     allerrors = errors.geterrorset(self.tokenstring,
                                    errors.alloperatorerrors)
     self.addUniqueErrors(allerrors)
Example #6
0
 def buildErrorSpace(self):
     allerrors = errors.geterrorset(self.tokenstring, errors.alloperatorerrors)
     self.addUniqueErrors(allerrors)