def MakeExpressionGenerator(depth):
 if (depth == MAX_DEPTH):
  (yield '')
 else:
  for exprGen in expr_gens:
   for value in exprGen().generate(depth):
    (yield value)

def MakeExpressionGenerator ( depth ) : if ( depth == MAX_DEPTH ) : ( yield '' ) else : for exprGen in expr_gens : for value in exprGen ( ) . generate ( depth ) : ( yield value )
yields all possible expressions .