CWB
Data Structures | Defines | Typedefs | Enumerations | Functions | Variables

eval.h File Reference

#include "../cl/cdaccess.h"
#include "regex2dfa.h"
#include "corpmanag.h"
#include "symtab.h"

Data Structures

Defines

Typedefs

Enumerations

Functions

Variables


Define Documentation

#define MAXENVIRONMENT   10

maximum number of EvalEnvironments iin the global array

Referenced by next_environment().

#define MAXPATTERNS   5000

Number of AVStructures to put in each Patternlist.

Referenced by do_AnchorPoint(), do_WordformPattern(), and do_XMLTag().

#define repeat_inf   -1

constant which indicates 'infinite repetition'

Referenced by cqp_run_tab_query(), do_OptDistance(), evaltree2searchstr(), and print_rep_factor().

#define repeat_none   -2

constant which indicates 'no repetition'

Referenced by evaltree2searchstr(), print_evaltree(), print_rep_factor(), reg_disj(), and reg_seq().


Typedef Documentation

The ActualParamList object: used to build a linked list of parameters, each one of which is a Constrainttree.

typedef AVStructure* AVS

AVS is a pointer type for AVStructure.

typedef union _avs AVStructure

The AVStructure object.

A union of structures with the type member always accessible.

typedef enum _avstype AVSType
typedef union c_tree Constraint

Union of structures underlying the Constraint / Constrainttree objects.

Each Constraint is a node in the Constrainttree.

The Constrainttree object.

typedef struct ctxtsp Context

The Context object.

This stores information about contexts.

"Context" here means the context for evaluation of a query result within a corpus. (???)

typedef EvalEnvironment* EEP

EEPs are Eval Environment pointers.

typedef struct evalenv EvalEnvironment

The EvalEnvironment object: environment variables for the evaluation of a corpus query.

typedef union e_tree* Evaltree

Evaltree object.

(TODO specify here what on earth one of these is)

typedef AVStructure Patternlist[MAXPATTERNS]

Patternlist is an array of AVStructures.


Enumeration Type Documentation

enum _avstype
Enumerator:
Pattern 
Tag 
MatchAll 
Anchor 
enum b_ops

Labels a boolean operation.

Enumerator:
b_and 

boolean and operator

b_or 

boolean or operator

b_implies 

boolean implication (->) operator

b_not 

boolean negation

cmp_gt 

compare: greater than

cmp_lt 

compare: less than

cmp_get 

compare: greater or equal than

cmp_let 

compare: less or equal than

cmp_eq 

compare: equal

cmp_neq 

compare: not equal

cmp_ex 

is value present? bool exprs

enum bnodetype

Labels the type of a boolean node.

Enumerator:
bnode 

boolean evaluation node

cnode 

constant node

func 

function call

sbound 

structure boundary (open or close)

pa_ref 

reference to positional attribute

sa_ref 

reference to structural attribute

string_leaf 

string constant

int_leaf 

integer constant

float_leaf 

float constant

id_list 

list of IDs

var_ref 

variable reference

enum cooc_op
Enumerator:
cooc_meet 
cooc_union 
enum ctxtdir
Enumerator:
leftright 
left 
right 
enum re_ops
Enumerator:
re_od_concat 
re_oi_concat 
re_disj 
re_repeat 
enum spacet
Enumerator:
word 
structure 
enum tnodetype

Enumeration specifying different types of tree node.

Enumerator:
node 
leaf 
meet_union 
tabular 
enum wf_type

Labels the type of a {what??}.

Enumerator:
NORMAL 
REGEXP 
CID 

Function Documentation

void cqp_run_mu_query ( int  keep_old_ranges,
int  cut_value 
)
void cqp_run_query ( int  cut,
int  keep_old_ranges 
)

This function wraps round simulate_dfa (the only other thing it does is enforce the hard_cut limit).

See also:
hard_cut
simulate_dfa

References eep, hard_cut, and simulate_dfa().

Referenced by do_StandardQuery().

void cqp_run_tab_query ( int  implode)
Boolean eval_bool ( Constrainttree  ctptr,
RefTab  rt,
int  corppos 
)
int free_environment ( int  thisenv)

Frees an evaluation environment.

The environment must be one currently occupied within the global array.

See also:
Environment
eep
Parameters:
thisenvThe eval environment to free.
Returns:
Boolean: true if the deletion went OK; false if the environment to be freed was not occupied (will print an error message).

References Anchor, ctxtsp::attrib, cl_delete_regex(), cl_free, delete_symbol_table(), ctxtsp::direction, eep, Environment, False, free_booltree(), free_dfa(), free_evaltree(), evalenv::gconstraint, evalenv::has_target_indicator, evalenv::labels, leftright, MatchAll, evalenv::MaxPatIndex, NoField, Pattern, evalenv::patternlist, evalenv::query_corpus, evalenv::search_context, ctxtsp::size, Tag, dfa::TransTable, ctxtsp::type, cl::type, and word.

Referenced by free_environments().

void free_environments ( )

Frees all eval environments in the global array, and sets the eep pointer to -1.

References eep, and free_environment().

Referenced by in_UnnamedCorpusCommand(), and prepare_input().

int next_environment ( )
void show_environment ( int  thisenv)

Prints the contents of an EvalEnvironment object to STDOUT.

Which bits of information are printed depends on which of a group of debugging-variables are set to true.

The EvalEnvironment to print is specified as an index into the global array (Environment).

See also:
Environment
Parameters:
thisenvIndex into Environment indicating which EvalEnvironment should be displayed.

References eep, Environment, print_booltree(), print_evaltree(), show_compdfa, show_complete_dfa(), show_evaltree, show_gconstraints, show_patlist, and show_patternlist().

Referenced by debug_output().


Variable Documentation

int eep

Global eval environment pointer (actually an array index, not a pointer).

eep contains the index of the highest currently-occupied slot within Environment.

See also:
Environment

Referenced by check_alignment_constraints(), cqp_run_query(), debug_output(), do_SearchPattern(), free_environment(), free_environments(), initialize_cqp(), next_environment(), prepare_Query(), regex2dfa(), show_environment(), and simulate_dfa().

EvalEnvironment Environment[MAXENVIRONMENT]