def expand(tree):
    

@@ -1,23 +1,705 @@
-def expand(tree):%0A    
+from ce.transformer.core import TreeTransformer%0Afrom ce.transformer.biop import associativity, distribute_for_distributivity%0A%0A%0Adef transform(tree, reduction_methods=None, transform_methods=None):%0A    t = TreeTransformer(tree)%0A    t.reduction_methods = reduction_methods or %5B%5D%0A    t.transform_methods = transform_methods or %5B%5D%0A    return t.closure()%0A    %0A%0Adef expand(tree):%0A    return transform(tree, %5Bdistribute_for_distributivity%5D).pop()%0A%0A%0Adef parsings(tree):%0A    return transform(tree, None, %5Bassociativity%5D)%0A%0A%0Aif __name__ == '__main__':%0A    import ce.logger as logger%0A    logger.set_context(level=logger.levels.debug)%0A    logger.info(expand('(a + 3) * (a + 3)'))%0A    logger.info(parsings('a + b + c'))
 %0A

Add some transformation utility functions