summaryrefslogtreecommitdiff
path: root/other/burneye/src/conf/tmp/script.h
blob: 72352183621b4516c7cbbdfc2549f51a0d01dcbb (plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
/* fornax - distributed network
 *
 * by team teso
 *
 * scripting capabilities
 */

#ifndef	FNX_SCRIPT_H
#define	FNX_SCRIPT_H

#include "element.h"
#include "symbol.h"


/* scr_exec
 *
 * compile and execute a script pointed to by `script'. after execution,
 * free the compiled script
 *
 * return 1 if the execution was successful (ie compilation succeeded)
 * return 0 on error (compilation/interpreter failed)
 */

int	scr_exec (char *script);


/* scr_ns_add
 *
 * add a symbol element `elem' to the namespace pointed to by `ns'
 *
 * return pointer to modified namespace
 */

sym_elem **	scr_ns_add (sym_elem **ns, sym_elem *elem);


/* scr_compile
 *
 * compile a script pointed to by `script'
 *
 * return a pointer to the readily compiled parse tree on success
 * return NULL on failure
 */

element **	scr_compile (char *script);


#endif