Esempio n. 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
Esempio n. 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
Esempio n. 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]
Esempio n. 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
Esempio n. 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
Esempio n. 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]