coan 4.2.4
The Configured Symbols component interface
Collaboration diagram for The Configured Symbols component interface:

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)

Detailed Description

interface.


Function Documentation

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.

Parameters:
defineIs the symbol to be defined or undefined?
symThe symbol to be added.
tailPointer 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.
pendIf 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().

Here is the call graph for this function:

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.

Parameters:
csThe canonical string to search.
startPointer 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.
Returns:
The first symbol found, if any, else NULL.

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().

Here is the call graph for this function:

symbol_h configured_symbol_match ( char const *  symname,
size_t  len 
)

Lookup an identifier in the configured symbol table.

Parameters:
symnameThe identifier to match.
lenThe length of the identifier to match. If 0 then strlen(symname) is assumed.
Returns:
A reference to the matched symbol in the configured symbol table, if found, else NULL

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

symbol_h configured_symbol_seek ( char const **  cpp)

Parse an identifier and look it up in configured symbol table.

Parameters:
cppOn 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.
Returns:
A reference to the matched symbol in the configured symbol table, if found, else NULL

Definition at line 90 of file configured_symbols.c.

References configured_symbol_seek_const().

Here is the call graph for this function:

symbol_const_h configured_symbol_seek_const ( char const **  cpp)

Parse an identifier and look it up in configured symbol table.

Parameters:
cppOn 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.
Returns:
A const reference to the matched symbol in the configured symbol table,if found, else NULL

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines