1 /* CCL print rpn tree - infix notation
5 * Revision 1.5 1995/02/23 08:31:59 adam
8 * Revision 1.3 1995/02/15 17:42:16 adam
9 * Minor changes of the api of this module. FILE* argument added
12 * Revision 1.2 1995/02/14 19:55:11 adam
13 * Header files ccl.h/cclp.h are gone! They have been merged an
14 * moved to ../include/ccl.h.
15 * Node kind(s) in ccl_rpn_node have changed names.
17 * Revision 1.1 1995/02/14 10:25:56 adam
18 * The constructions 'qualifier rel term ...' implemented.
28 void ccl_pr_tree (struct ccl_rpn_node *rpn, FILE *fd_out)
34 fprintf (fd_out, "\"%s\"", rpn->u.t.term);
35 if (rpn->u.t.attr_list)
37 struct ccl_rpn_attr *attr;
38 for (attr = rpn->u.t.attr_list; attr; attr = attr->next)
39 fprintf (fd_out, " %d=%d", attr->type, attr->value);
43 fprintf (fd_out, "(");
44 ccl_pr_tree (rpn->u.p[0], fd_out);
45 fprintf (fd_out, ") and (");
46 ccl_pr_tree (rpn->u.p[1], fd_out);
47 fprintf (fd_out, ")");
50 fprintf (fd_out, "(");
51 ccl_pr_tree (rpn->u.p[0], fd_out);
52 fprintf (fd_out, ") or (");
53 ccl_pr_tree (rpn->u.p[1], fd_out);
54 fprintf (fd_out, ")");
57 fprintf (fd_out, "(");
58 ccl_pr_tree (rpn->u.p[0], fd_out);
59 fprintf (fd_out, ") not (");
60 ccl_pr_tree (rpn->u.p[1], fd_out);
61 fprintf (fd_out, ")");
64 fprintf (fd_out, "set=%s", rpn->u.setname);
67 fprintf (fd_out, "(");
68 ccl_pr_tree (rpn->u.p[0], fd_out);
69 fprintf (fd_out, ") prox (");
70 ccl_pr_tree (rpn->u.p[1], fd_out);
71 fprintf (fd_out, ")");