macro.c File Reference

#include "macro.h"
#include "options.h"
#include "output.h"
#include "cqp.h"
#include "hash.h"
#include "eval.h"
#include "ranges.h"
#include "targets.h"
#include "corpmanag.h"
#include "parser.tab.h"
#include "../cl/macros.h"
#include <assert.h>
#include <strings.h>
#include <string.h>

Data Structures

Defines

Typedefs

Functions

Variables


Define Documentation

#define MACRO_HASH_BUCKETS   8000

Referenced by init_macros().


Typedef Documentation

typedef struct _InputBuffer * InputBuffer
typedef struct _MacroEntry * MacroEntry
typedef struct _MacroHashTable * MacroHashTable
typedef struct _MacroSegment * MacroSegment

Function Documentation

int define_macro ( char *  name,
int  args,
char *  argstr,
char *  definition 
)
int delete_macro_buffers ( int  trace  ) 
int expand_macro ( char *  name  ) 
void init_macros ( void   ) 
void list_macros ( char *  prefix  ) 
static int list_macros_sort ( const void *  p1,
const void *  p2 
) [static]

Referenced by list_macros().

void load_macro_file ( char *  filename  ) 
void macro_debug_newline_indent ( void   ) 

References buf, and _InputBuffer::next.

Referenced by expand_macro(), and yy_input_char().

void macro_iterator_new ( void   ) 

References iterator_bucket.

char* macro_iterator_next ( char *  prefix,
int *  nargs 
)
MacroEntry macro_iterator_next_macro ( char *  prefix  ) 
char* macro_iterator_next_prototype ( char *  prefix  ) 
void macro_statistics ( void   ) 
MacroSegment MacroAddSegment ( MacroEntry  macro  ) 
MacroEntry MacroHashAdd ( char *  str,
int  args 
)
void MacroHashDelete ( MacroEntry  macro  ) 
MacroEntry MacroHashLookup ( char *  str,
int  args 
)
void MakeMacroHash ( int  size  ) 
char* parse_macro_name ( char *  text,
int *  nr_of_args,
char **  prototype 
)

References cl_malloc().

Referenced by load_macro_file().

void PopInputBuffer ( void   ) 
char* preprocess_input_line ( char *  line  ) 

Referenced by load_macro_file().

void print_macro_definition ( char *  name,
int  args 
)
InputBuffer PushInputBuffer ( int  size  ) 
int yy_input_char ( void   ) 
int yy_input_from_macro ( void   ) 
int yylex ( void   ) 

Referenced by expand_macro().


Variable Documentation

int iterator_bucket = -1
char* macro_arg[10] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}

Referenced by expand_macro().

unsigned int pseudo_arg_counter = 0

Referenced by expand_macro().

FILE* yyin
char* yytext

Referenced by expand_macro().


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