CWB
|
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "../cl/macros.h"
#include "../cl/attributes.h"
#include "../cl/cdaccess.h"
#include "matchlist.h"
#include "output.h"
#include "eval.h"
void free_matchlist | ( | Matchlist * | matchlist | ) |
Frees all the memory used within a matchlist, and re-initialises all its variables.
References cl_free, _Matchlist::end, init_matchlist(), _Matchlist::start, and _Matchlist::target_positions.
Referenced by calculate_initial_matchlist_1(), check_alignment_constraints(), cqp_run_mu_query(), cqp_run_tab_query(), eval_mu_tree(), Setop(), simulate(), simulate_dfa(), and try_optimization().
void init_matchlist | ( | Matchlist * | matchlist | ) |
Initialise the memebrs of the given Matchlist object.
References _Matchlist::end, _Matchlist::is_inverted, _Matchlist::matches_whole_corpus, _Matchlist::start, _Matchlist::tabsize, and _Matchlist::target_positions.
Referenced by calculate_initial_matchlist_1(), check_alignment_constraints(), cqp_run_mu_query(), cqp_run_tab_query(), eval_mu_tree(), free_matchlist(), simulate_dfa(), and try_optimization().
Perform "operation" on the two match lists (can be initial).
The result is assigned to list1.
this whole code is WRONG when one of the matchlists is inverted TODO!
Also TODO: give it a better name.
This contains, by far, most of the code in the Matchlist module.
References access_corpus(), ATT_POS, CDA_OK, cl_errno, cl_free, cl_malloc(), cl_max_cpos(), cl_realloc(), Complement, cl::corpus, DEFAULT_ATT_NAME, _Matchlist::end, find_attribute, free_matchlist(), Identity, Intersection, _Matchlist::is_inverted, _Matchlist::matches_whole_corpus, MIN, evalenv::query_corpus, Reduce, Setop(), _Matchlist::start, _Matchlist::tabsize, _Matchlist::target_positions, Union, and Uniq.
Referenced by calculate_initial_matchlist(), calculate_initial_matchlist_1(), cqp_run_mu_query(), cqp_run_tab_query(), eval_mu_tree(), matchfirstpattern(), Setop(), simulate_dfa(), and try_optimization().
void show_matchlist | ( | Matchlist | matchlist | ) |
Prints the entire contents of a Matchlist to NULL.
References _Matchlist::end, _Matchlist::is_inverted, _Matchlist::start, _Matchlist::tabsize, and _Matchlist::target_positions.
Referenced by simulate_dfa().
void show_matchlist_firstelements | ( | Matchlist | matchlist | ) |
Prints the first few elements of a matchlist to NULL.
"First few" equals up to 1000.
Only the start positions are printed.
References _Matchlist::start, and _Matchlist::tabsize.
Referenced by simulate_dfa().