#include "symtab.h"
Public Types | |
typedef octave::fcn_info | fcn_info |
typedef octave::symbol_scope | scope |
Public Member Functions | |
symbol_table (interpreter &interp) | |
~symbol_table ()=default | |
void | add_to_parent_map (const std::string &classname, const std::list< std::string > &parent_list) |
void | alias_built_in_function (const std::string &alias, const std::string &name) |
std::list< std::string > | built_in_function_names () |
octave_value | builtin_find (const std::string &name, const symbol_scope &search_scope=symbol_scope::invalid()) |
void | cleanup () |
void | clear_dld_function (const std::string &name) |
void | clear_function (const std::string &name) |
void | clear_function_pattern (const std::string &pat) |
void | clear_function_regexp (const std::string &pat) |
void | clear_functions (bool force=false) |
void | clear_mex_functions () |
void | clear_user_function (const std::string &name) |
std::list< std::string > | cmdline_function_names () |
symbol_scope | current_scope () const |
octave_value | dump () const |
octave_value | fcn_table_find (const std::string &name, const octave_value_list &args=ovl(), const symbol_scope &search_scope=symbol_scope::invalid()) |
octave_value | find_autoload (const std::string &name) |
octave_value | find_built_in_function (const std::string &name) |
octave_value | find_cmdline_function (const std::string &name) |
octave_value | find_function (const std::string &name, const octave_value_list &args, const symbol_scope &search_scope=symbol_scope::invalid()) |
octave_value | find_function (const std::string &name, const symbol_scope &search_scope=symbol_scope::invalid()) |
octave_value | find_method (const std::string &name, const std::string &dispatch_type) |
octave_value | find_private_function (const std::string &dir_name, const std::string &name) |
octave_value | find_scoped_function (const std::string &name, const symbol_scope &search_scope) |
octave_value | find_user_function (const std::string &name) |
fcn_info * | get_fcn_info (const std::string &name) |
void | install_built_in_dispatch (const std::string &name, const std::string &klass) |
void | install_built_in_function (const std::string &name, const octave_value &fcn) |
void | install_cmdline_function (const std::string &name, const octave_value &fcn) |
void | install_local_function (const std::string &name, const octave_value &fcn, const std::string &file_name) |
void | install_user_function (const std::string &name, const octave_value &fcn) |
bool | is_built_in_function_name (const std::string &name) |
bool | is_superiorto (const std::string &a, const std::string &b) |
std::list< std::string > | parent_classes (const std::string &dispatch_type) |
bool | set_class_relationship (const std::string &sup_class, const std::string &inf_class) |
std::list< std::string > | user_function_names () |
typedef octave::fcn_info symbol_table::fcn_info |
typedef octave::symbol_scope symbol_table::scope |
symbol_table::symbol_table | ( | interpreter & | interp | ) |
|
default |
void symbol_table::add_to_parent_map | ( | const std::string & | classname, |
const std::list< std::string > & | parent_list | ||
) |
void symbol_table::alias_built_in_function | ( | const std::string & | alias, |
const std::string & | name | ||
) |
Definition at line 569 of file symtab.cc.
References find_built_in_function(), fcn_info::install_built_in_function(), octave_value::is_defined(), and panic().
std::list< std::string > symbol_table::built_in_function_names | ( | ) |
Definition at line 620 of file symtab.cc.
References octave_value::is_defined(), and octave_value::sort().
octave_value symbol_table::builtin_find | ( | const std::string & | name, |
const symbol_scope & | search_scope = symbol_scope::invalid () |
||
) |
Definition at line 195 of file symtab.cc.
References fcn_info::builtin_find(), current_scope(), octave_value::is_defined(), and octave_value().
Referenced by octave::Fbuiltin().
void symbol_table::cleanup | ( | ) |
Definition at line 722 of file symtab.cc.
References clear_functions().
void symbol_table::clear_dld_function | ( | const std::string & | name | ) |
Definition at line 501 of file symtab.cc.
References fcn_info::clear_autoload_function(), and fcn_info::clear_user_function().
Referenced by tree_evaluator::remove_autoload().
void symbol_table::clear_function | ( | const std::string & | name | ) |
Definition at line 446 of file symtab.cc.
References clear_user_function().
Referenced by interpreter::clear_function(), and tree_evaluator::clear_symbol().
void symbol_table::clear_function_pattern | ( | const std::string & | pat | ) |
Definition at line 452 of file symtab.cc.
References symbol_match::match().
Referenced by interpreter::clear_function_pattern(), and tree_evaluator::clear_symbol_pattern().
void symbol_table::clear_function_regexp | ( | const std::string & | pat | ) |
Definition at line 468 of file symtab.cc.
References regexp::is_match().
Referenced by interpreter::clear_function_regexp(), and tree_evaluator::clear_symbol_regexp().
void symbol_table::clear_functions | ( | bool | force = false | ) |
Definition at line 437 of file symtab.cc.
Referenced by cleanup(), tree_evaluator::clear_all(), and interpreter::clear_functions().
void symbol_table::clear_user_function | ( | const std::string & | name | ) |
Definition at line 484 of file symtab.cc.
References fcn_info::clear_user_function().
Referenced by clear_function().
std::list< std::string > symbol_table::cmdline_function_names | ( | ) |
Definition at line 639 of file symtab.cc.
References octave_value::is_defined(), and octave_value::sort().
symbol_scope symbol_table::current_scope | ( | ) | const |
Definition at line 61 of file symtab.cc.
References tree_evaluator::get_current_scope(), and interpreter::get_evaluator().
Referenced by builtin_find(), fcn_table_find(), and find_function().
octave_value symbol_table::dump | ( | ) | const |
octave_value symbol_table::fcn_table_find | ( | const std::string & | name, |
const octave_value_list & | args = ovl () , |
||
const symbol_scope & | search_scope = symbol_scope::invalid () |
||
) |
Definition at line 224 of file symtab.cc.
References current_scope(), fcn_info::find(), octave_value::is_defined(), and octave_value().
Referenced by tree_evaluator::find(), and find_function().
octave_value symbol_table::find_autoload | ( | const std::string & | name | ) |
Definition at line 172 of file symtab.cc.
References fcn_info::find_autoload(), octave_value::is_defined(), and octave_value().
octave_value symbol_table::find_built_in_function | ( | const std::string & | name | ) |
Definition at line 152 of file symtab.cc.
References fcn_info::find_built_in_function(), and octave_value::is_defined().
Referenced by alias_built_in_function(), and is_built_in_function_name().
octave_value symbol_table::find_cmdline_function | ( | const std::string & | name | ) |
Definition at line 316 of file symtab.cc.
References fcn_info::find_cmdline_function(), octave_value::is_defined(), and octave_value().
Referenced by F__get_cmdline_fcn_txt__().
octave_value symbol_table::find_function | ( | const std::string & | name, |
const octave_value_list & | args, | ||
const symbol_scope & | search_scope = symbol_scope::invalid () |
||
) |
Definition at line 282 of file symtab.cc.
References fcn_table_find(), and octave_value().
octave_value symbol_table::find_function | ( | const std::string & | name, |
const symbol_scope & | search_scope = symbol_scope::invalid () |
||
) |
Definition at line 254 of file symtab.cc.
References current_scope(), find_method(), octave_value(), and ovl().
Referenced by tree_identifier::evaluate_n(), tree_index_expression::evaluate_n(), Farrayfun(), Fbsxfun(), Fcellfun(), interpreter::feval(), tree_evaluator::final_index_error(), Fnargin(), Fnargout(), get_function_handle(), tree_evaluator::get_user_code(), interpreter::mislocked(), and interpreter::munlock().
octave_value symbol_table::find_method | ( | const std::string & | name, |
const std::string & | dispatch_type | ||
) |
Definition at line 128 of file symtab.cc.
References fcn_info::find_method(), octave_value::is_defined(), and octave_value().
Referenced by do_class_concat(), tree_evaluator::evaluate_end_expression(), find_function(), and tree_evaluator::get_user_code().
octave_value symbol_table::find_private_function | ( | const std::string & | dir_name, |
const std::string & | name | ||
) |
Definition at line 101 of file symtab.cc.
References fcn_info::find_private_function(), octave_value::is_defined(), and octave_value().
octave_value symbol_table::find_scoped_function | ( | const std::string & | name, |
const symbol_scope & | search_scope | ||
) |
Definition at line 77 of file symtab.cc.
References fcn_info::find_scoped_function(), octave_value::is_defined(), and octave_value().
octave_value symbol_table::find_user_function | ( | const std::string & | name | ) |
Definition at line 293 of file symtab.cc.
References fcn_info::find_user_function(), octave_value::is_defined(), and octave_value().
fcn_info * symbol_table::get_fcn_info | ( | const std::string & | name | ) |
Definition at line 732 of file symtab.cc.
Referenced by F__dump_symtab_info__().
void symbol_table::install_built_in_dispatch | ( | const std::string & | name, |
const std::string & | klass | ||
) |
Definition at line 587 of file symtab.cc.
References error(), and fcn_info::install_built_in_dispatch().
void symbol_table::install_built_in_function | ( | const std::string & | name, |
const octave_value & | fcn | ||
) |
Definition at line 411 of file symtab.cc.
References fcn_info::install_built_in_function().
Referenced by install_dld_function(), and install_mex_function().
void symbol_table::install_cmdline_function | ( | const std::string & | name, |
const octave_value & | fcn | ||
) |
Definition at line 339 of file symtab.cc.
References fcn_info::install_cmdline_function().
Referenced by tree_evaluator::visit_function_def().
void symbol_table::install_local_function | ( | const std::string & | name, |
const octave_value & | fcn, | ||
const std::string & | file_name | ||
) |
Definition at line 364 of file symtab.cc.
References fcn_info::install_local_function().
Referenced by base_parser::finish_classdef_file().
void symbol_table::install_user_function | ( | const std::string & | name, |
const octave_value & | fcn | ||
) |
Definition at line 387 of file symtab.cc.
References fcn_info::install_user_function().
bool symbol_table::is_built_in_function_name | ( | const std::string & | name | ) |
Definition at line 69 of file symtab.cc.
References find_built_in_function(), and octave_value::is_defined().
bool symbol_table::is_superiorto | ( | const std::string & | a, |
const std::string & | b | ||
) |
Definition at line 556 of file symtab.cc.
Referenced by set_class_relationship().
std::list< std::string > symbol_table::parent_classes | ( | const std::string & | dispatch_type | ) |
bool symbol_table::set_class_relationship | ( | const std::string & | sup_class, |
const std::string & | inf_class | ||
) |
Definition at line 528 of file symtab.cc.
References is_superiorto().
std::list< std::string > symbol_table::user_function_names | ( | ) |
Definition at line 603 of file symtab.cc.
Referenced by interpreter::user_function_names().