languages/compiler/header.h File Reference

#include "syswords2.h"

Include dependency graph for header.h:

Go to the source code of this file.

Classes

struct  m_pair
struct  input
struct  include
struct  tokeniser
struct  name
struct  literalstring
struct  amongvec
struct  among
struct  grouping
struct  node
struct  analyser
struct  generator
struct  options

Defines

#define true   1
#define false   0
#define repeat   while(true)
#define unless(C)   if(!(C))
#define until(C)   while(!(C))
#define MALLOC   check_malloc
#define FREE   check_free
#define NEW(type, p)   struct type * p = (struct type *) MALLOC(sizeof(struct type))
#define NEWVEC(type, p, n)   struct type * p = (struct type *) MALLOC(sizeof(struct type) * n)
#define STARTSIZE   10
#define SIZE(p)   ((int *)(p))[-1]
#define CAPACITY(p)   ((int *)(p))[-2]

Typedefs

typedef unsigned char byte
typedef unsigned short symbol

Enumerations

enum  token_codes {
  c_among = 4, c_and, c_as, c_assign,
  c_assignto, c_atleast, c_atlimit, c_atmark,
  c_attach, c_backwardmode, c_backwards, c_booleans,
  c_bra, c_comment1, c_comment2, c_cursor,
  c_debug, c_decimal, c_define, c_delete,
  c_divide, c_divideassign, c_do, c_dollar,
  c_eq, c_externals, c_fail, c_false,
  c_for, c_ge, c_get, c_gopast,
  c_goto, c_gr, c_groupings, c_hex,
  c_hop, c_insert, c_integers, c_ket,
  c_le, c_leftslice, c_limit, c_loop,
  c_ls, c_maxint, c_minint, c_minus,
  c_minusassign, c_multiply, c_multiplyassign, c_ne,
  c_next, c_non, c_not, c_or,
  c_plus, c_plusassign, c_repeat, c_reverse,
  c_rightslice, c_routines, c_set, c_setlimit,
  c_setmark, c_size, c_sizeof, c_slicefrom,
  c_sliceto, c_stringdef, c_stringescapes, c_strings,
  c_substring, c_test, c_tolimit, c_tomark,
  c_true, c_try, c_unset, c_mathassign,
  c_name, c_number, c_literalstring, c_neg,
  c_call, c_grouping, c_booltest
}
enum  name_types {
  t_size = 6, t_string = 0, t_boolean = 1, t_integer = 2,
  t_routine = 3, t_external = 4, t_grouping = 5
}
enum  analyser_modes { m_forward = 0, m_backward }

Functions

symbolcreate_b (int n)
void report_b (FILE *out, symbol *p)
void lose_b (symbol *p)
symbolincrease_capacity (symbol *p, int n)
symbolmove_to_b (symbol *p, int n, symbol *q)
symboladd_to_b (symbol *p, int n, symbol *q)
symbolcopy_b (symbol *p)
char * b_to_s (symbol *p)
symboladd_s_to_b (symbol *p, const char *s)
struct str * str_new (void)
void str_delete (struct str *str)
void str_append (struct str *str, struct str *add)
void str_append_ch (struct str *str, char add)
void str_append_b (struct str *str, symbol *q)
void str_append_string (struct str *str, const char *s)
void str_append_int (struct str *str, int i)
void str_clear (struct str *str)
void str_assign (struct str *str, char *s)
struct str * str_copy (struct str *old)
symbolstr_data (struct str *str)
int str_len (struct str *str)
int get_utf8 (const symbol *p, int *slot)
int put_utf8 (int ch, symbol *p)
symbolget_input (symbol *p)
struct tokenisercreate_tokeniser (symbol *b)
int read_token (struct tokeniser *t)
bytename_of_token (int code)
void close_tokeniser (struct tokeniser *t)
void * check_malloc (int n)
void check_free (void *p)
void print_program (struct analyser *a)
struct analysercreate_analyser (struct tokeniser *t)
void close_analyser (struct analyser *a)
void read_program (struct analyser *a)
struct generatorcreate_generator_c (struct analyser *a, struct options *o)
void close_generator_c (struct generator *g)
void generate_program_c (struct generator *g)
struct generatorcreate_generator_java (struct analyser *a, struct options *o)
void close_generator_java (struct generator *g)
void generate_program_java (struct generator *g)

Variables

int space_count


Define Documentation

#define CAPACITY (  )     ((int *)(p))[-2]

#define false   0

Definition at line 6 of file header.h.

#define FREE   check_free

Definition at line 12 of file header.h.

#define MALLOC   check_malloc

Definition at line 11 of file header.h.

#define NEW ( type,
 )     struct type * p = (struct type *) MALLOC(sizeof(struct type))

Definition at line 14 of file header.h.

#define NEWVEC ( type,
p,
 )     struct type * p = (struct type *) MALLOC(sizeof(struct type) * n)

Definition at line 15 of file header.h.

#define repeat   while(true)

Definition at line 7 of file header.h.

#define SIZE (  )     ((int *)(p))[-1]

#define STARTSIZE   10

Definition at line 17 of file header.h.

#define true   1

Definition at line 5 of file header.h.

#define unless (  )     if(!(C))

Definition at line 8 of file header.h.

#define until (  )     while(!(C))

Definition at line 9 of file header.h.

Referenced by Xapian::DatabaseReplica::Internal::apply_next_changeset().


Typedef Documentation

typedef unsigned char byte

Definition at line 2 of file header.h.

typedef unsigned short symbol

Definition at line 3 of file header.h.


Enumeration Type Documentation

Enumerator:
m_forward 
m_backward 

Definition at line 239 of file header.h.

enum name_types

Enumerator:
t_size 
t_string 
t_boolean 
t_integer 
t_routine 
t_external 
t_grouping 

Definition at line 197 of file header.h.

Enumerator:
c_among 
c_and 
c_as 
c_assign 
c_assignto 
c_atleast 
c_atlimit 
c_atmark 
c_attach 
c_backwardmode 
c_backwards 
c_booleans 
c_bra 
c_comment1 
c_comment2 
c_cursor 
c_debug 
c_decimal 
c_define 
c_delete 
c_divide 
c_divideassign 
c_do 
c_dollar 
c_eq 
c_externals 
c_fail 
c_false 
c_for 
c_ge 
c_get 
c_gopast 
c_goto 
c_gr 
c_groupings 
c_hex 
c_hop 
c_insert 
c_integers 
c_ket 
c_le 
c_leftslice 
c_limit 
c_loop 
c_ls 
c_maxint 
c_minint 
c_minus 
c_minusassign 
c_multiply 
c_multiplyassign 
c_ne 
c_next 
c_non 
c_not 
c_or 
c_plus 
c_plusassign 
c_repeat 
c_reverse 
c_rightslice 
c_routines 
c_set 
c_setlimit 
c_setmark 
c_size 
c_sizeof 
c_slicefrom 
c_sliceto 
c_stringdef 
c_stringescapes 
c_strings 
c_substring 
c_test 
c_tolimit 
c_tomark 
c_true 
c_try 
c_unset 
c_mathassign 
c_name 
c_number 
c_literalstring 
c_neg 
c_call 
c_grouping 
c_booltest 

Definition at line 103 of file header.h.


Function Documentation

symbol* add_s_to_b ( symbol p,
const char *  s 
)

symbol* add_to_b ( symbol p,
int  n,
symbol q 
)

char* b_to_s ( symbol p  ) 

void check_free ( void *  p  ) 

void* check_malloc ( int  n  ) 

void close_analyser ( struct analyser a  ) 

void close_generator_c ( struct generator g  ) 

void close_generator_java ( struct generator g  ) 

void close_tokeniser ( struct tokeniser t  ) 

symbol* copy_b ( symbol p  ) 

struct analyser* create_analyser ( struct tokeniser t  )  [read]

symbol* create_b ( int  n  ) 

struct generator* create_generator_c ( struct analyser a,
struct options o 
) [read]

struct generator* create_generator_java ( struct analyser a,
struct options o 
) [read]

struct tokeniser* create_tokeniser ( symbol b  )  [read]

void generate_program_c ( struct generator g  ) 

void generate_program_java ( struct generator g  ) 

symbol* get_input ( symbol p  ) 

int get_utf8 ( const symbol p,
int *  slot 
)

symbol* increase_capacity ( symbol p,
int  n 
)

void lose_b ( symbol p  ) 

symbol* move_to_b ( symbol p,
int  n,
symbol q 
)

byte* name_of_token ( int  code  ) 

void print_program ( struct analyser a  ) 

int put_utf8 ( int  ch,
symbol p 
)

void read_program ( struct analyser a  ) 

int read_token ( struct tokeniser t  ) 

void report_b ( FILE *  out,
symbol p 
)

void str_append ( struct str *  str,
struct str *  add 
)

void str_append_b ( struct str *  str,
symbol q 
)

void str_append_ch ( struct str *  str,
char  add 
)

void str_append_int ( struct str *  str,
int  i 
)

void str_append_string ( struct str *  str,
const char *  s 
)

void str_assign ( struct str *  str,
char *  s 
)

void str_clear ( struct str *  str  ) 

struct str* str_copy ( struct str *  old  )  [read]

symbol* str_data ( struct str *  str  ) 

void str_delete ( struct str *  str  ) 

int str_len ( struct str *  str  ) 

struct str* str_new ( void   )  [read]


Variable Documentation


Documentation for Xapian (version 1.2.13).
Generated on 9 Jan 2013 by Doxygen 1.5.9.