forked from zeotrope/anicca
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnoun.h
More file actions
27 lines (22 loc) · 614 Bytes
/
Copy pathnoun.h
File metadata and controls
27 lines (22 loc) · 614 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef _NOUN_H
#define _NOUN_H
#define NPARSE(name) static B parse_ ## name(I n, C **sp, A *y)
#define NPROLOG(name) \
C *s=*sp, *e; I k; A p, q; \
parse_ ## name(n,sp,y); e=*sp
#define NBODY(name,func) do { \
e++; p=*y; *y=sbool(0); \
k=n-(I)(e-s); *sp=e; \
ASSERT(parse_ ## name(k,sp,y),ERILLNUM); \
q=*y, *y=(func); \
} while (0)
static A noun_index(I n, C *s);
NPARSE(atom);
NPARSE(base);
NPARSE(pieul);
NPARSE(cmpx);
NPARSE(exp);
NPARSE(rat);
NPARSE(num);
A parse_noun(I n, C *s);
#endif