Mercurial > repo
comparison src/ploki/run.h @ 4223:ac0403686959
<oerjan> rm -rf src/ploki; mv ploki src
author | HackBot |
---|---|
date | Fri, 20 Dec 2013 22:18:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4222:b0f3e267bb1e | 4223:ac0403686959 |
---|---|
1 #ifndef RUN_H_ | |
2 #define RUN_H_ | |
3 | |
4 #include "config.h" | |
5 #include "op.h" | |
6 #include "text.h" | |
7 #include "val.h" | |
8 #include "stack.h" | |
9 | |
10 #include <stddef.h> | |
11 | |
12 struct val *execute(const struct op *, struct val *); | |
13 ATTR_NORETURN | |
14 void run(const struct text *, size_t, char **); | |
15 | |
16 struct Interp { | |
17 struct val arg; | |
18 struct val result; | |
19 | |
20 struct { | |
21 struct val *argv; | |
22 size_t argc; | |
23 } a; | |
24 struct { | |
25 struct val *matches; | |
26 size_t length, size; | |
27 } match; | |
28 struct { | |
29 size_t *index; | |
30 size_t size; | |
31 } m_start; | |
32 struct { | |
33 size_t *index; | |
34 size_t size; | |
35 } m_end; | |
36 }; | |
37 extern struct Interp Interp; | |
38 | |
39 typedef struct { | |
40 struct val *target; | |
41 struct val content; | |
42 } save_pair; | |
43 | |
44 stack_declare(save_pair, extern) | |
45 extern stack(save_pair) Saved; | |
46 | |
47 void stack_store(struct val *, const struct val *); | |
48 size_t depth_get(void); | |
49 void depth_restore(size_t); | |
50 | |
51 #endif /* RUN_H_ */ |