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

#include "def.h"
#include <ctype.h>

Go to the source code of this file.

Defines

#define NODE_ALLOC   100

Functions

NODEnode_new ()
void node_free (NODE *n)
void expr_free (NODE *fn)
void expr_print (NODE *p)
NODEexpr_copy (NODE *otree)
NODEexpr_update (NODE *tree)

Variables

NODEexpr_mem = NULL


Define Documentation

#define NODE_ALLOC   100

Definition at line 10 of file expr.c.

Referenced by node_new().


Function Documentation

NODE* expr_copy ( NODE otree  ) 

Definition at line 156 of file expr.c.

References arity_name(), error(), termnode::label, termnode::left, name_copy(), node_new(), NULL, stringnode::op, numbernode::op, termnode::op, OP_NAME, OP_NUM, OP_STR, OP_TERM, termnode::right, stringnode::value, and numbernode::value.

Referenced by expr_update(), instantiate(), name_space_insert(), ole_add(), ole_multiply(), ole_solve(), primitive_execute(), and walk().

void expr_free ( NODE fn  ) 

Definition at line 60 of file expr.c.

References op::arity, arity_name(), BINARY, error(), name_free(), node_free(), NULLARY, termnode::op, namenode::op, OP_NAME, OP_NUM, OP_STR, POSTFIX, and UNARY.

Referenced by name_free(), rule_free(), and walk().

void expr_print ( NODE p  ) 

Definition at line 94 of file expr.c.

References op::arity, arity_name(), BINARY, error(), name_print(), NULLARY, termnode::op, namenode::op, numbernode::op, stringnode::op, OP_NAME, OP_NUM, OP_STR, op::other, OUTFIX1, op::pname, POSTFIX, and UNARY.

Referenced by exp_parse(), main(), name_space_print(), ole_multiply(), ps_print(), reduce(), rule_print(), shift(), and walk().

NODE* expr_update ( NODE tree  ) 

Definition at line 213 of file expr.c.

References error(), expr_copy(), name_free(), OP_NAME, and OP_TERM.

Referenced by ole_solve(), and walk().

void node_free ( NODE n  ) 

Definition at line 52 of file expr.c.

References namenode::next.

Referenced by expr_free(), and name_free().

NODE* node_new (  ) 

Definition at line 23 of file expr.c.

References error(), node::next, NODE_ALLOC, and NULL.

Referenced by exp_parse(), expr_copy(), init(), instantiate(), name_put(), name_space_insert(), ole_add(), parse(), and primitive_execute().


Variable Documentation

NODE* expr_mem = NULL

Definition at line 11 of file expr.c.


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