Beispiel #1
0
 def all_strings(self):
     for l in itertools.count(1):
         for x in compute_all_strings(l, alphabet=self.terminals()):
             v = re.sub(r"a", "t", x)
             v = re.sub(r"b", "a", v)
             v = re.sub(r"t", "b", v)
             yield x + v
Beispiel #2
0
 def all_strings(self):
     for l in itertools.count(1):
         for s in compute_all_strings(l, alphabet=self.terminals()):
             yield s + s + s
Beispiel #3
0
 def all_strings(self):
     for l in itertools.count(1):
         for s in compute_all_strings(l, alphabet='ab'):
             yield s + s[::-1]
Beispiel #4
0
 def all_strings(self):
     for l in itertools.count(1):
         for x in compute_all_strings(l, alphabet=self.terminals()):
             for y in compute_all_strings(l, alphabet=self.terminals()):
                 if x != y:
                     yield x+y
Beispiel #5
0
 def all_strings(self):
     for l in itertools.count(1):
         for x in compute_all_strings(l, alphabet=self.terminals()):
             for y in compute_all_strings(l, alphabet=self.terminals()):
                 if x != y:
                     yield x+y
Beispiel #6
0
 def all_strings(self):
     for l in itertools.count(1):
         for s in compute_all_strings(l, alphabet='ab'):
             yield s + s[::-1]