def choice(self, ast, *args): if len(ast) == 1: return simplify_list(ast[0]) return ast
def element(self, ast, *args): return simplify_list(ast)
def sequence(self, ast, *args): return simplify_list(ast)
def group(self, ast, *args): return simplify_list(ast)