-
Notifications
You must be signed in to change notification settings - Fork 1
/
fn.h
37 lines (32 loc) · 948 Bytes
/
fn.h
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
28
29
30
31
32
33
34
35
36
37
#ifndef FN_H
#define FN_H
#include "k.h"
#include "node.h"
#include "scope.h"
typedef struct fn {
char *d; /* definition */
unsigned int v; /* valence */
node *n; /* ast */
scope *s_; /* initial scope */
scope *s; /* active scope */
char *av; /* adverbs */
int q; /* explicit formal params */
K *l; /* left arg, fixed dyad, projection */
K *a; /* right arg, intermediate parse */
K **c; /* 7 list, function composition */
int cn; /* count, function composition */
int i; /* index into dt */
} fn;
extern int DEPTH;
extern K* (*dt2[256])(K *a, K *b);
extern K* (*dt1[256])(K *a);
extern K* (*dt2avo[256])(K *a, char *av);
extern K* (*dt2avo2[256])(K *a, K *b, char *av);
fn* fnnew(char *f);
void fnfree(fn *fn);
fn* fncp(fn *fn);
void fninit(void);
K* fnd(K *f);
K* fnprj(K *f, K *a);
K* fne2(K *f, K *a, char *av);
#endif /* FN_H */