LispBM
Loading...
Searching...
No Matches
symrepr.h
Go to the documentation of this file.
1 /*
2 Copyright 2018, 2021, 2022 Joel Svensson svenssonjoel@yahoo.se
3 2022 Benjamin Vedder
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
28#ifndef SYMTAB_H_
29#define SYMTAB_H_
30
31#include <stdint.h>
32#include <stdbool.h>
33
34#include "lbm_types.h"
35#include "lbm_defines.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41typedef void (*symrepr_name_iterator_fun)(const char *);
42
47
52
57
63bool store_symbol_name_flash(char *name, lbm_uint *res);
64
69bool lbm_symrepr_init(void);
75int lbm_add_symbol_base(char *name, lbm_uint *id);
82int lbm_add_symbol(char *name, lbm_uint *id);
83
90int lbm_str_to_symbol(char *name, lbm_uint *sym_id);
98int lbm_add_symbol_const_base(char *name, lbm_uint* id, bool link);
105int lbm_add_symbol_const(char *name, lbm_uint *id);
118int lbm_get_symbol_by_name(char *name, lbm_uint *id);
124const char* lbm_get_name_by_symbol(lbm_uint id);
125
144
149bool lbm_symbol_in_flash(char *str);
154bool lbm_symbol_list_entry_in_flash(char *str);
155
156
157extern lbm_value symbol_x;
158extern lbm_value symbol_y;
160
161#ifdef __cplusplus
162}
163#endif
164#endif
uint32_t lbm_uint
Definition lbm_types.h:48
uint32_t lbm_value
Definition lbm_types.h:44
void lbm_symrepr_set_next_id(lbm_uint id)
Definition symrepr.c:278
bool store_symbol_name_flash(char *name, lbm_uint *res)
Definition symrepr.c:390
int lbm_add_symbol_base(char *name, lbm_uint *id)
Definition symrepr.c:429
int lbm_get_symbol_by_name(char *name, lbm_uint *id)
Definition symrepr.c:355
int lbm_add_symbol_const_base(char *name, lbm_uint *id, bool link)
Definition symrepr.c:455
void(* symrepr_name_iterator_fun)(const char *)
Definition symrepr.h:41
void lbm_symrepr_name_iterator(symrepr_name_iterator_fun f)
Definition symrepr.c:292
lbm_uint * lbm_get_symbol_list_entry_by_name(char *name)
Definition symrepr.c:342
bool lbm_symrepr_init(void)
Definition symrepr.c:282
lbm_value symbol_rest_args
int lbm_add_symbol_const(char *name, lbm_uint *id)
Definition symrepr.c:472
lbm_uint lbm_symrepr_get_next_id(void)
Definition symrepr.c:274
void lbm_symrepr_set_symlist(lbm_uint *ls)
Definition symrepr.c:269
int lbm_add_symbol(char *name, lbm_uint *id)
Definition symrepr.c:443
lbm_uint lbm_get_symbol_table_size_names(void)
Definition symrepr.c:498
lbm_uint lbm_get_symbol_table_size_names_flash(void)
Definition symrepr.c:502
lbm_uint lbm_get_symbol_table_size_flash(void)
Definition symrepr.c:493
bool lbm_symbol_list_entry_in_flash(char *str)
Definition symrepr.c:510
lbm_value symbol_y
Definition eval_cps.c:176
int lbm_str_to_symbol(char *name, lbm_uint *sym_id)
Definition symrepr.c:482
lbm_uint lbm_get_symbol_table_size(void)
Definition symrepr.c:489
const char * lbm_get_name_by_symbol(lbm_uint id)
Definition symrepr.c:314
bool lbm_symbol_in_flash(char *str)
Definition symrepr.c:506
lbm_value symbol_x
Definition eval_cps.c:175