Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

symtab.c File Reference

Go to the source code of this file.

Functions

unsigned long compress (unsigned long h, short num_bits)
unsigned long hash_string (const char *s)
unsigned long hash_variable_raw_info (char *name, short num_bits)
unsigned long hash_identifier_raw_info (char name_letter, unsigned long name_number, short num_bits)
unsigned long hash_sym_constant_raw_info (const char *name, short num_bits)
unsigned long hash_int_constant_raw_info (long value, short num_bits)
unsigned long hash_float_constant_raw_info (float value, short num_bits)
unsigned long hash_variable (void *item, short num_bits)
unsigned long hash_identifier (void *item, short num_bits)
unsigned long hash_sym_constant (void *item, short num_bits)
unsigned long hash_int_constant (void *item, short num_bits)
unsigned long hash_float_constant (void *item, short num_bits)
void init_symbol_tables (void)
Symbolfind_variable (char *name)
Symbolfind_identifier (char name_letter, unsigned long name_number)
Symbolfind_sym_constant (const char *name)
Symbolfind_int_constant (long value)
Symbolfind_float_constant (float value)
Symbolmake_variable (char *name)
Symbolmake_new_identifier (char name_letter, goal_stack_level level)
Symbolmake_sym_constant (const char *name)
Symbolmake_int_constant (long value)
Symbolmake_float_constant (float value)
void deallocate_symbol (Symbol *sym)
void reset_id_counters (void)
bool reset_tc_num (void *item)
void reset_id_and_variable_tc_numbers (void)
bool reset_gensym_number (void *item)
void reset_variable_gensym_numbers (void)
bool print_sym (void *item)
Symbolgenerate_new_sym_constant (char *prefix, unsigned long *counter)
void create_predefined_symbols (void)


Function Documentation

unsigned long compress unsigned long  h,
short  num_bits
 

Definition at line 76 of file symtab.c.

References masks_for_n_low_order_bits.

Referenced by hash_float_constant(), hash_float_constant_raw_info(), hash_identifier(), hash_identifier_raw_info(), hash_int_constant(), hash_int_constant_raw_info(), hash_sym_constant(), hash_sym_constant_raw_info(), hash_variable(), and hash_variable_raw_info().

void create_predefined_symbols void   ) 
 

Definition at line 555 of file symtab.c.

References make_sym_constant(), and make_variable().

Referenced by init_soar_agent().

void deallocate_symbol Symbol sym  ) 
 

Definition at line 416 of file symtab.c.

References abort_with_fatal_error(), free_memory_block_for_string(), sym_constant_struct::name, variable_struct::name, print_with_symbols(), remove_from_hash_table(), symbol_union::sc, Symbol, and symbol_union::var.

Symbol* find_float_constant float  value  ) 
 

Definition at line 274 of file symtab.c.

References symbol_union::fc, hash_float_constant_raw_info(), Symbol, and float_constant_struct::value.

Referenced by make_float_constant(), read_attribute_from_string(), and read_pattern_component().

Symbol* find_identifier char  name_letter,
unsigned long  name_number
 

Definition at line 232 of file symtab.c.

References hash_identifier_raw_info(), symbol_union::id, identifier_struct::name_letter, identifier_struct::name_number, and Symbol.

Referenced by read_attribute_from_string(), read_id_or_context_var_from_string(), read_identifier_or_context_variable(), read_pattern_component(), and read_wme_filter_component().

Symbol* find_int_constant long  value  ) 
 

Definition at line 260 of file symtab.c.

References hash_int_constant_raw_info(), symbol_union::ic, Symbol, and int_constant_struct::value.

Referenced by make_int_constant(), read_attribute_from_string(), and read_pattern_component().

Symbol* find_sym_constant const char *  name  ) 
 

Definition at line 246 of file symtab.c.

References hash_sym_constant_raw_info(), sym_constant_struct::name, symbol_union::sc, and Symbol.

Referenced by add_named_superstate_attribute_to_grounds(), do_print_for_production_name(), generate_chunk_name_sym_constant(), generate_new_sym_constant(), make_constant_symbol_rhs_function_code(), make_sym_constant(), name_to_production(), parse_function_call_after_lparen(), read_attribute_from_string(), read_pattern_component(), and soar_Interrupt().

Symbol* find_variable char *  name  ) 
 

