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
53bool store_symbol_name_flash(char *name, lbm_uint *res);
54
59int lbm_symrepr_init(void);
65int lbm_add_symbol_base(char *name, lbm_uint *id);
72int lbm_add_symbol(char *name, lbm_uint *id);
73
80int lbm_str_to_symbol(char *name, lbm_uint *sym_id);
88int lbm_add_symbol_const_base(char *name, lbm_uint* id, bool link);
95int lbm_add_symbol_const(char *name, lbm_uint *id);
108int lbm_get_symbol_by_name(char *name, lbm_uint *id);
114const char* lbm_get_name_by_symbol(lbm_uint id);
115
134
139bool lbm_symbol_in_flash(char *str);
144bool lbm_symbol_list_entry_in_flash(char *str);
145
146
147extern lbm_value symbol_x;
148extern lbm_value symbol_y;
150
151#ifdef __cplusplus
152}
153#endif
154#endif
uint32_t lbm_uint
Definition lbm_types.h:48
uint32_t lbm_value
Definition lbm_types.h:44
bool store_symbol_name_flash(char *name, lbm_uint *res)
Definition symrepr.c:372
int lbm_add_symbol_base(char *name, lbm_uint *id)
Definition symrepr.c:409
int lbm_get_symbol_by_name(char *name, lbm_uint *id)
Definition symrepr.c:340
int lbm_add_symbol_const_base(char *name, lbm_uint *id, bool link)
Definition symrepr.c:434
void(* symrepr_name_iterator_fun)(const char *)
Definition symrepr.h:41
void lbm_symrepr_name_iterator(symrepr_name_iterator_fun f)
Definition symrepr.c:280
lbm_uint * lbm_get_symbol_list_entry_by_name(char *name)
Definition symrepr.c:327
lbm_value symbol_rest_args
int lbm_add_symbol_const(char *name, lbm_uint *id)
Definition symrepr.c:453
void lbm_symrepr_set_symlist(lbm_uint *ls)
Definition symrepr.c:266
int lbm_add_symbol(char *name, lbm_uint *id)
Definition symrepr.c:421
lbm_uint lbm_get_symbol_table_size_names(void)
Definition symrepr.c:481
lbm_uint lbm_get_symbol_table_size_names_flash(void)
Definition symrepr.c:485
lbm_uint lbm_get_symbol_table_size_flash(void)
Definition symrepr.c:476
bool lbm_symbol_list_entry_in_flash(char *str)
Definition symrepr.c:493
lbm_value symbol_y
Definition eval_cps.c:129
int lbm_str_to_symbol(char *name, lbm_uint *sym_id)
Definition symrepr.c:464
lbm_uint lbm_get_symbol_table_size(void)
Definition symrepr.c:472
const char * lbm_get_name_by_symbol(lbm_uint id)
Definition symrepr.c:302
bool lbm_symbol_in_flash(char *str)
Definition symrepr.c:489
lbm_value symbol_x
Definition eval_cps.c:128
int lbm_symrepr_init(void)
Definition symrepr.c:270