CWB
|
matching strategy
More...Labels for the types of CQP option.
More...#define CQP_FALLBACK_PAGER "more" |
Referenced by open_stream().
#define DEFAULT_CONTEXT 25 |
Default value for the context scope configuration option (counted in characters)
Referenced by set_default_option_values().
#define DEFAULT_HARDBOUNDARY 100 |
Default value for the HardBoundary configuration option.
#define DEFAULT_LOCAL_PATH_ENV_VAR "CQP_LOCAL_CORP_DIR" |
Referenced by do_save().
#define OPTION_CQP 1 |
Flag for CQP configuration options: is this visible interactively in CQP?
Referenced by print_option_values().
typedef struct _cqpoption CQPOption |
A CQPOption represents a single configuration option for CQP.
It does not actually contain the config-option itself; that is held as a global variable somewhere. Instead, it holds metadata about the config-option, including a pointer to the actual variable.
Note it's possible to have wo CQPOption objects referring to the same actual variable - in this case the two option names in question would be synonymous.
enum _matching_strategy |
enum _opttype |
enum _which_app |
int find_option | ( | char * | s | ) |
Finds the index of an option.
Return the index in the global options array of the option with name s. This should be never called from outside.
s | Name of the option to find (or abbreviation); matched case-insensitively. |
References _cqpoption::opt_name.
Referenced by parse_options(), print_option_value(), print_option_values(), set_context_option_value(), set_integer_option_value(), and set_string_option_value().
void parse_options | ( | int | argc, |
char ** | argv | ||
) |
void print_option_value | ( | int | opt | ) |
References ALIGN_CONTEXT, CHAR_CONTEXT, find_option(), GlobalPrintOptions, _print_option_rec_::number_lines, OptBoolean, OptContext, OptInteger, OptString, _print_option_rec_::print_border, _print_option_rec_::print_header, print_option_value(), _print_option_rec_::print_tabular, _print_option_rec_::print_wrap, STRUC_CONTEXT, and WORD_CONTEXT.
Referenced by print_option_value(), and print_option_values().
void print_option_values | ( | ) |
Prints out the values of all the CQP configuration options.
References find_option(), _cqpoption::opt_name, OPTION_CQP, print_option_value(), silent, and user_level.
char* set_context_option_value | ( | char * | opt_name, |
char * | sval, | ||
int | ival | ||
) |
References CD, CHAR_CONTEXT, cl_free, cl_strdup(), execute_side_effects(), find_option(), _context_description_block::left_structure, _context_description_block::left_structure_name, _context_description_block::left_type, _context_description_block::left_width, OptContext, _context_description_block::right_structure, _context_description_block::right_structure_name, _context_description_block::right_type, _context_description_block::right_width, STRUC_CONTEXT, and WORD_CONTEXT.
Referenced by set_integer_option_value(), and set_string_option_value().
char* set_integer_option_value | ( | char * | opt_name, |
int | value | ||
) |
Sets an integer-valued option.
An error string (function-internal constant, do NOT free) is returned if the type of the option does not correspond to the function which is called. Upon success, NULL is returned.
opt_name | The name of the option to set. |
value | Its new value. |
References execute_side_effects(), find_option(), OptBoolean, OptContext, OptInteger, set_context_option_value(), and validate_integer_option_value().
Referenced by open_stream().
char* set_string_option_value | ( | char * | opt_name, |
char * | value | ||
) |
Sets a string-valued option.
An error string (function-internal constant, do NOT free) is returned if the type of the option does not correspond to the function which is called. Upon success, NULL is returned.
set_string_option_value does NOT strdup the value!
opt_name | The name of the option to set. |
value | Its new value. |
References execute_side_effects(), expand_filename(), find_option(), OptContext, OptString, set_context_option_value(), and validate_string_option_value().
Referenced by do_SimpleVariableReference(), do_StringConstraint(), and open_stream().
if true, the CL's debug message setting is set to On.
Referenced by execute_side_effects(), parse_options(), and set_default_option_values().
int auto_save |
automatically save subcorpora
Referenced by after_CorpusCommand(), assign_temp_to_sub(), copy_intervals(), delete_intervals(), duplicate_corpus(), main(), and parse_options().
int autoshow |
UI option: show query results after evaluation (otherwise, just print number of matches)
Referenced by after_CorpusCommand(), main(), and parse_options().
FILE* batchfd |
Referenced by initialize_cqp(), main(), and parse_options().
int batchmode |
set by -f {file} option (don't read ~/.cqprc, then process input from {file})
Referenced by initialize_cqp(), main(), and parse_options().
The global context descriptor.
Referenced by ascii_print_corpus_header(), catalog_corpus(), do_attribute_show(), execute_side_effects(), html_print_corpus_header(), html_print_output(), latex_print_corpus_header(), latex_print_output(), parse_options(), print_concordance_line(), set_context_option_value(), set_current_corpus(), set_default_option_values(), sgml_print_corpus_header(), and sgml_print_output().
int child_process |
Child process mode (used by Perl interface (CQP.pm) and by CQPweb (cqp.inc.php))
This global variable is a Boolean: child process mode on or off.
Referenced by cqp_parse_file(), initialize_cqp(), main(), and parse_options().
char* cqp_history_file |
filename where CQP command history will be saved
Referenced by addHistoryLine().
char* cqp_init_file |
changed from 'init_file' because of clash with a # define in {term.h}
Referenced by initialize_cqp(), parse_options(), and set_default_option_values().
Global array of options for CQP.
int debug_simulation |
if true, debug messages are printed when simulating an NFA.
Referenced by parse_options(), and simulate().
char* def_unbr_attr |
Query option: unbracketed attribute (attribute matched by "..." patterns)
Referenced by do_SimpleVariableReference(), and do_StringConstraint().
char* default_corpus |
corpus specified with -D {corpus}
Referenced by initialize_cqp(), and parse_options().
int enable_macros |
enable macros only at user request in case they introduce compatibility problems
Referenced by initialize_cqp(), list_macros(), macro_iterator_next_macro(), parse_options(), and print_macro_definition().
int eval_debug |
if true, assorted debug messages related to query evaluation are printed
Referenced by calculate_initial_matchlist_1(), eval_bool(), get_label_referenced_position(), get_leaf_value(), get_matched_corpus_positions(), and parse_options().
char* ExternalGroupingCommand |
(option which should not exist) external group command to use
Referenced by ComputeGroupExternally(), and set_default_option_values().
char* ExternalSortingCommand |
(option which should not exist) external sort command to use
Referenced by set_default_option_values(), and SortExternally().
int handle_sigpipe |
Referenced by catalog_corpus(), parse_options(), and set_default_option_values().
int hard_boundary |
Query option: use implicit 'within' clause (unless overridden by explicit spec)
Referenced by cqp_run_tab_query(), and parse_options().
int hard_cut |
Query option: use hard cut value for all queries (cannot be changed)
Referenced by cqp_run_query().
int highlighting |
UI option: highlight match / fields in terminal output? (default = yes)
Referenced by ascii_print_output(), and parse_options().
Boolean: inhibit corpus activations in parser.
Referenced by ActivateCorpus(), parse_options(), and set_default_option_values().
if true, debug messages relating to the initial set of candidate matches are printed.
Referenced by get_corpus_positions(), get_matched_corpus_positions(), parse_options(), and simulate_dfa().
int insecure |
Boolean: != 0 means we should not allow pipes etc.
(For example, in CGI.)
Referenced by compute_grouping(), open_input_stream(), open_stream(), parse_options(), and SortSubcorpus().
char* left_delimiter |
kwic option: the match start prefix (defaults to '<')
Referenced by print_concordance_line().
char* less_charset_variable |
UI option: name of environment variable for controlling less charset (usually LESSCHARSET)
Referenced by open_pager().
char* licensee |
Referenced by parse_options().
char* LOCAL_CORP_PATH |
directory where subcorpora are stored (saved & loaded)
Referenced by check_available_corpora(), do_save(), get_fulllocalpath(), load_corpusnames(), parse_options(), save_subcorpus(), and save_unsaved_subcorpora().
int localhost |
cqpserver option: accept local connections (loopback) only
Referenced by accept_connection(), main(), parse_options(), and set_default_option_values().
int macro_debug |
enable debugging of macros (and print macro hash stats on shutdown).
Referenced by expand_macro(), main(), parse_options(), and yy_input_char().
char* macro_init_file |
secondary init file for loading macro definitions (not read if macros are disabled)
Referenced by initialize_cqp(), parse_options(), and set_default_option_values().
Referenced by do_StandardQuery(), execute_side_effects(), set_default_option_values(), and simulate().
char* matching_strategy_name |
The matching strategy option: which is implemented as a vstring option with side-effect.
Referenced by execute_side_effects().
char* pager |
UI option: pager program to used for paged kwic display.
Referenced by open_stream(), and parse_options().
int paging |
UI option: activate/deactivate paging of query results.
Referenced by main(), open_stream(), and parse_options().
int parseonly |
if true, queries are only parsed, not evaluated.
Referenced by do_MUQuery(), do_StandardQuery(), and do_TABQuery().
int parser_debug |
if true, the parser's internal Bison-generated debug setting is turned on.
Referenced by initialize_cqp(), and parse_options().
int pretty_print |
UI option: pretty-print most of CQP's output (turn off to simplify parsing of CQP output)
Referenced by ascii_print_group(), list_macros(), PrintContextDescriptor(), show_corpora_files1(), and SortSubcorpus().
char* printModeOptions |
kwic option: some printing options
Referenced by ParsePrintOptions().
char* printModeString |
kwic option: string of current printmode
Referenced by execute_side_effects().
int printNrMatches |
kwic option: -> 'cat' prints number of matches in first line (do we need this?)
Referenced by catalog_corpus().
char* printStructure |
kwic option: show annotations of structures containing match
Referenced by ComputePrintStructures().
int private_server |
cqpserver option: makes CQPserver accept a single connection only
Referenced by accept_connection(), parse_options(), and set_default_option_values().
char* progname |
Referenced by align_parse_args(), align_usage(), alignencode_parse_args(), alignencode_usage(), alignshow_parse_args(), alignshow_print_help(), alignshow_print_next_region(), alignshow_usage(), compressrdx_usage(), cqp_usage(), cwbci_usage(), decode_usage(), describecorpus_usage(), encode_parse_options(), encode_usage(), huffcode_usage(), lexdecode_show(), lexdecode_usage(), main(), makeall_usage(), parse_options(), sdecode_usage(), and sencode_usage().
int progress_bar |
UI option: show progress bar during query execution.
Referenced by ComputeGroupInternally(), do_subset(), evaluate_subset(), evaluate_target(), prepare_do_subset(), simulate(), simulate_dfa(), and sum_freqs().
int query_lock |
cqpserver option: safe mode for network/HTTP servers (allow query execution only)
Referenced by do_cqi_cqp_query().
cqpserver option: set for CQPserver's sake to detect attempted query lock violation
int query_optimize |
Query option: use query optimisation (untested and expensive optimisations)
Referenced by execute_side_effects(), matchfirstpattern(), and set_default_option_values().
char* query_string |
query specified on command line (-E {string}, cqpcl only)
Referenced by main(), parse_options(), and set_default_option_values().
int rangeoutput |
(option which should not exist)
Referenced by catalog_corpus(), and parse_options().
char* registry |
registry directory
Referenced by load_corpusnames(), main(), nqrfile_print_info(), parse_options(), printAlignedStrings(), and sencode_parse_options().
char* right_delimiter |
kwic option: the match end suffix (defaults to '>')
Referenced by print_concordance_line().
int save_on_exit |
save unsaved subcorpora upon exit
Referenced by cqp_parse_file().
int search_debug |
if true, the evaltree of a pattern is pretty-printed before the DFA is created.
Referenced by do_SearchPattern(), and parse_options().
int server_debug |
cqpserver option: debugging output (print debug messages to standard error)
Referenced by accept_connection(), cqi_activate_corpus(), cqi_lookup_attribute(), cqi_read_command(), do_cqi_cl_alg2cpos(), do_cqi_cl_attribute_size(), do_cqi_cl_cpos2alg(), do_cqi_cl_cpos2id(), do_cqi_cl_cpos2lbound(), do_cqi_cl_cpos2rbound(), do_cqi_cl_cpos2str(), do_cqi_cl_cpos2struc(), do_cqi_cl_drop_attribute(), do_cqi_cl_id2cpos(), do_cqi_cl_id2freq(), do_cqi_cl_id2str(), do_cqi_cl_idlist2cpos(), do_cqi_cl_lexicon_size(), do_cqi_cl_regex2id(), do_cqi_cl_str2id(), do_cqi_cl_struc2cpos(), do_cqi_cl_struc2str(), do_cqi_corpus_attributes(), do_cqi_corpus_charset(), do_cqi_corpus_full_name(), do_cqi_corpus_list_corpora(), do_cqi_corpus_properties(), do_cqi_corpus_structural_attribute_has_values(), do_cqi_cqp_drop_subcorpus(), do_cqi_cqp_dump_subcorpus(), do_cqi_cqp_fdist_1(), do_cqi_cqp_fdist_2(), do_cqi_cqp_list_subcorpora(), do_cqi_cqp_query(), do_cqi_cqp_subcorpus_has_field(), do_cqi_cqp_subcorpus_size(), interpreter(), parse_options(), and send_cl_error().
int server_log |
cqpserver option: logging (print log messages to standard output)
Referenced by accept_connection(), do_cqi_cqp_query(), main(), and parse_options().
int server_port |
cqpserver option: CQPserver's listening port (if 0, listens on CQI_PORT)
Referenced by main(), parse_options(), and set_default_option_values().
int server_quit |
cqpserver option: spawn server and return to caller (for CQI::Server.pm)
Referenced by accept_connection(), parse_options(), and set_default_option_values().
int show_compdfa |
if true, the complete DFA is printed when an EvalEnvironment is displayed
Referenced by parse_options(), and show_environment().
int show_dfa |
if true, the regex2dfa module will print out the states of the DFA after it is parsed.
Referenced by parse_options(), and regex2dfa().
int show_evaltree |
if true, the evaluation tree is printed when an EvalEnvironment is displayed
Referenced by parse_options(), and show_environment().
if true, the tree of global contraints is printed when an EvalEnvironment is displayed
Referenced by parse_options(), and show_environment().
int show_patlist |
if true, the pattern list is printed when an EvalEnvironment is displayed
Referenced by parse_options(), and show_environment().
int show_symtab |
Doesn't seem to be used anywhere; should show_environment use it? if not, remove? TODO.
Referenced by parse_options().
kwic option: show values of s-attributes as SGML tag attributes in kwic lines
Referenced by get_position_values().
int show_targets |
kwic option: show numbers of target anchors in brackets
Referenced by ascii_print_field(), do_attribute_show(), and PrintContextDescriptor().
int silent |
Disables some messages & warnings (used rather inconsistently).
NEW: suppresses cqpmessage() unless it is an error.
Referenced by addHistoryLine(), after_CorpusCommand(), cqp_parse_file(), cqpmessage(), cwbci_parse_options(), define_macro(), encode_add_wattr_line(), encode_parse_options(), get_corpus_positions(), get_matched_corpus_positions(), load_corpusnames(), main(), matchfirstpattern(), parse_options(), ParsePrintOptions(), print_option_values(), range_close(), range_open(), and sencode_parse_options().
int snoop |
cqpserver option: monitor CQi network communication
Referenced by cqi_flush(), cqi_read_bool_list(), cqi_read_byte_list(), cqi_read_int(), cqi_read_int_list(), cqi_read_string(), cqi_read_string_list(), cqi_read_word(), cqi_recv_byte(), cqi_recv_bytes(), cqi_send_byte(), cqi_send_int(), cqi_send_string(), cqi_send_word(), and parse_options().
int strict_regions |
boolean: expression between {s} ...
{/s} tags is constrained to single {s} region
Referenced by do_XMLTag(), eval_constraint(), and simulate().
int subquery |
Query option: use auto-subquery mode.
Referenced by after_CorpusCommand(), and parse_options().
int symtab_debug |
if this AND debug_simulation are true, print extra messages relating to eval environment labels when simulating an NFA.
Referenced by parse_options(), and simulate().
char* tested_pager |
UI option: CQP tests if selected pager works & will fall back to "more" if it doesn't.
Referenced by open_pager(), and set_default_option_values().
int timing |
UI option: time queries (printed after execution)
Referenced by do_start_timer(), and do_timing().
int tree_debug |
if true, extra messages are embedded when an evaluation tree is pretty-printed
Referenced by print_booltree().
int use_colour |
UI option: use colours for terminal output (experimental)
Referenced by main(), and parse_options().
int use_readline |
UI option: use GNU Readline for input line editing if available.
Referenced by main(), and parse_options().
(option which should not exist) use external grouping algorithm
Referenced by ascii_print_group(), and compute_grouping().
(option which should not exist) use external sorting algorithm
Referenced by SortSubcorpus().
int user_level |
(option which should not exist) user level: 0 == normal, 1 == advanced, 2 == expert)
Referenced by ensure_corpus_size(), and print_option_values().
int verbose_parser |
if true, absolutely all messages from the parser get printed (inc Message-level).
Referenced by cqpmessage(), and parse_options().
enum _which_app which_app |
Controls whether CQP command history is written to file.
Referenced by addHistoryLine(), and yy_input_char().