CWB
|
Data Structures | |
union | c_tree |
Union of structures underlying the Constraint / Constrainttree objects. More... | |
struct | _ActualParamList |
The ActualParamList object: used to build a linked list of parameters, each one of which is a Constrainttree. More... | |
union | e_tree |
Underlying union for the Evaltree object. More... | |
union | _avs |
The AVStructure object. More... | |
struct | ctxtsp |
The Context object. More... | |
struct | evalenv |
The EvalEnvironment object: environment variables for the evaluation of a corpus query. More... | |
Macros | |
#define | repeat_inf -1 |
constant which indicates 'infinite repetition' More... | |
#define | repeat_none -2 |
constant which indicates 'no repetition' More... | |
#define | MAXPATTERNS 5000 |
Number of AVStructures to put in each Patternlist. More... | |
#define | MAXENVIRONMENT 10 |
maximum number of EvalEnvironments iin the global array More... | |
Typedefs | |
typedef union c_tree | Constraint |
Union of structures underlying the Constraint / Constrainttree objects. More... | |
typedef Constraint * | Constrainttree |
The Constrainttree object. More... | |
typedef struct _ActualParamList | ActualParamList |
The ActualParamList object: used to build a linked list of parameters, each one of which is a Constrainttree. More... | |
typedef union e_tree * | Evaltree |
Evaltree object. More... | |
typedef enum _avstype | AVSType |
typedef union _avs | AVStructure |
The AVStructure object. More... | |
typedef AVStructure * | AVS |
AVS is a pointer type for AVStructure. More... | |
typedef AVStructure | Patternlist [MAXPATTERNS] |
Patternlist is an array of AVStructures. More... | |
typedef struct ctxtsp | Context |
The Context object. More... | |
typedef struct evalenv | EvalEnvironment |
The EvalEnvironment object: environment variables for the evaluation of a corpus query. More... | |
typedef EvalEnvironment * | EEP |
EEPs are Eval Environment pointers. More... | |
Enumerations | |
enum | b_ops { b_and, b_or, b_implies, b_not, cmp_gt, cmp_lt, cmp_get, cmp_let, cmp_eq, cmp_neq, cmp_ex } |
Labels a boolean operation. More... | |
enum | wf_type { NORMAL, REGEXP, CID } |
Labels the type of a {what??}. More... | |
enum | bnodetype { bnode, cnode, func, sbound, pa_ref, sa_ref, string_leaf, int_leaf, float_leaf, id_list, var_ref } |
Labels the type of a boolean node. More... | |
enum | tnodetype { node, leaf, meet_union, tabular } |
Enumeration specifying different types of tree node. More... | |
enum | re_ops { re_od_concat, re_oi_concat, re_disj, re_repeat } |
enum | cooc_op { cooc_meet, cooc_union } |
enum | _avstype { Pattern, Tag, MatchAll, Anchor } |
enum | ctxtdir { leftright, left, right } |
enum | spacet { word, structure } |
Functions | |
int | next_environment () |
Sets up a new environment in the global array. More... | |
Boolean | eval_bool (Constrainttree ctptr, RefTab rt, int corppos) |
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). More... | |
void | cqp_run_mu_query (int keep_old_ranges, int cut_value) |
void | cqp_run_tab_query (int implode) |
int | free_environment (int thisenv) |
Frees an evaluation environment. More... | |
void | show_environment (int thisenv) |
Prints the contents of an EvalEnvironment object to STDOUT. More... | |
void | free_environments () |
Frees all eval environments in the global array, and sets the eep pointer to -1. More... | |
Variables | |
int | eep |
Global eval environment pointer (actually an array index, not a pointer). More... | |
EvalEnvironment | Environment [MAXENVIRONMENT] |
A global array of EvalEnvironment structures. More... | |
EEP | CurEnv |
EEP | evalenv |
#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 struct _ActualParamList ActualParamList |
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 union c_tree Constraint |
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.
typedef Constraint* Constrainttree |
The Constrainttree object.
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 AVStructure Patternlist[MAXPATTERNS] |
Patternlist is an array of AVStructures.
enum _avstype |
enum b_ops |
Labels a boolean operation.
enum bnodetype |
Labels the type of a boolean node.
enum cooc_op |
enum ctxtdir |
enum re_ops |
enum spacet |
enum tnodetype |
enum wf_type |
void cqp_run_mu_query | ( | int | keep_old_ranges, |
int | cut_value | ||
) |
References cl_malloc(), cqpmessage(), _Matchlist::end, Environment, Error, eval_mu_tree(), evalenv::evaltree, free_matchlist(), init_matchlist(), mark_offrange_cells(), evalenv::query_corpus, Reduce, set_corpus_matchlists(), Setop(), _Matchlist::start, and _Matchlist::tabsize.
Referenced by do_MUQuery().
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).
References eep, hard_cut, and simulate_dfa().
Referenced by do_StandardQuery().
void cqp_run_tab_query | ( | int | implode | ) |
References calculate_initial_matchlist(), cl_malloc(), _Matchlist::end, Environment, evalenv::evaltree, free_matchlist(), hard_boundary, init_matchlist(), mark_offrange_cells(), e_tree::max_dist, e_tree::min_dist, e_tree::next, e_tree::patindex, evalenv::patternlist, evalenv::query_corpus, Reduce, repeat_inf, set_corpus_matchlists(), Setop(), _Matchlist::start, e_tree::tab_el, _Matchlist::tabsize, tabular, and e_tree::type.
Referenced by do_TABQuery().
Boolean eval_bool | ( | Constrainttree | ctptr, |
RefTab | rt, | ||
int | corppos | ||
) |
References ATTAT_FLOAT, ATTAT_INT, ATTAT_NONE, ATTAT_PAREF, ATTAT_POS, ATTAT_STRING, ATTAT_VAR, c_tree::attr, b_and, b_implies, b_not, b_or, bnode, CDA_OK, cderrno, _DCR::charres, cl_regex_match(), cmp_eq, cmp_ex, cmp_get, cmp_gt, cmp_let, cmp_lt, cmp_neq, cnode, c_tree::constnode, cqpmessage(), c_tree::delete, Error, eval_bool(), eval_debug, EvaluationIsRunning, False, float_leaf, _DCR::floatres, func, get_id_at_position, get_label_referenced_position(), get_leaf_value(), get_string_of_id, get_struc_attribute, id_list, c_tree::idlist, int_leaf, intcompare(), _DCR::intres, c_tree::is_closing, c_tree::items, c_tree::label, c_tree::leaf, c_tree::left, _label_entry::name, c_tree::negated, c_tree::node, NORMAL, c_tree::nr_items, c_tree::op_id, pa_ref, _DCR::parefres, c_tree::pat_type, _label_entry::ref, REGEXP, c_tree::right, c_tree::rx, sa_ref, sbound, c_tree::sbound, set_reftab(), STREQ, string_leaf, c_tree::strucattr, True, c_tree::type, _DCR::type, c_tree::val, and _DCR::value.
Referenced by calculate_initial_matchlist_1(), eval_bool(), eval_constraint(), evaluate_subset(), evaluate_target(), and simulate().
int free_environment | ( | int | thisenv | ) |
Frees an evaluation environment.
The environment must be one currently occupied within the global array.
thisenv | The eval environment to free. |
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, cl::type, ctxtsp::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 | ( | ) |
Sets up a new environment in the global array.
The next slot upwards is used (and eep is incremented).
References ctxtsp::attrib, CurEnv, ctxtsp::direction, eep, Environment, evalenv::evaltree, evalenv::gconstraint, evalenv::has_target_indicator, init_dfa(), evalenv::labels, leftright, evalenv::match_label, evalenv::matchend_label, MAXENVIRONMENT, evalenv::MaxPatIndex, evalenv::negated, new_symbol_table(), evalenv::query_corpus, evalenv::search_context, ctxtsp::size, evalenv::target_label, ctxtsp::type, and word.
Referenced by ActivateCorpus(), after_CorpusSetExpr(), prepare_AlignmentConstraints(), and prepare_Query().
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).
thisenv | Index 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().
EEP CurEnv |
Referenced by ActivateCorpus(), after_CorpusSetExpr(), do_AnchorPoint(), do_IDReference(), do_LabelReference(), do_MUQuery(), do_NamedWfPattern(), do_SearchPattern(), do_TABQuery(), do_WordformPattern(), do_XMLTag(), eval_mu_tree(), next_environment(), prepare_AlignmentConstraints(), and prepare_Query().
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.
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] |
A global array of EvalEnvironment structures.
Referenced by check_alignment_constraints(), cqp_run_mu_query(), cqp_run_tab_query(), do_Description(), do_MUQuery(), do_StandardQuery(), do_TABQuery(), free_environment(), next_environment(), prepare_AlignmentConstraints(), prepare_Query(), print_evaltree(), print_pattern(), regex2dfa(), show_environment(), show_patternlist(), and simulate_dfa().
Referenced by check_alignment_constraints().