def generate_tree(node):
    """
    Generates the string representation of the parse tree.
    :param nodes: the root node.
    :return: the parse tree in string form.
    """
    if node.child2 == None:
        return f"[{node.symbol} '{node.child1}']"
    else:
        return f"[{node.symbol} {generate_tree(node.child1)} {generate_tree(node.child2)}]"