Fix C implementation of parse_tree to return a dictionary.