YAZ
5.34.0
|
Implements CCL parse tree printing. More...
#include <stdio.h>
#include <string.h>
#include <yaz/querytowrbuf.h>
#include <yaz/yaz-iconv.h>
#include <yaz/ccl.h>
Go to the source code of this file.
Functions | |
static void | ccl_pquery_indent (WRBUF w, struct ccl_rpn_node *p, int indent) |
static void | ccl_pquery_complex (WRBUF w, struct ccl_rpn_node *p, int indent) |
static void | ccl_prterm (WRBUF w, const char *term) |
void | ccl_pquery (WRBUF w, struct ccl_rpn_node *p) |
void | ccl_pr_tree (struct ccl_rpn_node *rpn, FILE *fd_out) |
Implements CCL parse tree printing.
This source file implements functions to parse and print a CCL node tree (as a result of parsing).
Definition in file cclptree.c.
void ccl_pquery | ( | WRBUF | w, |
struct ccl_rpn_node * | p | ||
) |
Pretty-print CCL RPN node tree to WRBUF
Definition at line 135 of file cclptree.c.
References ccl_pquery_indent().
Referenced by ccl_rpn_query(), ccl_scan_query(), and ZOOM_query_ccl2rpn().
|
static |
Definition at line 25 of file cclptree.c.
References ccl_pquery_indent(), CCL_RPN_AND, CCL_RPN_NOT, CCL_RPN_OR, CCL_RPN_PROX, CCL_RPN_TERM, ccl_rpn_node::kind, ccl_rpn_node::p, ccl_rpn_node::t, ccl_rpn_node::u, wrbuf_printf(), wrbuf_putc, wrbuf_puts(), and yaz_isdigit.
Referenced by ccl_pquery_indent().
|
static |
Definition at line 78 of file cclptree.c.
References ccl_pquery_complex(), ccl_prterm(), CCL_RPN_AND, CCL_RPN_ATTR_NUMERIC, CCL_RPN_ATTR_STRING, CCL_RPN_NOT, CCL_RPN_OR, CCL_RPN_PROX, CCL_RPN_SET, CCL_RPN_TERM, ccl_rpn_attr::kind, ccl_rpn_node::kind, ccl_rpn_attr::next, ccl_rpn_attr::numeric, ccl_rpn_attr::set, ccl_rpn_node::setname, ccl_rpn_attr::str, ccl_rpn_node::t, ccl_rpn_attr::type, ccl_rpn_node::u, ccl_rpn_attr::value, wrbuf_putc, and wrbuf_puts().
Referenced by ccl_pquery(), ccl_pquery_complex(), and ccl_pr_tree().
void ccl_pr_tree | ( | struct ccl_rpn_node * | rpn, |
FILE * | fd_out | ||
) |
Dump RPN tree in readable format to fd_out
Definition at line 140 of file cclptree.c.
References ccl_pquery_indent(), wrbuf_alloc(), wrbuf_cstr(), and wrbuf_destroy().
|
static |
Definition at line 73 of file cclptree.c.
References yaz_encode_pqf_term().
Referenced by ccl_pquery_indent().