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

#include "def.h"

Go to the source code of this file.

Defines

#define OPER_TYPE   401
#define EXPR_TYPE   402
#define HEAD   501
#define BODY   502

Functions

void ps_print (SNODE *st)
void reduce (SNODE *rop)
void shift (NODE *p, int type)
NODEexp_parse (int part)
void parse ()

Variables

static SNODEpstack = NULL
static NODEboe
static int next_token
static int token
double token_val
char token_prval []
OPtoken_op
static NAME_NODErule_names = NULL


Define Documentation

#define BODY   502

Definition at line 15 of file parse.c.

Referenced by exp_parse(), and parse().

#define EXPR_TYPE   402

Definition at line 11 of file parse.c.

Referenced by exp_parse(), reduce(), and shift().

#define HEAD   501

Definition at line 14 of file parse.c.

Referenced by exp_parse(), and parse().

#define OPER_TYPE   401

Definition at line 10 of file parse.c.

Referenced by exp_parse(), ps_print(), and shift().


Function Documentation

NODE* exp_parse ( int  part  ) 

Definition at line 327 of file parse.c.

References op::arity, BINARY, BODY, char_copy(), error(), expr_print(), EXPR_TYPE, FALSE, global_names, HEAD, IDENT, snode::info, LEFT, MAXTOKEN, name_put(), snode::next, next_token, nnum_prim, snode::node, node_new(), NONASSOC, NULL, NULLARY, NUMBER, node::op, OPER, OPER_TYPE, op::other, OUTFIX1, OUTFIX2, op::pname, pnum_prim, POSTFIX, op::precedence, PREFIX, ps_print(), reduce(), scan(), shift(), st_free(), str_prim, STRING, token, token_prval, token_val, TRUE, TYPE, undeclared_prim, untyped_prim, and znum_prim.

Referenced by parse().

void parse (  ) 

Definition at line 724 of file parse.c.

References op::arity, BODY, namenode::child, error(), exp_parse(), HEAD, namenode::interest, label_count, namenode::next, next_token, node_new(), NULL, namenode::op, node::op, op_new(), op::other, OUTFIX1, namenode::parent, op::pname, namenode::pval, namenode::refs, rule_build(), scan(), st_mem_free(), TYPE, and undeclared_prim.

Referenced by main().

void ps_print ( SNODE st  ) 

Definition at line 34 of file parse.c.

References expr_print(), and OPER_TYPE.

Referenced by exp_parse(), and reduce().

void reduce ( SNODE rop  ) 

Definition at line 64 of file parse.c.

References op::arity, arity_name(), BINARY, error(), expr_print(), EXPR_TYPE, snode::info, label_count, node::next, snode::next, snode::node, NULL, node::op, OP_NAME, OP_NUM, OP_TERM, OUTFIX1, op::pname, POSTFIX, PREFIX, ps_print(), st_free(), UNARY, and undeclared_prim.

Referenced by exp_parse().

void shift ( NODE p,
int  type 
)

Definition at line 287 of file parse.c.

References expr_print(), EXPR_TYPE, snode::info, snode::next, snode::node, OPER_TYPE, and st_get().

Referenced by exp_parse().


Variable Documentation

NODE* boe [static]

Definition at line 19 of file parse.c.

int next_token [static]

Definition at line 21 of file parse.c.

Referenced by exp_parse(), and parse().

SNODE* pstack = NULL [static]

Definition at line 17 of file parse.c.

NAME_NODE* rule_names = NULL [static]

Definition at line 26 of file parse.c.

int token [static]

Definition at line 22 of file parse.c.

Referenced by exp_parse().

OP* token_op

Definition at line 14 of file scanner.c.

char token_prval[]

Definition at line 13 of file scanner.c.

Referenced by exp_parse(), scan(), and token_get().

double token_val

Definition at line 12 of file scanner.c.

Referenced by exp_parse(), and scan().


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