YAZ  5.34.0
Functions
cclptree.c File Reference

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)
 

Detailed Description

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.

Function Documentation

◆ ccl_pquery()

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().

◆ ccl_pquery_complex()

static void ccl_pquery_complex ( WRBUF  w,
struct ccl_rpn_node p,
int  indent 
)
static

◆ ccl_pquery_indent()

static void ccl_pquery_indent ( WRBUF  w,
struct ccl_rpn_node p,
int  indent 
)
static

◆ 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().

◆ ccl_prterm()

static void ccl_prterm ( WRBUF  w,
const char *  term 
)
static

Definition at line 73 of file cclptree.c.

References yaz_encode_pqf_term().

Referenced by ccl_pquery_indent().