LispBM
lbm_c_interop.h
Go to the documentation of this file.
1  /*
2  Copyright 2018, 2020 - 2022, 2024 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 "heap.h"
30 #include "lbm_types.h"
31 #include "lbm_channel.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
71 
72 /* Evaluating a definition in a new context */
84 lbm_cid lbm_eval_defined_program(char *symbol);
85 
92 int lbm_send_message(lbm_cid cid, lbm_value msg);
93 
100 int lbm_define(char *symbol, lbm_value value);
106 int lbm_undefine(char *symbol);
116 int lbm_share_array(lbm_value *value, char *data, lbm_uint num_elt);
117 
125 int lbm_share_const_array(lbm_value *res, char *flash_ptr, lbm_uint num_elt);
134 int lbm_create_array(lbm_value *value,lbm_uint num_elt);
135 
138 void lbm_clear_env(void);
139 
149 bool lbm_flatten_env(int index, lbm_uint** data, lbm_uint *size);
150 
151 #ifdef __cplusplus
152 }
153 #endif
154 #endif
lbm_load_and_define_program
lbm_cid lbm_load_and_define_program(lbm_char_channel_t *tokenizer, char *symbol)
Definition: lbm_c_interop.c:170
lbm_load_and_eval_program
lbm_cid lbm_load_and_eval_program(lbm_char_channel_t *tokenizer, char *name)
Definition: lbm_c_interop.c:162
lbm_eval_defined_expression
lbm_cid lbm_eval_defined_expression(char *symbol)
Definition: lbm_c_interop.c:174
lbm_undefine
int lbm_undefine(char *symbol)
Definition: lbm_c_interop.c:214
lbm_flatten_env
bool lbm_flatten_env(int index, lbm_uint **data, lbm_uint *size)
Definition: lbm_c_interop.c:283
lbm_send_message
int lbm_send_message(lbm_cid cid, lbm_value msg)
Definition: lbm_c_interop.c:182
lbm_uint
uint32_t lbm_uint
Definition: lbm_types.h:48
env.h
lbm_channel.h
eval_cps.h
lbm_share_const_array
int lbm_share_const_array(lbm_value *res, char *flash_ptr, lbm_uint num_elt)
Definition: lbm_c_interop.c:248
lbm_create_array
int lbm_create_array(lbm_value *value, lbm_uint num_elt)
Definition: lbm_c_interop.c:267
lbm_char_channel_s
Definition: lbm_channel.h:68
lbm_define
int lbm_define(char *symbol, lbm_value value)
Definition: lbm_c_interop.c:197
lbm_load_and_eval_program_incremental
lbm_cid lbm_load_and_eval_program_incremental(lbm_char_channel_t *tokenizer, char *name)
Definition: lbm_c_interop.c:166
symrepr.h
lbm_types.h
lbm_load_and_eval_expression
lbm_cid lbm_load_and_eval_expression(lbm_char_channel_t *tokenizer)
Definition: lbm_c_interop.c:154
lbm_load_and_define_expression
lbm_cid lbm_load_and_define_expression(lbm_char_channel_t *tokenizer, char *symbol)
Definition: lbm_c_interop.c:158
lbm_value
uint32_t lbm_value
Definition: lbm_types.h:44
lbm_share_array
int lbm_share_array(lbm_value *value, char *data, lbm_uint num_elt)
Definition: lbm_c_interop.c:228
lbm_eval_defined_program
lbm_cid lbm_eval_defined_program(char *symbol)
Definition: lbm_c_interop.c:178
lbm_cid
int32_t lbm_cid
Definition: lbm_types.h:64
tokpar.h
heap.h
lbm_memory.h
lbm_clear_env
void lbm_clear_env(void)
Definition: lbm_c_interop.c:272