let rec list_of_expr x acc = match x with | Ast.ExNil _ -> acc | Ast.ExCom (_, x, y) | Ast.ExSem (_, x, y) -> list_of_expr x (list_of_expr y acc) | x -> x :: acc