options.h File Reference

#include "../cl/globals.h"
#include "concordance.h"

Data Structures

Defines

Typedefs

Enumerations

Functions

Variables


Define Documentation

#define CQP_FALLBACK_PAGER   "more"

Referenced by open_stream().

#define DEFAULT_CONTEXT   25
#define DEFAULT_HARDBOUNDARY   100
#define DEFAULT_LOCAL_PATH_ENV_VAR   "CQP_LOCAL_CORP_DIR"

Referenced by do_save().

#define OPTION_CQP   1

Referenced by print_option_values().


Typedef Documentation

typedef struct _cqpoption CQPOption

A CQPOption represents a single configuration option for CQP.

typedef enum _opttype OptType

Labels for the types of CQP option.


Enumeration Type Documentation

Enumerator:
traditional 
shortest_match 
standard_match 
longest_match 
enum _opttype

Labels for the types of CQP option.

Enumerator:
OptInteger 
OptString 
OptBoolean 
OptContext 
enum _which_app
Enumerator:
undef 
cqp 
cqpcl 
cqpserver 

Function Documentation

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.

See also:
cqpoptions
Parameters:
s Name of the option to find.
Returns:
Index of element in cqpoptions corresponding to the name s, or -1 if no corresponding element was found.

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  ) 
void print_option_values (  ) 
char* set_context_option_value ( char *  opt_name,
char *  sval,
int  ival 
)
char* set_integer_option_value ( char *  opt_name,
int  value 
)

Sets an integer or string-valued option.

An error string is returned if the type of the option does not correspond to the function which is called. Upon success, NULL is returned.

Parameters:
opt_name The name of the option to set.
value Its new value.
Returns:
NULL if all OK; otherwise a string describing the problem.

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 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!

Parameters:
opt_name The name of the option to set.
value Its new value.
Returns:
NULL if all OK; otherwise a string describing the problem.

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().


Variable Documentation

int auto_save
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().

Child process mode (used by Perl interface (CQP.pm))

  • don't automatically read in user's .cqprc and .cqpmacros
  • print CQP version on startup
  • now: output blank line after each command -> SHOULD BE CHANGED
  • command ".EOL.;" prints special line (``-::-EOL-::-''), which parent can use to recognise end of output
  • print message "PARSE ERROR" on STDERR when a parse error occurs (which parent can easily recognise).

This global variable is a Boolean: child process mode on or off.

Referenced by cqp_parse_file(), initialize_cqp(), main(), and parse_options().

CQP command history.

Referenced by addHistoryLine().

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.

Referenced by parse_options(), and simulate().

Query option: unbracketed attribute (attribute matched by "..." patterns).

Referenced by do_SimpleVariableReference(), and do_StringConstraint().

corpus specified with -D {corpus}

Referenced by initialize_cqp(), and parse_options().

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().

(option which should not exist) external group command to use

Referenced by ComputeGroupExternally(), and set_default_option_values().

(option which should not exist) external sort command to use

Referenced by set_default_option_values(), and SortExternally().

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().

UI option: highlight match / fields in terminal output? (default = yes).

Referenced by ascii_print_output(), and parse_options().

int insecure

kwic option: the match start prefix (defaults to '<')

Referenced by print_concordance_line().

UI option: name of environment variable for controlling less charset (usu.

LESSCHARSET)

Referenced by open_pager().

char* licensee

Referenced by parse_options().

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().

enable debugging of macros

Referenced by expand_macro(), main(), parse_options(), and yy_input_char().

secondary init file for loading macro definitions (not read if macros are disabled)

Referenced by initialize_cqp(), parse_options(), and set_default_option_values().

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

Referenced by initialize_cqp(), and parse_options().

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().

kwic option: some printing options

Referenced by ParsePrintOptions().

kwic option: string of current printmode

Referenced by execute_side_effects().

kwic option: -> 'cat' prints number of matches in first line (do we need this?)

Referenced by catalog_corpus().

kwic option: show annotations of structures containing match

Referenced by ComputePrintStructures().

cqpserver option: makes CQPserver accept a single connection only

Referenced by accept_connection(), parse_options(), and set_default_option_values().

char* progname

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().

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

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().

(option which should not exist)

Referenced by catalog_corpus(), and parse_options().

char* registry

kwic option: the match end suffix (defaults to '>')

Referenced by print_concordance_line().

save unsaved subcorpora upon exit

Referenced by cqp_parse_file().

Referenced by do_SearchPattern(), and parse_options().

cqpserver option: logging

Referenced by accept_connection(), do_cqi_cqp_query(), main(), and parse_options().

cqpserver option: CQPserver's listening port (if 0, listens on CQI_PORT)

Referenced by main(), parse_options(), and set_default_option_values().

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_dfa

Referenced by parse_options(), and regex2dfa().

Referenced by parse_options().

kwic option: show values of s-attributes as SGML tag attributes in kwic lines

Referenced by get_position_values().

kwic option: show numbers of target anchors in brackets

Referenced by ascii_print_field(), do_attribute_show(), and PrintContextDescriptor().

int silent
int snoop

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().

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().

Referenced by print_booltree().

UI option: use colours for terminal output (experimental).

Referenced by main(), and parse_options().

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().

(option which should not exist) user level: 0 == normal, 1 == advanced, 2 == expert)

Referenced by ensure_corpus_size(), and print_option_values().

Referenced by cqpmessage(), and parse_options().

Controls whether CQP command history is written to file.

Referenced by addHistoryLine(), and yy_input_char().


Generated on Sun Feb 28 18:08:04 2010 for CWB by  doxygen 1.6.1