Exemplo 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
Exemplo 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
Exemplo 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]
Exemplo 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
Exemplo 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
Exemplo 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]