|
YAZ 5.35.1
|
Implements CQL tree node utilities. More...
Go to the source code of this file.
Functions | |
| void | cql_fputs (const char *buf, void *client_data) |
| stream handle for file (used by cql_to_xml_stdio) | |
| struct cql_node * | cql_node_dup (NMEM nmem, struct cql_node *cp) |
| struct cql_node * | cql_node_mk_sc (NMEM nmem, const char *index, const char *relation, const char *term) |
| creates a search clause node (st). | |
| struct cql_node * | cql_node_mk_boolean (NMEM nmem, const char *op) |
| creates a boolean node. | |
| struct cql_node * | cql_node_mk_sort (NMEM nmem, const char *index, struct cql_node *modifiers) |
| creates a sort single spec node. | |
| const char * | cql_uri (void) |
| returns the standard CQL context set URI. | |
| struct cql_node * | cql_apply_prefix (NMEM nmem, struct cql_node *n, const char *prefix, const char *uri) |
| applies a prefix+uri to "unresolved" index and relation URIs. "unresolved" URIs are those nodes where member index_uri / relation_uri is NULL. | |
| void | cql_node_destroy (struct cql_node *cn) |
| destroys a node and its children. | |
| int | cql_strcmp (const char *s1, const char *s2) |
| compares two CQL strings (ala strcmp) | |
| int | cql_strncmp (const char *s1, const char *s2, size_t n) |
| compares two CQL strings (ala strncmp) | |
Implements CQL tree node utilities.
Definition in file cqlutil.c.
| struct cql_node * cql_apply_prefix | ( | NMEM | nmem, |
| struct cql_node * | n, | ||
| const char * | prefix, | ||
| const char * | uri | ||
| ) |
applies a prefix+uri to "unresolved" index and relation URIs. "unresolved" URIs are those nodes where member index_uri / relation_uri is NULL.
Definition at line 110 of file cqlutil.c.
References cql_node::boolean, cql_apply_prefix(), CQL_NODE_BOOL, CQL_NODE_SORT, CQL_NODE_ST, cql_strncmp(), cql_node::index, cql_node::index_uri, cql_node::left, cql_node::modifiers, nmem_strdup(), cql_node::relation, cql_node::relation_uri, cql_node::right, cql_node::search, cql_node::sort, cql_node::st, cql_node::u, and cql_node::which.
Referenced by cql_apply_prefix(), cql_transform_r(), and yyparse().
| void cql_fputs | ( | const char * | buf, |
| void * | client_data | ||
| ) |
stream handle for file (used by cql_to_xml_stdio)
Definition at line 18 of file cqlutil.c.
Referenced by cql_to_ccl_stdio(), cql_to_xml_stdio(), and cql_transform_FILE().
| void cql_node_destroy | ( | struct cql_node * | cn | ) |
destroys a node and its children.
Definition at line 173 of file cqlutil.c.
References cql_node::boolean, CQL_NODE_BOOL, cql_node_destroy(), CQL_NODE_SORT, CQL_NODE_ST, cql_node::left, cql_node::modifiers, cql_node::next, cql_node::right, cql_node::search, cql_node::sort, cql_node::st, cql_node::u, and cql_node::which.
Referenced by cql_node_destroy(), cql_parser_destroy(), cql_parser_stream(), and yyparse().
duplicates a node (returns a copy of supplied node) .
Definition at line 24 of file cqlutil.c.
References cql_node::boolean, CQL_NODE_BOOL, cql_node_dup(), cql_node_mk_boolean(), cql_node_mk_sc(), cql_node_mk_sort(), CQL_NODE_SORT, CQL_NODE_ST, cql_node::index, cql_node::index_uri, cql_node::left, cql_node::modifiers, cql_node::next, nmem_strdup(), cql_node::relation, cql_node::relation_uri, cql_node::right, cql_node::search, cql_node::sort, cql_node::st, cql_node::term, cql_node::u, cql_node::value, and cql_node::which.
Referenced by cql_node_dup(), and yyparse().
creates a boolean node.
Definition at line 78 of file cqlutil.c.
References cql_node::boolean, CQL_NODE_BOOL, cql_node::left, cql_node::modifiers, nmem_malloc(), nmem_strdup(), cql_node::right, cql_node::u, cql_node::value, and cql_node::which.
Referenced by cql_node_dup(), and yyparse().
| struct cql_node * cql_node_mk_sc | ( | NMEM | nmem, |
| const char * | index, | ||
| const char * | relation, | ||
| const char * | term | ||
| ) |
creates a search clause node (st).
Definition at line 55 of file cqlutil.c.
References CQL_NODE_ST, cql_node::extra_terms, cql_node::index, cql_node::index_uri, cql_node::modifiers, nmem_malloc(), nmem_strdup(), cql_node::relation, cql_node::relation_uri, cql_node::st, cql_node::term, cql_node::u, and cql_node::which.
Referenced by cql_node_dup(), and yyparse().
creates a sort single spec node.
Definition at line 91 of file cqlutil.c.
References CQL_NODE_SORT, cql_node::index, cql_node::modifiers, cql_node::next, nmem_malloc(), nmem_strdup(), cql_node::search, cql_node::sort, cql_node::u, and cql_node::which.
Referenced by cql_node_dup(), and yyparse().
| int cql_strcmp | ( | const char * | s1, |
| const char * | s2 | ||
| ) |
compares two CQL strings (ala strcmp)
| s1 | string 1 |
| s2 | string 2 |
Definition at line 194 of file cqlutil.c.
Referenced by cql_lookup_property(), cql_transform_r(), emit_node(), node_bool(), node_st(), and yylex().
| int cql_strncmp | ( | const char * | s1, |
| const char * | s2, | ||
| size_t | n | ||
| ) |
compares two CQL strings (ala strncmp)
| s1 | string 1 |
| s2 | string 2 |
| n | size |
Definition at line 210 of file cqlutil.c.
Referenced by cql_apply_prefix(), and cql_transform_r().
| const char * cql_uri | ( | void | ) |
returns the standard CQL context set URI.
Definition at line 105 of file cqlutil.c.
Referenced by emit_node().