cqp.h File Reference

#include <stdio.h>

Defines

Typedefs

Enumerations

Functions

Variables


Define Documentation

#define CQPMACRORC_NAME   ".cqpmacros"

Referenced by initialize_cqp().

#define CQPRC_NAME   ".cqprc"

Referenced by initialize_cqp().

#define False   0
#define MAXCQPFILES   20

The number of file handles CQP can store in its file-array (ie max number of nested files).

See also:
cqp_parse_file )

Referenced by cqp_parse_file().

#define QUERY_BUFFER_SIZE   2048

Size of the CQP query buffer.

Referenced by yy_input_char().

#define True   1

Typedef Documentation

typedef char Boolean

DEPRACATED means of storing a Boolean value.

typedef enum _cyctype CYCtype
typedef void(* InterruptCheckProc)(void)

Interrupt callback functions are of this type.


Enumeration Type Documentation

enum _cyctype
Enumerator:
NoExpression 
Query 
Activation 
SetOperation 
Assignment 

Function Documentation

void CheckForInterrupts (  ) 

Calls the interrupt callback function, if set.

References interruptCallbackHook.

Referenced by evaluate_target(), and simulate().

int cqp_parse_file ( FILE *  fd,
int  exit_on_parse_errors 
)

Parses a stream for CQP query syntax.

Note that cqp_parse_file() fclose()s fd unless it is STDOUT.

Parameters:
fd File handle of the file to parse.
exit_on_parse_errors Boolean: should CQP exit on parse errors?
Returns:
Boolean: true = all ok, false = a problem.

References child_process, cqp_file_p, cqp_files, current_corpus, exit_cqp, MAXCQPFILES, cl::mother_name, cl::name, quiet, reading_cqprc, save_on_exit, save_unsaved_subcorpora(), silent, cl::size, STREQ, yyin, yyparse(), and yyrestart().

Referenced by do_exec(), initialize_cqp(), and main().

int cqp_parse_string ( char *  s  ) 

Parses a stirng for CQP query syntax.

Parameters:
s The string to parse.
Returns:
Boolean: true = all ok, false = a problem.

References cqp_input_string, cqp_input_string_position, cqpmessage(), cqpserver, Error, exit_cqp, which_app, and yyparse().

Referenced by do_cqi_cqp_query(), and main().

void cqp_randomize ( void   ) 

Wrapper function: randomises the internal random number generator.

See also:
cl_randomize

References cl_randomize().

int initialize_cqp ( int  argc,
char **  argv 
)

Initialises the CQP program.

This function:

  • initialises the global variables;
  • initialises the built-in random number generator;
  • initialises the macro database;
  • parses the program options;
  • reads the initialisation file;
  • reads the macro initialisation file;
  • and loads the default corpus, if any.
Parameters:
argc The argc from main()
argv The argv from main()
Returns:
Always 1.

References batchfd, batchmode, check_available_corpora(), child_process, cl_randomize(), corpuslist, cqp_file_p, cqp_init_file, cqp_parse_file(), CQPMACRORC_NAME, cqpmessage(), CQPRC_NAME, cqpserver, default_corpus, eep, enable_macros, exit_cqp, init_macros(), macro_init_file, parse_options(), parser_debug, reading_cqprc, set_current_corpus_name(), UNDEF, Warning, and which_app.

Referenced by main().

void install_signal_handler ( void   ) 
int setInterruptCallback ( InterruptCheckProc  f  ) 

Sets the interrupt callback function.

Parameters:
f Pointer to the function to set as interrupt callback.
Returns:
Always 1.

References interruptCallbackHook.


Variable Documentation

Referenced by cqp_parse_string(), and yy_input_char().

Referenced by cqp_parse_string(), and yy_input_char().

int exit_cqp

1 iff exit-command was issued while parsing

Referenced by cqp_parse_file(), cqp_parse_string(), and initialize_cqp().

char QueryBuffer[QUERY_BUFFER_SIZE]

flag which signals buffer overflows

Referenced by after_CorpusCommand(), after_Query(), resetQueryBuffer(), and yy_input_char().

pointer into this buffer, for appending

Referenced by after_Query(), resetQueryBuffer(), and yy_input_char().

Boolean: true iff cqp_parse_file() - the main query syntax parsing function - is currently reading from the cqprc file handler.

See also:
cqprc
cqp_parse_file

Referenced by addHistoryLine(), cqp_parse_file(), initialize_cqp(), and yy_input_char().

char* searchstr

needs to be global, unfortunately

Referenced by do_SearchPattern(), do_StandardQuery(), GET(), prepare_input(), prepare_Query(), and regex2dfa().


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