Definition at line 218 of file symtab.c.

References hash_variable_raw_info(), variable_struct::name, Symbol, and symbol_union::var.

Referenced by get_context_var_info_from_string(), and make_variable().

Symbol* generate_new_sym_constant char *  prefix,
unsigned long counter
 

Definition at line 534 of file symtab.c.

References find_sym_constant(), make_sym_constant(), and Symbol.

Referenced by chunk_instantiation(), generate_chunk_name_sym_constant(), and make_constant_symbol_rhs_function_code().

unsigned long hash_float_constant void *  item,
short  num_bits
 

Definition at line 165 of file symtab.c.

References compress(), float_constant, and float_constant_struct::value.

Referenced by init_symbol_tables().

unsigned long hash_float_constant_raw_info float  value,
short  num_bits
 

Definition at line 128 of file symtab.c.

References compress().

Referenced by find_float_constant().

unsigned long hash_identifier void *  item,
short  num_bits
 

Definition at line 144 of file symtab.c.

References compress(), identifier, identifier_struct::name_letter, and identifier_struct::name_number.

Referenced by init_symbol_tables().

unsigned long hash_identifier_raw_info char  name_letter,
unsigned long  name_number,
short  num_bits
 

Definition at line 113 of file symtab.c.

References compress().

Referenced by find_identifier().

unsigned long hash_int_constant void *  item,
short  num_bits
 

Definition at line 158 of file symtab.c.

References compress(), int_constant, and int_constant_struct::value.

Referenced by init_symbol_tables().

unsigned long hash_int_constant_raw_info long  value,
short  num_bits
 

Definition at line 123 of file symtab.c.

References compress().

Referenced by find_int_constant().

unsigned long hash_string const char *  s  ) 
 

Definition at line 92 of file symtab.c.

Referenced by hash_sym_constant(), hash_sym_constant_raw_info(), hash_variable(), and hash_variable_raw_info().

unsigned long hash_sym_constant void *  item,
short  num_bits
 

Definition at line 151 of file symtab.c.

References compress(), hash_string(), sym_constant_struct::name, and sym_constant.

Referenced by init_symbol_tables().

unsigned long hash_sym_constant_raw_info const char *  name,
short  num_bits
 

Definition at line 118 of file symtab.c.

References compress(), and hash_string().

Referenced by find_sym_constant().

unsigned long hash_variable void *  item,
short  num_bits
 

Definition at line 137 of file symtab.c.

References compress(), hash_string(), variable_struct::name, and variable.

Referenced by init_symbol_tables().

unsigned long hash_variable_raw_info char *  name,
short  num_bits
 

Definition at line 108 of file symtab.c.

References compress(), and hash_string().

Referenced by find_variable().

void init_symbol_tables void   ) 
 

Definition at line 180 of file symtab.c.

References float_constant, hash_float_constant(), hash_identifier(), hash_int_constant(), hash_sym_constant(), hash_variable(), identifier, init_memory_pool(), int_constant, make_hash_table(), sym_constant, and variable.

Referenced by init_soar_agent().

Symbol* make_float_constant float  value  ) 
 

Definition at line 392 of file symtab.c.

References add_to_hash_table(), symbol_union::fc, find_float_constant(), Symbol, and float_constant_struct::value.

Referenced by abs_rhs_function_code(), atan2_rhs_function_code(), cos_rhs_function_code(), float_rhs_function_code(), fp_divide_rhs_function_code(), get_io_float_constant(), make_symbol_for_current_lexeme(), minus_rhs_function_code(), plus_rhs_function_code(), reteload_all_symbols(), round_off_air_rhs_function_code(), round_off_heading_air_rhs_function_code(), sin_rhs_function_code(), soar_cAddWme(), sqrt_rhs_function_code(), and times_rhs_function_code().

Symbol* make_int_constant long  value  ) 
 

Definition at line 374 of file symtab.c.

References add_to_hash_table(), find_int_constant(), symbol_union::ic, Symbol, and int_constant_struct::value.

Referenced by abs_rhs_function_code(), compute_heading_rhs_function_code(), compute_range_rhs_function_code(), div_rhs_function_code(), get_io_int_constant(), int_rhs_function_code(), make_symbol_for_current_lexeme(), minus_rhs_function_code(), mod_rhs_function_code(), plus_rhs_function_code(), reteload_all_symbols(), round_off_air_rhs_function_code(), round_off_heading_air_rhs_function_code(), soar_cAddWme(), strlen_rhs_function_code(), and times_rhs_function_code().

Symbol* make_new_identifier char  name_letter,
goal_stack_level  level
 

Definition at line 309 of file symtab.c.

References add_to_hash_table(), identifier_struct::associated_output_links, identifier_struct::could_be_a_link_from_below, identifier_struct::gds, goal_stack_level, identifier_struct::higher_goal, symbol_union::id, identifier_struct::impasse_wmes, identifier_struct::input_wmes, identifier_struct::isa_goal, identifier_struct::isa_impasse, identifier_struct::isa_operator, identifier_struct::level, identifier_struct::link_count, identifier_struct::lower_goal, identifier_struct::ms_i_assertions, identifier_struct::ms_o_assertions, identifier_struct::ms_retractions, identifier_struct::name_letter, identifier_struct::name_number, identifier_struct::operator_slot, identifier_struct::preferences_from_goal, identifier_struct::promotion_level, identifier_struct::saved_firing_type, identifier_struct::slots, Symbol, identifier_struct::tc_num, and identifier_struct::unknown_level.

Referenced by get_new_io_identifier(), instantiate_rhs_value(), run_preference_semantics(), and soar_cAddWme().

Symbol* make_sym_constant const char *  name  ) 
 

Definition at line 355 of file symtab.c.

References add_to_hash_table(), find_sym_constant(), make_memory_block_for_string(), sym_constant_struct::name, sym_constant_struct::production, symbol_union::sc, and Symbol.

Referenced by add_bot_rhs_functions(), capitalize_symbol_rhs_function_code(), create_predefined_symbols(), crlf_rhs_function_code(), do_input_cycle(), generate_chunk_name_sym_constant(), generate_new_sym_constant(), get_io_sym_constant(), init_built_in_rhs_functions(), init_built_in_rhs_math_functions(), init_soar_agent(), make_constant_symbol_rhs_function_code(), make_symbol_for_current_lexeme(), parse_attribute_path_in_brackets(), parse_production(), remove_bot_rhs_functions(), remove_built_in_rhs_functions(), remove_built_in_rhs_math_functions(), reteload_all_symbols(), soar_cAddWme(), soar_cMultiAttributes(), soar_FormatWatch(), and timestamp_rhs_function_code().

Symbol* make_variable char *  name  ) 
 

Definition at line 288 of file symtab.c.

References add_to_hash_table(), find_variable(), variable_struct::gensym_number, make_memory_block_for_string(), variable_struct::name, variable_struct::rete_binding_locations, Symbol, variable_struct::tc_num, and symbol_union::var.

Referenced by create_predefined_symbols(), generate_new_variable(), make_placeholder_test(), make_symbol_for_current_lexeme(), parse_attr_value_make(), parse_rhs_action(), and reteload_all_symbols().

bool print_sym void *  item  ) 
 

Definition at line 526 of file symtab.c.

References print_string(), and symbol_to_string().

Referenced by soar_ecPrintInternalSymbols().

bool reset_gensym_number void *  item  ) 
 

Definition at line 512 of file symtab.c.

References variable_struct::gensym_number, Symbol, and symbol_union::var.

Referenced by reset_variable_gensym_numbers().

void reset_id_and_variable_tc_numbers void   ) 
 

Definition at line 506 of file symtab.c.

References do_for_all_items_in_hash_table(), and reset_tc_num().

Referenced by get_new_tc_number().

void reset_id_counters void   ) 
 

Definition at line 480 of file symtab.c.

References print().

Referenced by soar_cReInitSoar().

bool reset_tc_num void *  item  ) 
 

Definition at line 494 of file symtab.c.

References symbol_union::id, Symbol, variable_struct::tc_num, identifier_struct::tc_num, and symbol_union::var.

Referenced by reset_id_and_variable_tc_numbers().

void reset_variable_gensym_numbers void   ) 
 

Definition at line 521 of file symtab.c.

References do_for_all_items_in_hash_table(), and reset_gensym_number().

Referenced by reset_variable_generator().


Generated on Thu Dec 11 13:00:37 2003 for Soar Kernel by doxygen 1.3.5