#include "interpreter.h"
Public Member Functions | |
interpreter (application *app_context=nullptr) | |
interpreter (const interpreter &)=delete | |
~interpreter (void) | |
void | add_atexit_fcn (const std::string &fname) |
void | add_debug_watch_expression (const std::string &expr) |
void | assign (const std::string &name, const octave_value &val=octave_value()) |
void | assignin (const std::string &context, const std::string &varname, const octave_value &val=octave_value()) |
bool | at_top_level (void) const |
std::list< std::string > | autoloaded_functions (void) const |
void | cancel_quit (bool flag) |
int | chdir (const std::string &dir) |
void | cleanup_tmp_files (void) |
void | clear_all (bool force=false) |
void | clear_debug_watch_expressions (void) |
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_global_variable (const std::string &name) |
void | clear_global_variable_pattern (const std::string &pattern) |
void | clear_global_variable_regexp (const std::string &pattern) |
void | clear_global_variables (void) |
void | clear_objects (void) |
void | clear_symbol (const std::string &name) |
void | clear_symbol_pattern (const std::string &pat) |
void | clear_symbol_regexp (const std::string &pat) |
void | clear_variable (const std::string &name) |
void | clear_variable_pattern (const std::string &pattern) |
void | clear_variable_regexp (const std::string &pattern) |
void | clear_variables (void) |
std::set< std::string > | debug_watch_expressions (void) const |
octave_value_list | eval (const std::string &try_code, const std::string &catch_code, int nargout) |
octave_value_list | eval (const std::string &try_code, int nargout) |
octave_value_list | eval_string (const octave_value &arg, bool silent, int &parse_status, int nargout) |
octave_value | eval_string (const std::string &eval_str, bool silent, int &parse_status) |
octave_value_list | eval_string (const std::string &eval_str, bool silent, int &parse_status, int nargout) |
octave_value_list | evalin (const std::string &context, const std::string &try_code, const std::string &catch_code, int nargout) |
octave_value_list | evalin (const std::string &context, const std::string &try_code, int nargout) |
int | execute (void) |
bool | executing_finish_script (void) const |
bool | experimental_terminal_widget (void) const |
octave_value_list | feval (const char *name, const octave_value_list &args=octave_value_list(), int nargout=0) |
Evaluate an Octave function (built-in or interpreted) and return the list of result values. More... | |
octave_value_list | feval (const octave_value &f_arg, const octave_value_list &args=octave_value_list(), int nargout=0) |
octave_value_list | feval (const octave_value_list &args, int nargout=0) |
Evaluate an Octave function (built-in or interpreted) and return the list of result values. More... | |
octave_value_list | feval (const std::string &name, const octave_value_list &args=octave_value_list(), int nargout=0) |
octave_value_list | feval (octave_function *fcn, const octave_value_list &args=octave_value_list(), int nargout=0) |
octave_value | find (const std::string &name) |
application * | get_app_context (void) |
cdef_manager & | get_cdef_manager (void) |
child_list & | get_child_list (void) |
symbol_scope | get_current_scope (void) const |
display_info & | get_display_info (void) |
dynamic_loader & | get_dynamic_loader (void) |
environment & | get_environment (void) |
error_system & | get_error_system (void) |
tree_evaluator & | get_evaluator (void) |
event_manager & | get_event_manager (void) |
gh_manager & | get_gh_manager (void) |
gtk_manager & | get_gtk_manager (void) |
help_system & | get_help_system (void) |
history_system & | get_history_system (void) |
input_system & | get_input_system (void) |
void | get_line_and_eval (void) |
load_path & | get_load_path (void) |
load_save_system & | get_load_save_system (void) |
output_system & | get_output_system (void) |
profiler & | get_profiler (void) |
settings & | get_settings (void) |
stream_list & | get_stream_list (void) |
symbol_table & | get_symbol_table (void) |
symbol_scope | get_top_scope (void) const |
type_info & | get_type_info (void) |
url_handle_manager & | get_url_handle_manager (void) |
void | global_assign (const std::string &name, const octave_value &val=octave_value()) |
std::list< std::string > | global_variable_names (void) |
octave_value | global_varval (const std::string &name) const |
void | handle_exception (const execution_exception &ee) |
bool | in_top_level_repl (void) const |
void | inhibit_startup_message (bool flag) |
void | initialize (void) |
void | initialize_history (bool read_history_file=false) |
void | initialize_load_path (bool set_initial_path=true) |
bool | initialized (void) const |
void | install_variable (const std::string &name, const octave_value &value, bool global) |
void | interactive (bool arg) |
bool | interactive (void) const |
void | intern_nargin (octave_idx_type nargs) |
void | interrupt (void) |
void | interrupt_all_in_process_group (bool b) |
bool | interrupt_all_in_process_group (void) const |
bool | is_local_variable (const std::string &name) const |
bool | is_variable (const std::string &name) const |
bool | isglobal (const std::string &name) const |
octave_value | make_function_handle (const std::string &name) |
void | mark_for_deletion (const std::string &file) |
std::string | mfilename (const std::string &opt="") const |
bool | mislocked (bool skip_first=false) const |
bool | mislocked (const char *nm) |
bool | mislocked (const std::string &nm) |
void | mlock (bool skip_first=false) const |
void | munlock (bool skip_first=false) const |
void | munlock (const char *nm) |
void | munlock (const std::string &nm) |
interpreter & | operator= (const interpreter &)=delete |
void | parse_and_execute (const std::string &input, bool &incomplete_parse) |
void | pause (void) |
void | quit (int exit_status, bool force=false, bool confirm=true) |
void | read_init_files (bool flag) |
void | read_site_files (bool flag) |
void | recover_from_exception (void) |
bool | remove_atexit_fcn (const std::string &fname) |
void | remove_debug_watch_expression (const std::string &expr) |
symbol_scope | require_current_scope (const std::string &who) const |
void | resume (void) |
bool | server_mode (void) const |
void | set_global_value (const std::string &name, const octave_value &value) |
void | source_file (const std::string &file_name, const std::string &context="", bool verbose=false, bool require_file=true) |
void | stop (void) |
void | top_level_assign (const std::string &name, const octave_value &val=octave_value()) |
std::list< std::string > | top_level_variable_names (void) |
octave_value | top_level_varval (const std::string &name) const |
void | traditional (bool flag) |
bool | traditional (void) const |
std::list< std::string > | user_function_names (void) |
std::list< std::string > | variable_names (void) |
octave_value | varval (const std::string &name) const |
void | verbose (bool flag) |
Static Public Member Functions | |
static interpreter * | the_interpreter (void) |
Private Member Functions | |
void | display_startup_message (void) const |
void | execute_atexit_fcns (void) |
int | execute_command_line_file (void) |
int | execute_eval_option_code (void) |
void | execute_pkg_add (const std::string &dir) |
int | execute_startup_files (void) |
int | main_loop (void) |
void | maximum_braindamage (void) |
int | server_loop (void) |
void | shutdown (void) |
Static Private Attributes | |
static OCTAVE_THREAD_LOCAL interpreter * | m_instance = nullptr |
Definition at line 114 of file interpreter.h.
interpreter::interpreter | ( | application * | app_context = nullptr | ) |
Definition at line 454 of file interpreter.cc.
References cmdline_options::all_args(), cmdline_options::command_line_path(), cmdline_options::doc_cache_file(), cmdline_options::docstrings_file(), tree_evaluator::echo(), tree_evaluator::ECHO_ALL, cmdline_options::echo_commands(), tree_evaluator::ECHO_FUNCTIONS, tree_evaluator::ECHO_SCRIPTS, environment::exec_path(), cmdline_options::exec_path(), application::forced_interactive(), cmdline_options::forced_interactive(), cmdline_options::forced_line_editing(), environment::image_path(), cmdline_options::image_path(), cmdline_options::info_file(), cmdline_options::info_program(), thread::init(), input_system::initialize(), display_info::initialize(), initialize_error_handlers(), initialize_version_info(), initialize_xerbla_error_handler(), install_signal_handlers(), application::intern_argv(), intern_nargin(), application::is_octave_program(), cmdline_options::line_editing(), m_app_context, m_display_info, m_environment, m_evaluator, m_gh_manager, m_input_system, m_instance, m_interactive, m_load_path, m_traditional, maximum_braindamage(), cmdline_options::no_window_system(), string_vector::numel(), octave_ieee_init(), octave_interpreter_ready, octave_isatty_wrapper(), octave_set_default_fpucw(), octave_unblock_signal_by_name(), application::options(), quit_allowed, load_path::set_command_line_path(), cmdline_options::texi_macros_file(), and cmdline_options::traditional().
|
delete |
interpreter::~interpreter | ( | void | ) |
Definition at line 660 of file interpreter.cc.
References m_app_context, m_gh_manager, and shutdown().
void interpreter::add_atexit_fcn | ( | const std::string & | fname | ) |
Definition at line 2010 of file interpreter.cc.
References m_atexit_fcns, and m_executing_atexit.
void interpreter::add_debug_watch_expression | ( | const std::string & | expr | ) |
Definition at line 1914 of file interpreter.cc.
References tree_evaluator::add_debug_watch_expression(), and m_evaluator.
void interpreter::assign | ( | const std::string & | name, |
const octave_value & | val = octave_value () |
||
) |
Definition at line 1693 of file interpreter.cc.
References tree_evaluator::assign(), and m_evaluator.
void interpreter::assignin | ( | const std::string & | context, |
const std::string & | varname, | ||
const octave_value & | val = octave_value () |
||
) |
Definition at line 1699 of file interpreter.cc.
References tree_evaluator::assignin(), and m_evaluator.
bool interpreter::at_top_level | ( | void | ) | const |
Definition at line 1713 of file interpreter.cc.
References tree_evaluator::at_top_level(), and m_evaluator.
std::list< std::string > interpreter::autoloaded_functions | ( | void | ) | const |
Definition at line 1833 of file interpreter.cc.
References tree_evaluator::autoloaded_functions(), and m_evaluator.
Referenced by file_editor_tab::update_lexer_settings().
|
inline |
Definition at line 528 of file interpreter.h.
int interpreter::chdir | ( | const std::string & | dir | ) |
Definition at line 1401 of file interpreter.cc.
References chdir(), event_manager::directory_changed(), error(), m_event_manager, m_load_path, load_path::read_dir_config(), tilde_expand(), load_path::update(), and Vlast_chdir_time.
Referenced by load_path::contains_file_in_dir(), and main_window::set_current_working_directory().
void interpreter::cleanup_tmp_files | ( | void | ) |
Definition at line 1963 of file interpreter.cc.
References temporary_file_list::cleanup(), and m_tmp_files.
void interpreter::clear_all | ( | bool | force = false | ) |
Definition at line 1728 of file interpreter.cc.
References tree_evaluator::clear_all(), and m_evaluator.
Referenced by do_matlab_compatible_clear(), and shutdown().
void interpreter::clear_debug_watch_expressions | ( | void | ) |
Definition at line 1924 of file interpreter.cc.
References tree_evaluator::clear_debug_watch_expressions(), and m_evaluator.
void interpreter::clear_function | ( | const std::string & | name | ) |
Definition at line 1783 of file interpreter.cc.
References symbol_table::clear_function(), and m_symbol_table.
Referenced by do_clear_functions().
void interpreter::clear_function_pattern | ( | const std::string & | pat | ) |
Definition at line 1793 of file interpreter.cc.
References symbol_table::clear_function_pattern(), and m_symbol_table.
Referenced by do_clear_functions().
void interpreter::clear_function_regexp | ( | const std::string & | pat | ) |
Definition at line 1798 of file interpreter.cc.
References symbol_table::clear_function_regexp(), and m_symbol_table.
void interpreter::clear_functions | ( | bool | force = false | ) |
Definition at line 1778 of file interpreter.cc.
References symbol_table::clear_functions(), and m_symbol_table.
Referenced by do_clear_functions().
void interpreter::clear_global_variable | ( | const std::string & | name | ) |
Definition at line 1758 of file interpreter.cc.
References tree_evaluator::clear_global_variable(), and m_evaluator.
Referenced by do_clear_globals().
void interpreter::clear_global_variable_pattern | ( | const std::string & | pattern | ) |
Definition at line 1763 of file interpreter.cc.
References tree_evaluator::clear_global_variable_pattern(), and m_evaluator.
Referenced by do_clear_globals().
void interpreter::clear_global_variable_regexp | ( | const std::string & | pattern | ) |
Definition at line 1768 of file interpreter.cc.
References tree_evaluator::clear_global_variable_regexp(), and m_evaluator.
void interpreter::clear_global_variables | ( | void | ) |
Definition at line 1773 of file interpreter.cc.
References tree_evaluator::clear_global_variables(), and m_evaluator.
void interpreter::clear_objects | ( | void | ) |
Definition at line 1733 of file interpreter.cc.
References tree_evaluator::clear_objects(), and m_evaluator.
Referenced by do_matlab_compatible_clear().
void interpreter::clear_symbol | ( | const std::string & | name | ) |
Definition at line 1788 of file interpreter.cc.
References tree_evaluator::clear_symbol(), and m_evaluator.
void interpreter::clear_symbol_pattern | ( | const std::string & | pat | ) |
Definition at line 1803 of file interpreter.cc.
References tree_evaluator::clear_symbol_pattern(), and m_evaluator.
Referenced by do_clear_symbols(), and do_matlab_compatible_clear().
void interpreter::clear_symbol_regexp | ( | const std::string & | pat | ) |
Definition at line 1808 of file interpreter.cc.
References tree_evaluator::clear_symbol_regexp(), and m_evaluator.
void interpreter::clear_variable | ( | const std::string & | name | ) |
Definition at line 1738 of file interpreter.cc.
References tree_evaluator::clear_variable(), and m_evaluator.
Referenced by do_clear_globals(), and do_clear_variables().
void interpreter::clear_variable_pattern | ( | const std::string & | pattern | ) |
Definition at line 1743 of file interpreter.cc.
References tree_evaluator::clear_variable_pattern(), and m_evaluator.
Referenced by do_clear_globals(), and do_clear_variables().
void interpreter::clear_variable_regexp | ( | const std::string & | pattern | ) |
Definition at line 1748 of file interpreter.cc.
References tree_evaluator::clear_variable_regexp(), and m_evaluator.
Referenced by do_clear_variables().
void interpreter::clear_variables | ( | void | ) |
Definition at line 1753 of file interpreter.cc.
References tree_evaluator::clear_variables(), and m_evaluator.
Referenced by do_clear_symbols(), do_clear_variables(), and do_matlab_compatible_clear().
std::set< std::string > interpreter::debug_watch_expressions | ( | void | ) | const |
Definition at line 1929 of file interpreter.cc.
References tree_evaluator::debug_watch_expressions(), and m_evaluator.
|
private |
Definition at line 1095 of file interpreter.cc.
References inhibit_startup_message(), cmdline_options::inhibit_startup_message(), m_app_context, m_interactive, octave_startup_message(), and application::options().
Referenced by initialize().
octave_value_list interpreter::eval | ( | const std::string & | try_code, |
const std::string & | catch_code, | ||
int | nargout | ||
) |
Definition at line 1515 of file interpreter.cc.
References tree_evaluator::eval(), and m_evaluator.
octave_value_list interpreter::eval | ( | const std::string & | try_code, |
int | nargout | ||
) |
Definition at line 1509 of file interpreter.cc.
References tree_evaluator::eval(), and m_evaluator.
Referenced by base_qobject::execute_command().
octave_value_list interpreter::eval_string | ( | const octave_value & | arg, |
bool | silent, | ||
int & | parse_status, | ||
int | nargout | ||
) |
Definition at line 1502 of file interpreter.cc.
References tree_evaluator::eval_string(), and m_evaluator.
octave_value interpreter::eval_string | ( | const std::string & | eval_str, |
bool | silent, | ||
int & | parse_status | ||
) |
Definition at line 1496 of file interpreter.cc.
References tree_evaluator::eval_string(), and m_evaluator.
octave_value_list interpreter::eval_string | ( | const std::string & | eval_str, |
bool | silent, | ||
int & | parse_status, | ||
int | nargout | ||
) |
Definition at line 1489 of file interpreter.cc.
References tree_evaluator::eval_string(), and m_evaluator.
Referenced by variable_editor_model::eval_expr_event(), execute_eval_option_code(), execute_startup_files(), generate_struct_completions(), base_anonymous_fcn_handle::parse(), and variable_editor_model::retrieve_variable().
octave_value_list interpreter::evalin | ( | const std::string & | context, |
const std::string & | try_code, | ||
const std::string & | catch_code, | ||
int | nargout | ||
) |
Definition at line 1529 of file interpreter.cc.
References tree_evaluator::evalin(), and m_evaluator.
octave_value_list interpreter::evalin | ( | const std::string & | context, |
const std::string & | try_code, | ||
int | nargout | ||
) |
Definition at line 1522 of file interpreter.cc.
References tree_evaluator::evalin(), and m_evaluator.
Referenced by quit().
int interpreter::execute | ( | void | ) |
Definition at line 841 of file interpreter.cc.
References command_editor::blink_matching_paren(), execute_command_line_file(), execute_eval_option_code(), execute_startup_files(), cmdline_options::experimental_terminal_widget(), cmdline_options::forced_interactive(), cmdline_options::gui(), application::have_eval_option_code(), application::have_script_file(), initialize(), m_app_context, m_event_manager, main_loop(), application::options(), cmdline_options::persist(), cmdline_options::server(), server_loop(), shutdown(), cli_input_reader::start(), and event_manager::start_gui().
Referenced by interpreter_qobject::execute(), and cli_application::execute().
|
private |
Definition at line 1078 of file interpreter.cc.
References feval(), flush_stdout(), m_atexit_fcns, m_executing_atexit, and OCTAVE_SAFE_CALL.
Referenced by shutdown().
|
private |
Definition at line 1297 of file interpreter.cc.
References cmdline_options::all_args(), interactive(), application::intern_argv(), intern_nargin(), m_app_context, m_interactive, string_vector::numel(), application::options(), application::program_invocation_name(), application::program_name(), cmdline_options::remaining_args(), safe_source_file(), application::set_program_names(), and verbose().
Referenced by execute().
|
private |
Definition at line 1264 of file interpreter.cc.
References cmdline_options::code_to_eval(), eval_string(), handle_exception(), m_app_context, m_interactive, application::options(), and recover_from_exception().
Referenced by execute().
|
private |
Definition at line 2069 of file interpreter.cc.
References load_path::execute_pkg_add(), handle_exception(), m_load_path, and recover_from_exception().
Referenced by initialize_load_path().
|
private |
Definition at line 1114 of file interpreter.cc.
References dir_sep_str(), eval_string(), file_in_path(), handle_exception(), inhibit_startup_message(), cmdline_options::inhibit_startup_message(), local_site_defaults_file(), m_app_context, m_inhibit_startup_message, m_interactive, m_read_init_files, m_read_site_files, m_verbose, make_absolute(), application::options(), read_init_files(), cmdline_options::read_init_files(), read_site_files(), cmdline_options::read_site_files(), recover_from_exception(), safe_source_file(), same_file(), site_defaults_file(), verbose(), and cmdline_options::verbose_flag().
Referenced by execute().
|
inline |
Definition at line 530 of file interpreter.h.
bool interpreter::experimental_terminal_widget | ( | void | ) | const |
Definition at line 1903 of file interpreter.cc.
References cmdline_options::experimental_terminal_widget(), m_app_context, and application::options().
octave_value_list interpreter::feval | ( | const char * | name, |
const octave_value_list & | args = octave_value_list () , |
||
int | nargout = 0 |
||
) |
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
name | The name of the function to call. |
args | The arguments to the function. |
nargout | The number of output arguments expected. |
nargout
. Definition at line 1546 of file interpreter.cc.
Referenced by internal_fcn_handle::call(), simple_fcn_handle::call(), scoped_fcn_handle::call(), class_simple_fcn_handle::call(), tree_evaluator::evaluate_end_expression(), octave_inline_fcn::execute(), execute_atexit_fcns(), feval(), feval(), get_function_handle(), main_window::handle_open_any_request(), set_path_model::save(), and shutdown().
octave_value_list interpreter::feval | ( | const octave_value & | f_arg, |
const octave_value_list & | args = octave_value_list () , |
||
int | nargout = 0 |
||
) |
Definition at line 1577 of file interpreter.cc.
References error(), feval(), octave_value::function_value(), octave_value::is_function(), octave_value::is_function_handle(), octave_value::is_inline_function(), octave_value::is_string(), octave_value::is_undefined(), ovl(), octave_value::string_value(), and octave_value::subsref().
octave_value_list interpreter::feval | ( | const octave_value_list & | args, |
int | nargout = 0 |
||
) |
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
args | The first element of args is the function to call. It may be the name of the function as a string, a function handle, or an inline function. The remaining arguments are passed to the function. |
nargout | The number of output arguments expected. |
nargout
. Definition at line 1632 of file interpreter.cc.
References error(), feval(), octave_value_list::length(), and octave_value_list::slice().
octave_value_list interpreter::feval | ( | const std::string & | name, |
const octave_value_list & | args = octave_value_list () , |
||
int | nargout = 0 |
||
) |
Definition at line 1553 of file interpreter.cc.
References octave_function::call(), error(), symbol_table::find_function(), octave_value::function_value(), octave_value::is_undefined(), m_evaluator, and m_symbol_table.
octave_value_list interpreter::feval | ( | octave_function * | fcn, |
const octave_value_list & | args = octave_value_list () , |
||
int | nargout = 0 |
||
) |
Definition at line 1567 of file interpreter.cc.
References octave_function::call(), and m_evaluator.
octave_value interpreter::find | ( | const std::string & | name | ) |
Definition at line 1723 of file interpreter.cc.
References tree_evaluator::find(), and m_evaluator.
Referenced by cdef_package::cdef_package_rep::find(), and cdef_manager::find_class().
|
inline |
Definition at line 231 of file interpreter.h.
Referenced by base_qobject::close_gui().
|
inline |
Definition at line 318 of file interpreter.h.
Referenced by __get_cdef_manager__(), tree_evaluator::get_user_code(), and package_getAllPackages().
|
inline |
Definition at line 311 of file interpreter.h.
Referenced by __get_child_list__(), output_system::clear_external_pager(), and output_system::start_external_pager().
symbol_scope interpreter::get_current_scope | ( | void | ) | const |
Definition at line 1380 of file interpreter.cc.
References tree_evaluator::get_current_scope(), and m_evaluator.
Referenced by __get_current_scope__(), lexical_feedback::symbol_table_context::curr_scope(), require_current_scope(), and base_qobject::workspace_widget().
|
inline |
Definition at line 236 of file interpreter.h.
Referenced by __get_display_info__().
|
inline |
Definition at line 278 of file interpreter.h.
Referenced by __get_dynamic_loader__(), and load_fcn_from_file().
|
inline |
Definition at line 241 of file interpreter.h.
Referenced by history_system::do_edit_history().
|
inline |
Definition at line 251 of file interpreter.h.
Referenced by __get_error_system__(), bp_table::dbclear_all_signals(), bp_table::dbstop_process_map_args(), tree_evaluator::do_unwind_protect_cleanup_code(), tree_evaluator::enter_debugger(), tree_evaluator::eval(), tree_evaluator::evalin(), base_parser::finish_array_list(), generate_struct_completions(), tree_evaluator::get_line_and_eval(), file_editor_tab::handle_dbstop_if(), base_parser::make_colon_expression(), debugger::repl(), tree_evaluator::repl(), debugger::server_loop(), tree_evaluator::server_loop(), bp_table::set_stop_flag(), bp_table::stop_on_err_warn_status(), tree_evaluator::visit_statement(), tree_evaluator::visit_try_catch_command(), and tree_evaluator::visit_unwind_protect_command().
tree_evaluator & interpreter::get_evaluator | ( | void | ) |
Definition at line 1358 of file interpreter.cc.
References m_evaluator.
Referenced by __get_evaluator__(), file_editor_tab::add_breakpoint_event(), class_simple_fcn_handle::call(), file_editor_tab::confirm_dbquit_and_save(), symbol_table::current_scope(), load_save_system::dump_octave_core(), base_parser::finish_array_list(), main_window::handle_load_workspace_request(), main_window::handle_open_any_request(), file_editor_tab::handle_request_remove_breakpoint(), base_qobject::handle_variable_editor_update(), init_error_stack(), base_anonymous_fcn_handle::load_ascii(), base_anonymous_fcn_handle::load_binary(), base_anonymous_fcn_handle::load_hdf5(), base_parser::make_colon_expression(), cdef_class::make_meta_class(), base_anonymous_fcn_handle::parse(), file_editor_tab::remove_all_breakpoints(), debugger::repl(), file_editor::request_run_file(), file_editor_tab::save_file(), load_save_system::save_vars(), debugger::server_loop(), event_manager::set_workspace(), symbol_exist(), error_system::throw_error(), error_system::vwarning(), and base_qobject::workspace_widget().
|
inline |
Definition at line 328 of file interpreter.h.
Referenced by __get_event_manager__(), bp_table::add_breakpoint_1(), load_path::contains_file_in_dir(), error_system::display_exception(), history_system::do_history(), output_system::do_sync(), interpreter_qobject::execute(), tree_evaluator::get_line_and_eval(), main_window::handle_load_workspace_request(), main_window::handle_octave_ready(), main_window::handle_open_any_request(), base_qobject::handle_variable_editor_update(), base_qobject::history_widget(), command_widget::init_command_prompt(), history_system::initialize(), interpreter_qobject::interpreter_event(), tree_evaluator::parse_and_execute(), command_widget::process_input_line(), bp_table::remove_all_breakpoints_from_function(), bp_table::remove_breakpoint_1(), debugger::repl(), base_qobject::workspace_widget(), and history_system::write_timestamp().
|
inline |
Definition at line 333 of file interpreter.h.
Referenced by __get_gh_manager__().
|
inline |
Definition at line 323 of file interpreter.h.
Referenced by __get_gtk_manager__().
|
inline |
Definition at line 258 of file interpreter.h.
Referenced by __get_help_system__().
|
inline |
Definition at line 273 of file interpreter.h.
Referenced by main_window::handle_clear_history_request(), and base_lexer::input_from_tmp_history_file().
|
inline |
Definition at line 263 of file interpreter.h.
Referenced by __get_input_system__(), interpreter_qobject::execute(), lexer::fill_flex_buffer(), tree_evaluator::get_line_and_eval(), main_window::handle_octave_ready(), command_widget::init_command_prompt(), command_widget::process_input_line(), debugger::repl(), and push_parser::run().
void interpreter::get_line_and_eval | ( | void | ) |
Definition at line 792 of file interpreter.cc.
References tree_evaluator::get_line_and_eval(), and m_evaluator.
Referenced by cli_input_reader::start().
|
inline |
Definition at line 283 of file interpreter.h.
Referenced by bp_file_info::bp_file_info(), __get_load_path__(), cdef_manager::find_package(), tree_evaluator::lookup_autoload(), cdef_class::make_meta_class(), set_path_model::model_to_path(), package_getAllPackages(), set_path_model::path_to_model(), symbol_exist(), and file_editor_tab::update_lexer_settings().
|
inline |
Definition at line 288 of file interpreter.h.
Referenced by __get_load_save_system__().
|
inline |
Definition at line 268 of file interpreter.h.
Referenced by stream_list::stream_list(), and __get_output_system__().
profiler & interpreter::get_profiler | ( | void | ) |
Definition at line 1396 of file interpreter.cc.
References tree_evaluator::get_profiler(), and m_evaluator.
|
inline |
Definition at line 246 of file interpreter.h.
Referenced by base_lexer::debug_flag(), base_lexer::display_tokens(), and base_lexer::increment_token_count().
stream_list & interpreter::get_stream_list | ( | void | ) |
Definition at line 1363 of file interpreter.cc.
References m_stream_list.
Referenced by printf_internal(), puts_internal(), scanf_internal(), and textscan_internal().
|
inline |
Definition at line 298 of file interpreter.h.
Referenced by cdef_manager::cdef_manager(), __get_symbol_table__(), simple_fcn_handle::call(), dynamic_loader::clear(), tree_evaluator::clear_all(), dynamic_loader::clear_function(), tree_evaluator::clear_symbol(), tree_evaluator::clear_symbol_pattern(), tree_evaluator::clear_symbol_regexp(), file_editor_tab::confirm_dbquit_and_save(), tree_evaluator::evaluate_end_expression(), tree_identifier::evaluate_n(), tree_index_expression::evaluate_n(), tree_evaluator::final_index_error(), tree_evaluator::find(), get_function_handle(), tree_evaluator::get_user_code(), tree_evaluator::make_fcn_handle(), tree_evaluator::remove_autoload(), file_editor_tab::save_file(), tree_evaluator::source_file(), symbol_exist(), file_editor_tab::update_lexer_settings(), and tree_evaluator::visit_function_def().
symbol_scope interpreter::get_top_scope | ( | void | ) | const |
Definition at line 1374 of file interpreter.cc.
References tree_evaluator::get_top_scope(), and m_evaluator.
|
inline |
Definition at line 293 of file interpreter.h.
Referenced by cdef_manager::cdef_manager(), __get_type_info__(), tree_binary_expression::evaluate(), tree_compound_binary_expression::evaluate(), tree_prefix_expression::evaluate(), tree_postfix_expression::evaluate(), and tm_const::generic_concat().
url_handle_manager & interpreter::get_url_handle_manager | ( | void | ) |
Definition at line 1368 of file interpreter.cc.
References m_url_handle_manager.
void interpreter::global_assign | ( | const std::string & | name, |
const octave_value & | val = octave_value () |
||
) |
Definition at line 1661 of file interpreter.cc.
References tree_evaluator::global_assign(), and m_evaluator.
std::list< std::string > interpreter::global_variable_names | ( | void | ) |
Definition at line 1813 of file interpreter.cc.
References tree_evaluator::global_variable_names(), and m_evaluator.
Referenced by do_clear_globals().
octave_value interpreter::global_varval | ( | const std::string & | name | ) | const |
Definition at line 1656 of file interpreter.cc.
References tree_evaluator::global_varval(), and m_evaluator.
void interpreter::handle_exception | ( | const execution_exception & | ee | ) |
Definition at line 1934 of file interpreter.cc.
References error_system::display_exception(), m_error_system, recover_from_exception(), and error_system::save_exception().
Referenced by execute_eval_option_code(), execute_pkg_add(), execute_startup_files(), and safe_source_file().
|
inline |
Definition at line 211 of file interpreter.h.
Referenced by debugger::quitting_debugger().
|
inline |
Definition at line 206 of file interpreter.h.
Referenced by display_startup_message(), and execute_startup_files().
void interpreter::initialize | ( | void | ) |
Definition at line 739 of file interpreter.cc.
References can_interrupt, catch_interrupts(), display_startup_message(), cmdline_options::experimental_terminal_widget(), cmdline_options::gui(), initialize_history(), initialize_load_path(), m_app_context, m_initialized, octave_initialized, octave_interrupt_hook, octave_save_signal_mask(), octave_signal_hook, application::options(), and respond_to_pending_signals().
Referenced by interpreter_qobject::execute(), and execute().
void interpreter::initialize_history | ( | bool | read_history_file = false | ) |
Definition at line 675 of file interpreter.cc.
References command_history::ignore_entries(), history_system::initialize(), m_app_context, m_history_initialized, m_history_system, application::options(), and cmdline_options::read_history_file().
Referenced by initialize().
void interpreter::initialize_load_path | ( | bool | set_initial_path = true | ) |
Definition at line 703 of file interpreter.cc.
References execute_pkg_add(), load_path::get_add_hook(), load_path::initialize(), m_app_context, m_load_path, m_load_path_initialized, application::options(), load_path::set_add_hook(), and cmdline_options::set_initial_path().
Referenced by initialize().
|
inline |
Definition at line 216 of file interpreter.h.
Referenced by interpreter_qobject::execute().
void interpreter::install_variable | ( | const std::string & | name, |
const octave_value & | value, | ||
bool | global | ||
) |
Definition at line 1650 of file interpreter.cc.
References tree_evaluator::install_variable(), and m_evaluator.
Referenced by load_save_system::install_loaded_variable().
|
inline |
Definition at line 176 of file interpreter.h.
|
inline |
Definition at line 171 of file interpreter.h.
Referenced by base_stream::do_gets(), base_stream::do_oscanf(), base_stream::do_scanf(), base_stream::do_textscan(), execute_command_line_file(), tree_evaluator::get_line_and_eval(), tree_evaluator::parse_and_execute(), raw_mode(), debugger::repl(), tree_evaluator::repl(), base_lexer::reset(), debugger::server_loop(), tree_evaluator::server_loop(), base_stream::skipl(), output_system::sync(), tree_evaluator::visit_statement(), and error_system::vwarning().
void interpreter::intern_nargin | ( | octave_idx_type | nargs | ) |
Definition at line 668 of file interpreter.cc.
References m_evaluator, stack_frame::NARGIN, and tree_evaluator::set_auto_fcn_var().
Referenced by interpreter(), and execute_command_line_file().
void interpreter::interrupt | ( | void | ) |
Definition at line 1841 of file interpreter.cc.
References m_interrupt_all_in_process_group, octave_get_sig_number(), octave_getpid_wrapper(), and octave_kill_wrapper().
Referenced by interpreter_qobject::interrupt(), and stop().
|
inline |
Definition at line 221 of file interpreter.h.
|
inline |
Definition at line 226 of file interpreter.h.
bool interpreter::is_local_variable | ( | const std::string & | name | ) | const |
Definition at line 1683 of file interpreter.cc.
References tree_evaluator::is_local_variable(), and m_evaluator.
Referenced by do_matlab_compatible_clear().
bool interpreter::is_variable | ( | const std::string & | name | ) | const |
Definition at line 1678 of file interpreter.cc.
References tree_evaluator::is_variable(), and m_evaluator.
Referenced by generate_struct_completions(), and load_save_system::save_vars().
bool interpreter::isglobal | ( | const std::string & | name | ) | const |
Definition at line 1718 of file interpreter.cc.
References tree_evaluator::is_global(), and m_evaluator.
|
private |
Definition at line 1346 of file interpreter.cc.
References command_editor::add_event_hook(), m_evaluator, release_unreferenced_dynamic_libraries(), and tree_evaluator::repl().
Referenced by execute().
octave_value interpreter::make_function_handle | ( | const std::string & | name | ) |
Definition at line 1645 of file interpreter.cc.
References m_evaluator, and tree_evaluator::make_fcn_handle().
void interpreter::mark_for_deletion | ( | const std::string & | file | ) |
Definition at line 1958 of file interpreter.cc.
References temporary_file_list::insert(), and m_tmp_files.
|
private |
Definition at line 2038 of file interpreter.cc.
References error_system::beep_on_error(), load_save_system::crash_dumps_octave_core(), error_system::disable_warning(), Fconfirm_recursive_rmdir(), Ffixed_point_format(), Fprint_empty_dimensions(), Fprint_struct_array_contents(), Fstruct_levels_to_print(), m_error_system, m_evaluator, m_history_system, m_input_system, m_load_save_system, input_system::PS1(), input_system::PS2(), tree_evaluator::PS4(), load_save_system::save_default_options(), and history_system::timestamp_format_string().
Referenced by interpreter().
std::string interpreter::mfilename | ( | const std::string & | opt = "" | ) | const |
Definition at line 1484 of file interpreter.cc.
References m_evaluator, and tree_evaluator::mfilename().
bool interpreter::mislocked | ( | bool | skip_first = false | ) | const |
Definition at line 1433 of file interpreter.cc.
References m_evaluator, and tree_evaluator::mislocked().
Referenced by mislocked().
bool interpreter::mislocked | ( | const char * | nm | ) |
Definition at line 1459 of file interpreter.cc.
References error(), and mislocked().
bool interpreter::mislocked | ( | const std::string & | nm | ) |
Definition at line 1467 of file interpreter.cc.
References symbol_table::find_function(), octave_value::function_value(), octave_value::is_defined(), octave_function::islocked(), and m_symbol_table.
void interpreter::mlock | ( | bool | skip_first = false | ) | const |
Definition at line 1423 of file interpreter.cc.
References m_evaluator, and tree_evaluator::mlock().
void interpreter::munlock | ( | bool | skip_first = false | ) | const |
Definition at line 1428 of file interpreter.cc.
References m_evaluator, and tree_evaluator::munlock().
Referenced by munlock().
void interpreter::munlock | ( | const char * | nm | ) |
Definition at line 1438 of file interpreter.cc.
void interpreter::munlock | ( | const std::string & | nm | ) |
Definition at line 1446 of file interpreter.cc.
References symbol_table::find_function(), octave_value::function_value(), octave_value::is_defined(), m_symbol_table, and octave_function::unlock().
|
delete |
void interpreter::parse_and_execute | ( | const std::string & | input, |
bool & | incomplete_parse | ||
) |
Definition at line 832 of file interpreter.cc.
References input(), m_evaluator, and tree_evaluator::parse_and_execute().
Referenced by tree_evaluator::get_line_and_eval(), and command_widget::process_input_line().
void interpreter::pause | ( | void | ) |
Definition at line 1869 of file interpreter.cc.
References tree_evaluator::break_on_next_statement(), m_evaluator, and tree_evaluator::reset_debug_state().
Referenced by interpreter_qobject::pause().
void interpreter::quit | ( | int | exit_status, |
bool | force = false , |
||
bool | confirm = true |
||
) |
Definition at line 1968 of file interpreter.cc.
References event_manager::confirm_shutdown(), evalin(), m_cancel_quit, m_event_manager, m_executing_finish_script, and symbol_exist().
Referenced by base_qobject::close_gui(), and main_window::closeEvent().
|
inline |
Definition at line 186 of file interpreter.h.
Referenced by execute_startup_files().
|
inline |
Definition at line 181 of file interpreter.h.
Referenced by execute_startup_files().
void interpreter::recover_from_exception | ( | void | ) |
Definition at line 1946 of file interpreter.cc.
References can_interrupt, catch_interrupts(), event_manager::interpreter_interrupted(), m_event_manager, octave_interrupt_state, octave_restore_signal_mask(), and octave_signal_caught.
Referenced by convert_to_valid_int(), tree_evaluator::do_unwind_protect_cleanup_code(), tree_evaluator::eval(), octave_lvalue::eval_for_numel(), tree_evaluator::evalin(), execute_eval_option_code(), execute_pkg_add(), execute_startup_files(), base_parser::finish_array_list(), generate_struct_completions(), tree_evaluator::get_line_and_eval(), get_output_list(), file_editor_tab::handle_dbstop_if(), handle_exception(), load_path::dir_info::initialize(), base_parser::make_colon_expression(), tree::meets_bp_condition(), latex_renderer::read_image(), cdef_object_rep::release(), debugger::repl(), tree_evaluator::repl(), safe_source_file(), file_editor_tab::save_file(), debugger::server_loop(), tree_evaluator::server_loop(), load_path::dir_info::update(), tree_evaluator::visit_statement(), tree_evaluator::visit_try_catch_command(), and tree_evaluator::visit_unwind_protect_command().
bool interpreter::remove_atexit_fcn | ( | const std::string & | fname | ) |
Definition at line 2018 of file interpreter.cc.
References m_atexit_fcns.
void interpreter::remove_debug_watch_expression | ( | const std::string & | expr | ) |
Definition at line 1919 of file interpreter.cc.
References m_evaluator, and tree_evaluator::remove_debug_watch_expression().
symbol_scope interpreter::require_current_scope | ( | const std::string & | who | ) | const |
Definition at line 1386 of file interpreter.cc.
References error(), and get_current_scope().
void interpreter::resume | ( | void | ) |
Definition at line 1889 of file interpreter.cc.
References tree_evaluator::dbcont(), tree_evaluator::in_debug_repl(), and m_evaluator.
Referenced by interpreter_qobject::resume().
|
private |
Definition at line 1353 of file interpreter.cc.
References m_evaluator, and tree_evaluator::server_loop().
Referenced by execute().
|
inline |
Definition at line 169 of file interpreter.h.
Referenced by output_system::do_sync(), debugger::quitting_debugger(), debugger::repl(), and output_system::sync().
void interpreter::set_global_value | ( | const std::string & | name, |
const octave_value & | value | ||
) |
|
private |
Definition at line 968 of file interpreter.cc.
References command_history::clean_up_and_save(), symbol_table::cleanup(), clear_all(), input_system::clear_input_event_hooks(), symbol_table::clear_mex_functions(), event_manager::clear_workspace(), event_manager::close_gui(), event_manager::disable(), execute_atexit_fcns(), feval(), flush_stdout(), command_history::ignoring_entries(), m_event_manager, m_gtk_manager, m_history_system, m_initialized, m_input_system, m_symbol_table, OCTAVE_SAFE_CALL, ovl(), event_manager::process_events(), command_editor::restore_terminal_state(), sysdep_cleanup(), gtk_manager::unload_all_toolkits(), and history_system::write_timestamp().
Referenced by ~interpreter(), and execute().
void interpreter::source_file | ( | const std::string & | file_name, |
const std::string & | context = "" , |
||
bool | verbose = false , |
||
bool | require_file = true |
||
) |
Definition at line 1706 of file interpreter.cc.
References m_evaluator, tree_evaluator::source_file(), and verbose().
Referenced by octave_qscintilla::contextmenu_run(), and source_file().
void interpreter::stop | ( | void | ) |
Definition at line 1878 of file interpreter.cc.
References tree_evaluator::dbquit(), tree_evaluator::in_debug_repl(), interrupt(), and m_evaluator.
Referenced by interpreter_qobject::stop().
|
inlinestatic |
Definition at line 539 of file interpreter.h.
Referenced by __get_interpreter__().
void interpreter::top_level_assign | ( | const std::string & | name, |
const octave_value & | val = octave_value () |
||
) |
Definition at line 1672 of file interpreter.cc.
References m_evaluator, and tree_evaluator::top_level_assign().
std::list< std::string > interpreter::top_level_variable_names | ( | void | ) |
Definition at line 1818 of file interpreter.cc.
References m_evaluator, and tree_evaluator::top_level_variable_names().
octave_value interpreter::top_level_varval | ( | const std::string & | name | ) | const |
Definition at line 1667 of file interpreter.cc.
References m_evaluator, and tree_evaluator::top_level_varval().
|
inline |
Definition at line 196 of file interpreter.h.
|
inline |
Definition at line 201 of file interpreter.h.
std::list< std::string > interpreter::user_function_names | ( | void | ) |
Definition at line 1828 of file interpreter.cc.
References m_symbol_table, and symbol_table::user_function_names().
Referenced by do_clear_functions().
std::list< std::string > interpreter::variable_names | ( | void | ) |
Definition at line 1823 of file interpreter.cc.
References m_evaluator, and tree_evaluator::variable_names().
Referenced by do_clear_variables().
octave_value interpreter::varval | ( | const std::string & | name | ) | const |
Definition at line 1688 of file interpreter.cc.
References m_evaluator, and tree_evaluator::varval().
Referenced by simple_fcn_handle::call(), load_save_system::save_vars(), symbol_exist(), and base_qobject::workspace_widget().
|
inline |
Definition at line 191 of file interpreter.h.
Referenced by execute_command_line_file(), execute_startup_files(), and source_file().
|
private |
Definition at line 575 of file interpreter.h.
Referenced by interpreter(), ~interpreter(), display_startup_message(), execute(), execute_command_line_file(), execute_eval_option_code(), execute_startup_files(), experimental_terminal_widget(), initialize(), initialize_history(), and initialize_load_path().
|
private |
Definition at line 579 of file interpreter.h.
Referenced by add_atexit_fcn(), execute_atexit_fcns(), and remove_atexit_fcn().
|
private |
Definition at line 642 of file interpreter.h.
Referenced by quit().
|
private |
Definition at line 615 of file interpreter.h.
|
private |
Definition at line 611 of file interpreter.h.
|
private |
Definition at line 581 of file interpreter.h.
Referenced by interpreter().
|
private |
Definition at line 599 of file interpreter.h.
|
private |
Definition at line 583 of file interpreter.h.
Referenced by interpreter().
|
private |
Definition at line 587 of file interpreter.h.
Referenced by handle_exception(), and maximum_braindamage().
|
private |
Definition at line 589 of file interpreter.h.
Referenced by interpreter(), add_debug_watch_expression(), assign(), assignin(), at_top_level(), autoloaded_functions(), clear_all(), clear_debug_watch_expressions(), clear_global_variable(), clear_global_variable_pattern(), clear_global_variable_regexp(), clear_global_variables(), clear_objects(), clear_symbol(), clear_symbol_pattern(), clear_symbol_regexp(), clear_variable(), clear_variable_pattern(), clear_variable_regexp(), clear_variables(), debug_watch_expressions(), eval(), eval_string(), evalin(), feval(), find(), get_current_scope(), get_evaluator(), get_line_and_eval(), get_profiler(), get_top_scope(), global_assign(), global_variable_names(), global_varval(), install_variable(), intern_nargin(), is_local_variable(), is_variable(), isglobal(), main_loop(), make_function_handle(), maximum_braindamage(), mfilename(), mislocked(), mlock(), munlock(), parse_and_execute(), pause(), remove_debug_watch_expression(), resume(), server_loop(), source_file(), stop(), top_level_assign(), top_level_variable_names(), top_level_varval(), variable_names(), and varval().
|
private |
Definition at line 619 of file interpreter.h.
Referenced by chdir(), execute(), quit(), recover_from_exception(), and shutdown().
|
private |
Definition at line 646 of file interpreter.h.
Referenced by add_atexit_fcn(), and execute_atexit_fcns().
|
private |
Definition at line 644 of file interpreter.h.
Referenced by quit().
|
private |
Definition at line 621 of file interpreter.h.
Referenced by interpreter(), and ~interpreter().
|
private |
Definition at line 617 of file interpreter.h.
Referenced by shutdown().
|
private |
Definition at line 591 of file interpreter.h.
|
private |
Definition at line 638 of file interpreter.h.
Referenced by initialize_history().
|
private |
Definition at line 597 of file interpreter.h.
Referenced by initialize_history(), maximum_braindamage(), and shutdown().
|
private |
Definition at line 634 of file interpreter.h.
Referenced by execute_startup_files().
|
private |
Definition at line 648 of file interpreter.h.
Referenced by initialize(), and shutdown().
|
private |
Definition at line 593 of file interpreter.h.
Referenced by interpreter(), maximum_braindamage(), and shutdown().
|
staticprivate |
Definition at line 573 of file interpreter.h.
Referenced by interpreter().
|
private |
Definition at line 624 of file interpreter.h.
Referenced by interpreter(), display_startup_message(), execute_command_line_file(), execute_eval_option_code(), and execute_startup_files().
|
private |
Definition at line 640 of file interpreter.h.
Referenced by interrupt().
|
private |
Definition at line 601 of file interpreter.h.
Referenced by interpreter(), chdir(), execute_pkg_add(), and initialize_load_path().
|
private |
Definition at line 636 of file interpreter.h.
Referenced by initialize_load_path().
|
private |
Definition at line 603 of file interpreter.h.
Referenced by maximum_braindamage().
|
private |
Definition at line 595 of file interpreter.h.
|
private |
Definition at line 628 of file interpreter.h.
Referenced by execute_startup_files().
|
private |
Definition at line 626 of file interpreter.h.
Referenced by execute_startup_files().
|
private |
Definition at line 585 of file interpreter.h.
|
private |
Definition at line 609 of file interpreter.h.
Referenced by get_stream_list().
|
private |
Definition at line 607 of file interpreter.h.
Referenced by clear_function(), clear_function_pattern(), clear_function_regexp(), clear_functions(), feval(), mislocked(), munlock(), shutdown(), and user_function_names().
|
private |
Definition at line 577 of file interpreter.h.
Referenced by cleanup_tmp_files(), and mark_for_deletion().
|
private |
Definition at line 632 of file interpreter.h.
Referenced by interpreter().
|
private |
Definition at line 605 of file interpreter.h.
|
private |
Definition at line 613 of file interpreter.h.
Referenced by get_url_handle_manager().
|
private |
Definition at line 630 of file interpreter.h.
Referenced by execute_startup_files().