LispBM
lbm_c_interop.h
Go to the documentation of this file.
1  /*
2  Copyright 2018, 2020, 2021, 2022 Joel Svensson svenssonjoel@yahoo.se
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
20 #ifndef LBM_C_INTEROP_H_
21 #define LBM_C_INTEROP_H_
22 
23 #include "env.h"
24 #include "symrepr.h"
25 #include "eval_cps.h"
26 #include "heap.h"
27 #include "tokpar.h"
28 #include "lbm_memory.h"
29 #include "lbm_variables.h"
30 #include "heap.h"
31 #include "lbm_types.h"
32 #include "lbm_channel.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
44  lbm_cid lbm_load_and_eval_program(lbm_char_channel_t *tokenizer, char *name);
64 lbm_cid lbm_load_and_define_program(lbm_char_channel_t *tokenizer, char *symbol);
71 lbm_cid lbm_load_and_define_expression(lbm_char_channel_t *tokenizer, char *symbol);
72 
73 /* Evaluating a definition in a new context */
79 lbm_cid lbm_eval_defined_expression(char *symbol);
85 lbm_cid lbm_eval_defined_program(char *symbol);
86 
93 int lbm_send_message(lbm_cid cid, lbm_value msg);
94 
101 int lbm_define(char *symbol, lbm_value value);
107 int lbm_undefine(char *symbol);
117 int lbm_share_array(lbm_value *value, char *data, lbm_uint num_elt);
118 
126 int lbm_share_const_array(lbm_value *res, char *flash_ptr, lbm_uint num_elt);
135 int lbm_create_array(lbm_value *value,lbm_uint num_elt);
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 #endif
lbm_cid lbm_load_and_eval_expression(lbm_char_channel_t *tokenizer)
int lbm_share_const_array(lbm_value *res, char *flash_ptr, lbm_uint num_elt)
int lbm_create_array(lbm_value *value, lbm_uint num_elt)
lbm_cid lbm_load_and_define_program(lbm_char_channel_t *tokenizer, char *symbol)
int lbm_define(char *symbol, lbm_value value)
int lbm_share_array(lbm_value *value, char *data, lbm_uint num_elt)
lbm_cid lbm_load_and_define_expression(lbm_char_channel_t *tokenizer, char *symbol)
lbm_cid lbm_load_and_eval_program_incremental(lbm_char_channel_t *tokenizer, char *name)
int lbm_undefine(char *symbol)
lbm_cid lbm_load_and_eval_program(lbm_char_channel_t *tokenizer, char *name)
int lbm_send_message(lbm_cid cid, lbm_value msg)
lbm_cid lbm_eval_defined_program(char *symbol)
lbm_cid lbm_eval_defined_expression(char *symbol)
uint32_t lbm_value
Definition: lbm_types.h:43
Definition: lbm_channel.h:68