coan 4.2.4
|
![]() |
Modules | |
Macro-generated code | |
Files | |
file | configured_symbols.c |
file | configured_symbols.h |
Functions | |
symbol_h | configured_symbol_seek (char const **cpp) |
symbol_const_h | configured_symbol_seek_const (char const **cpp) |
symbol_h | configured_symbol_match (char const *symname, size_t len) |
symbol_const_h | configured_symbol_match_const (char const *symname, size_t len) |
void | configured_symbols_rewind (void) |
symbol_h | configured_symbol_find (canonical_string_const_h cs, size_t *start) |
line_type_t | configured_symbol_add (bool define, symbol_h sym, char const *tail, char const **pend) |
interface.
line_type_t configured_symbol_add | ( | bool | define, |
symbol_h | sym, | ||
char const * | tail, | ||
char const ** | pend | ||
) |
Add a symbol to the configured symbol table.
define | Is the symbol to be defined or undefined? |
sym | The symbol to be added. |
tail | Pointer to the text following the parsed symbol name. The parsed context may be either a commandline -D or -U option or an in-source #define or #undef option. |
pend | If not NULL, then a pointer at which will be stored on return the address of the first unconsumed character starting from tail. |
Definition at line 124 of file configured_symbols.c.
References GET_PUBLIC, INSOURCE, LT_DIRECTIVE_KEEP, ptr_set_insert(), symbol_define(), symbol_is_configured(), and symbol_undefine().
Referenced by symbol_evaluate_status().
symbol_h configured_symbol_find | ( | canonical_string_const_h | cs, |
size_t * | start | ||
) |
Find the first occurrence of any configured symbol from an a offset in a canonical string.
cs | The canonical string to search. |
start | Pointer to the offset in cs at which to start searching. If any configured symbol is found, the offset of the symbol in cs is stored here on return. |
Definition at line 141 of file configured_symbols.c.
References canonical_string_length(), canonical_string_text(), GET_PUBLIC, is_symbol_inner_char(), ptr_set_begin_const(), ptr_set_end_const(), and symbol_name().
Referenced by symbol_definition_resolve().
symbol_h configured_symbol_match | ( | char const * | symname, |
size_t | len | ||
) |
Lookup an identifier in the configured symbol table.
symname | The identifier to match. |
len | The length of the identifier to match. If 0 then strlen(symname) is assumed. |
Definition at line 118 of file configured_symbols.c.
References configured_symbol_match_const().
Referenced by eval_line(), eval_possible_symbol(), eval_unary(), and symbol_evaluate_status().
symbol_const_h configured_symbol_match_const | ( | char const * | symname, |
size_t | len | ||
) |
const variant of configured_symbol_match.
Definition at line 96 of file configured_symbols.c.
References debug(), GET_PUBLIC, INSOURCE, ptr_set_search(), symbol_definition(), symbol_is_configured(), and symbol_name().
Referenced by configured_symbol_match(), and configured_symbol_seek_const().
symbol_h configured_symbol_seek | ( | char const ** | cpp | ) |
Parse an identifier and look it up in configured symbol table.
cpp | On entry, pointer to the address of the text to be parsed as an identifier. On entry, stores the adress of the first scanned character that is not part of an identifier. |
Definition at line 90 of file configured_symbols.c.
References configured_symbol_seek_const().
symbol_const_h configured_symbol_seek_const | ( | char const ** | cpp | ) |
Parse an identifier and look it up in configured symbol table.
cpp | On entry, pointer to the address of the text to be parsed as an identifier. On entry, stores the adress of the first scanned character that is not part of an identifier. |
Definition at line 76 of file configured_symbols.c.
References bail(), canonical_identifier(), canonical_string_text(), configured_symbol_match_const(), and GRIPE_NOT_IDENTIFIER.
Referenced by configured_symbol_seek().
void configured_symbols_rewind | ( | void | ) |
Discard all transient configured symbols added from processing a source file, reverting just to those configured by -D/-U options.
Definition at line 135 of file configured_symbols.c.
References GET_PUBLIC, and ptr_set_assign().
Referenced by open_io().