Imported Upstream version 1.57.0
[platform/upstream/boost.git] / tools / build / src / engine / function.h
1 /*
2  *  Copyright 2011 Steven Watanabe
3  *  Distributed under the Boost Software License, Version 1.0.
4  *  (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
5  */
6
7 #ifndef FUNCTION_SW20111123_H
8 #define FUNCTION_SW20111123_H
9
10 #include "object.h"
11 #include "frames.h"
12 #include "lists.h"
13 #include "parse.h"
14 #include "strings.h"
15
16 typedef struct _function FUNCTION;
17 typedef struct _stack STACK;
18
19 STACK * stack_global( void );
20 void stack_push( STACK * s, LIST * l );
21 LIST * stack_pop( STACK * s );
22
23 FUNCTION * function_compile( PARSE * parse );
24 FUNCTION * function_builtin( LIST * ( * func )( FRAME * frame, int flags ), int flags, const char * * args );
25 void function_refer( FUNCTION * );
26 void function_free( FUNCTION * );
27 OBJECT * function_rulename( FUNCTION * );
28 void function_set_rulename( FUNCTION *, OBJECT * );
29 void function_location( FUNCTION *, OBJECT * *, int * );
30 LIST * function_run( FUNCTION * function, FRAME * frame, STACK * s );
31
32 FUNCTION * function_compile_actions( const char * actions, OBJECT * file, int line );
33 void function_run_actions( FUNCTION * function, FRAME * frame, STACK * s, string * out );
34
35 FUNCTION * function_bind_variables( FUNCTION * f, module_t * module, int * counter );
36 FUNCTION * function_unbind_variables( FUNCTION * f );
37
38 void function_done( void );
39
40 #ifdef HAVE_PYTHON
41
42 FUNCTION * function_python( PyObject * function, PyObject * bjam_signature );
43
44 #endif
45
46 #endif