coan 4.2.4
The Symbol component internals.
Collaboration diagram for The Symbol component internals.:

Files

file  symbol.c

Functions

static void symbol_init (symbol_h sym, char const *name, size_t namelen)
static void symbol_copy_init (symbol_h dest, symbol_const_h src)
static int symbol_name_compare (symbol_const_h sym, char const *name, size_t namelen)
static void report_symbol_configuration (bool define, int gripe, symbol_const_h sym, canonical_string_const_h old_def, canonical_string_const_h new_def, char const *tail)
static canonical_string_h symbol_definition_resolve (symbol_const_h sym, ptr_vector_h history)

Function Documentation

static void report_symbol_configuration ( bool  define,
int  gripe,
symbol_const_h  sym,
canonical_string_const_h  old_def,
canonical_string_const_h  new_def,
char const *  tail 
) [static]
static void symbol_copy_init ( symbol_h  dest,
symbol_const_h  src 
) [static]

Initialise a symbol from another

Parameters:
destThe symbol to initialise. Is assumed to control only unitialised storage.
srcThe symbol to be copied.

dest is initialised as a copy of src

Definition at line 76 of file symbol.c.

References canonical_string_copy(), clone(), eval_result::flags, eval_result::most_resolved, eval_result::sym_def, eval_result::sym_name, and eval_result::value.

Referenced by symbol_copy().

Here is the call graph for this function:

static canonical_string_h symbol_definition_resolve ( symbol_const_h  sym,
ptr_vector_h  history 
) [static]

Get the most resolved form of a reference to a defined symbol.

Parameters:
symThe symbol whose most resolved form is wanted.
historyA ptr_vector_h containing the the configured symbols that have been passed as the first parameter to recursively ancestral calls to the symbol_resolve(), to be passed to further calls to that function.

The function obtains the most resolved form of a symbol reference where the symbol has a definition.

Definition at line 239 of file symbol.c.

References canonical_string_copy(), canonical_string_dispose(), canonical_string_replace(), canonical_string_text(), configured_symbol_find(), symbol_definition(), symbol_name(), and symbol_resolve().

Referenced by symbol_resolve().

Here is the call graph for this function:

static void symbol_init ( symbol_h  sym,
char const *  name,
size_t  namelen 
) [static]

Initialise a symbol.

Parameters:
symThe symbol to initialise. Is assumed to control only unitialised storage.
nameThe name of this symbol.
namelenThe length of name.

Definition at line 62 of file symbol.c.

References clone(), eval_result_clear(), and eval_result::sym_name.

Referenced by symbol_new().

Here is the call graph for this function:

static int symbol_name_compare ( symbol_const_h  sym,
char const *  name,
size_t  namelen 
) [static]

Compare a symbol with a specified name.

Parameters:
symThe symbol to compare
nameThe name to compare
namelenThe length of the name.
Returns:
< 0 if the name of sym compares less than name, 0 if they compare equal, otherwise > 0

Definition at line 101 of file symbol.c.

References symbol_name().

Referenced by symbol_compare().

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines