1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
2:
3: /*
4: $Header: b2exp.h,v 1.4 85/08/22 16:42:25 timo Exp $
5: */
6:
7: /* General definitions for parsing expressions */
8:
9: typedef struct { bool parsed, prop, trim;
10: intlet state, level, field;
11: value comp;
12: } expadm;
13:
14: typedef struct { bool prop, trim;
15: intlet level, field;
16: parsetree node;
17: } unpadm;
18:
19: #define Parsed(adm) ((adm)->parsed)
20: #define Prop(adm) ((adm)->prop)
21: #define Trim(adm) ((adm)->trim)
22: #define State(adm) ((adm)->state)
23: #define Level(adm) ((adm)->level)
24: #define N_fld(adm) ((adm)->field)
25: #define Unp_comp(adm) ((adm)->comp)
26: #define Node(adm) ((adm)->node)
27:
28: /* ******************************************************************** */
29: /* Levels: */
30: /* */
31: #define L_bottom 0
32: #define L_term 1 /* plus, minus, join */
33: #define L_factor 2 /* times, over */
34: #define L_power 3 /* power */
35: #define L_number 4 /* number */
36: #define L_expr 5 /* tag, repeat_text, center, (left|right)_adjust */
37:
38: #define Prio \
39: MESS(1900, "cannot determine priorities; use ( and ) to resolve")
40:
41: /* ******************************************************************** */
42: /* States: */
43: /* */
44: #define S_t 1
45: #define S_tt 2
46: #define S_else 3
47:
48: /* ******************************************************************** */
49:
50: bool b_about();
51: bool b_numtor();
52: bool b_denomtor();
53: bool b_plus();
54: bool b_minus();
55: bool b_number();
56: bool b_behead();
57: bool b_curtail();
58: #ifdef NOT_USED
59: bool b_times();
60: bool b_over();
61: bool b_power();
62: bool b_join();
63: bool b_reptext();
64: bool b_center();
65: bool b_leftadj();
66: bool b_rightadj();
67: #endif
Defined macros
Level
defined in line
23; used 15 times
- in /usr/src/new/B/src/bint/b2exp.c line
59,
81,
155,
163-165(2),
186(2),
196,
216,
504
- in /usr/src/new/B/src/bint/b2fix.c line
81,
189,
219(2),
230
N_fld
defined in line
24; used 15 times
Node
defined in line
26; used 4 times
Parsed
defined in line
19; used 15 times
- in /usr/src/new/B/src/bint/b2exp.c line
35,
53-58(2),
67-71(2),
84,
108,
122-126(2),
139-142(2),
176,
200,
492,
532
Prio
defined in line
38; used 7 times
Prop
defined in line
20; used 8 times
S_t
defined in line
44; used 5 times
S_tt
defined in line
45; used 4 times
State
defined in line
22; used 15 times
Trim
defined in line
21; used 16 times
- in /usr/src/new/B/src/bint/b2exp.c line
86,
156,
197-200(2),
207,
215,
491,
497,
512
- in /usr/src/new/B/src/bint/b2fix.c line
84,
190,
223,
229,
239-243(3)
Usage of this include