CWB
Data Fields
c_tree Union Reference

Union of structures underlying the Constraint / Constrainttree objects. More...

#include <eval.h>

Data Fields

enum bnodetype type
 The type of this particular node. More...
 
struct {
   enum bnodetype   type
 must be bnode More...
 
   enum b_ops   op_id
 identifier of the bool operator More...
 
   union c_tree *   left
 points to the first operand More...
 
   union c_tree *   right
 points to the second operand, if present More...
 
node
 "standard" operand node in the evaluation tree; type is "bnode" More...
 
struct {
   enum bnodetype   type
 must be cnode More...
 
   int   val
 Value of the constant: 1 or 0 for true or false. More...
 
constnode
 "constant" node in the evaluation tree More...
 
struct {
   enum bnodetype   type
 must be func More...
 
   int   predef
 
   Attribute *   dynattr
 
   struct _ActualParamList *   args
 arguments of the function More...
 
   int   nr_args
 nr of arguments for this call More...
 
func
 function call (dynamic attribute), type is "func" More...
 
struct {
   enum bnodetype   type
 must be sbound More...
 
   Attribute *   strucattr
 the attribute which corresponds to the structure More...
 
   Boolean   is_closing
 True if closing tag, False for opening tag. More...
 
sbound
 structure boundary More...
 
struct {
   enum bnodetype   type
 must be pa_ref More...
 
   LabelEntry   label
 may be empty (NULL) More...
 
   Attribute *   attr
 the P-attribute we are referring to More...
 
   int   delete
 delete label after using it ? More...
 
pa_ref
 reference to positional attribute More...
 
struct {
   enum bnodetype   type
 must be sa_ref More...
 
   LabelEntry   label
 may be empty (NULL) More...
 
   Attribute *   attr
 the s-attribute we are referring to More...
 
   int   delete
 delete label after using it ? More...
 
sa_ref
 reference to structural attribute. More...
 
struct {
   enum bnodetype   type
 must be var_ref More...
 
   char *   varName
 
varref
 
struct {
   enum bnodetype   type
 must be id_list More...
 
   Attribute *   attr
 
   LabelEntry   label
 may be empty (NULL) More...
 
   int   negated
 
   int   nr_items
 
   int *   items
 an array of item IDs of size nr_items More...
 
   int   delete
 delete label after using it ? More...
 
idlist
 
struct {
   enum bnodetype   type
 string_leaf, int_leaf, or float_leaf More...
 
   int   canon
 canonicalization mode (i.e. More...
 
   enum wf_type   pat_type
 pattern type: normal wordform or reg. More...
 
   CL_Regex   rx
 compiled regular expression (using CL frontend) More...
 
   union {
      char *   sconst
 operand is a string constant. More...
 
      int   iconst
 operand is a integer constant. More...
 
      int   cidconst
 operand is {?? corpus position?? corpus lexicon id??} constant More...
 
      double   fconst
 operand is a float (well, double) constant More...
 
   }   ctype
 Union containing the constant type. More...
 
leaf
 constant (string, int, float, ...) More...
 

Detailed Description

Union of structures underlying the Constraint / Constrainttree objects.

Each Constraint is a node in the Constrainttree, i.e. a single element of a compiled CQP query.

Field Documentation

struct _ActualParamList* args
Attribute* attr
int canon

canonicalization mode (i.e.

flags)

Referenced by calculate_initial_matchlist_1(), do_flagged_string(), and OptimizeStringConstraint().

int cidconst

operand is {?? corpus position?? corpus lexicon id??} constant

struct { ... } constnode
union { ... } ctype
int delete
Attribute* dynattr
double fconst

operand is a float (well, double) constant

struct { ... } func

function call (dynamic attribute), type is "func"

Referenced by call_predefined_function(), free_booltree(), FunctionCall(), get_leaf_value(), and print_booltree().

int iconst

operand is a integer constant.

struct { ... } idlist
Boolean is_closing

True if closing tag, False for opening tag.

Referenced by eval_bool().

int* items
LabelEntry label
struct { ... } leaf
union c_tree* left
int negated
struct { ... } node
int nr_args

nr of arguments for this call

Referenced by FunctionCall(), and get_leaf_value().

int nr_items
enum b_ops op_id
struct { ... } pa_ref
enum wf_type pat_type
int predef
union c_tree * right

compiled regular expression (using CL frontend)

Referenced by do_flagged_string(), eval_bool(), and free_booltree().

struct { ... } sa_ref

reference to structural attribute.

If label is empty, this checks if the current position is at start or end of structural_attribute and returns INT value (this is kept for backward compatibility regarding lbound() and rbound() builtins; the new syntax is to use {s} and {/s}, which are represented as 'Tag' nodes.

If label is non-empty, the referenced S-attribute must have values, and the value of the enclosing region is returned as a string; in short, values of attributes can be accessed through label references .

Referenced by call_predefined_function(), do_IDReference(), do_LabelReference(), and get_leaf_value().

struct { ... } sbound

structure boundary

Referenced by eval_bool().

char* sconst

operand is a string constant.

Attribute* strucattr

the attribute which corresponds to the structure

Referenced by eval_bool().

enum bnodetype type

The type of this particular node.

string_leaf, int_leaf, or float_leaf

must be id_list

must be var_ref

must be sa_ref

must be pa_ref

must be sbound

must be func

must be cnode

must be bnode

Allows the type member of the other structures within the union to be accessed.

Referenced by bool_and(), bool_implies(), bool_not(), bool_or(), calculate_initial_matchlist_1(), call_predefined_function(), do_flagged_string(), do_IDReference(), do_LabelReference(), do_RelExExpr(), do_RelExpr(), do_StringConstraint(), do_WordformPattern(), eval_bool(), free_booltree(), FunctionCall(), get_leaf_value(), OptimizeStringConstraint(), print_booltree(), try_optimization(), and Varref2IDList().

int val
char* varName
struct { ... } varref

The documentation for this union was generated from the following file: