C:/Users/Dennis/src/lang/bertrand/BERTRAND/bertrand/ops.c File Reference

#include "def.h"

Go to the source code of this file.

Defines

#define OP_BYTES   1024
#define ALIGN   4

Functions

OPop_new (int pl)
void op_mem_free ()
void op_put (OP **oplist, OP *op)
char * arity_name (short arity)
void op_list_print (OP *op)
void ops_print ()

Variables

OPsingle_op = NULL
OPdouble_op = NULL
OPname_op = NULL
OPtype_op = NULL
static char * op_mem = NULL
static int free_byte = OP_BYTES


Define Documentation

#define ALIGN   4

Definition at line 24 of file ops.c.

Referenced by op_mem_free(), and op_new().

#define OP_BYTES   1024

Definition at line 19 of file ops.c.

Referenced by op_mem_free(), and op_new().


Function Documentation

char* arity_name ( short  arity  ) 

Definition at line 237 of file ops.c.

References BINARY, LEFT, NONASSOC, NULLARY, OP_NAME, OP_NUM, OP_STR, OUTFIX1, OUTFIX2, POSTFIX, PREFIX, RIGHT, and UNARY.

Referenced by expr_copy(), expr_free(), expr_print(), instantiate(), match_sub(), op_define(), op_list_print(), op_put(), primitive_define(), primitive_execute(), reduce(), and type_define().

void op_list_print ( OP op  ) 

Definition at line 267 of file ops.c.

References arity_name(), NULLARY, OUTFIX1, and OUTFIX2.

Referenced by ops_print().

void op_mem_free (  ) 

Definition at line 82 of file ops.c.

References ALIGN, free_byte, rule::next, NULL, OP_BYTES, op_mem, and rule_free().

Referenced by init().

OP* op_new ( int  pl  ) 

Definition at line 40 of file ops.c.

References ALIGN, error(), op::eval, free_byte, op::hash, op::length, NULL, OP_BYTES, op_mem, op::other, and op::super.

Referenced by init(), op_create(), parse(), primitive(), and type_define().

void op_put ( OP **  oplist,
OP op 
)

Definition at line 135 of file ops.c.

References op::arity, arity_name(), BINARY, error(), op::next, NULL, op::other, op::pname, and UNARY.

Referenced by op_create(), primitive(), and type_define().

void ops_print (  ) 

Definition at line 293 of file ops.c.

References op_list_print().


Variable Documentation

OP* double_op = NULL

Definition at line 15 of file ops.c.

int free_byte = OP_BYTES [static]

Definition at line 21 of file ops.c.

Referenced by op_mem_free(), and op_new().

OP* name_op = NULL

Definition at line 16 of file ops.c.

Referenced by init().

char* op_mem = NULL [static]

Definition at line 20 of file ops.c.

Referenced by op_mem_free(), and op_new().

OP* single_op = NULL

Definition at line 14 of file ops.c.

OP* type_op = NULL

Definition at line 17 of file ops.c.


Generated on Fri Jan 25 09:58:43 2008 for Bertrand by  doxygen 1.5.4