GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <cstdio>
#include <string>
#include <stack>
#include <vector>
#include <map>
#include "lex.h"
#include "symtab.h"
#include "token.h"
#include "oct-obj.h"
Go to the source code of this file.
Classes | |
class | octave_base_parser |
class | octave_parser |
class | octave_push_parser |
Functions | |
OCTINTERP_API string_vector | autoloaded_functions (void) |
OCTINTERP_API void | cleanup_statement_list (tree_statement_list **lst) |
OCTINTERP_API octave_value_list | eval_string (const std::string &, bool silent, int &parse_status, int hargout) |
OCTINTERP_API octave_value | eval_string (const std::string &, bool silent, int &parse_status) |
OCTINTERP_API octave_value_list | feval (const std::string &name, const octave_value_list &args=octave_value_list(), int nargout=0) |
OCTINTERP_API octave_value_list | feval (octave_function *fcn, const octave_value_list &args=octave_value_list(), int nargout=0) |
OCTINTERP_API octave_value_list | feval (const octave_value_list &args, int nargout=0) |
OCTINTERP_API std::string | get_help_from_file (const std::string &nm, bool &symbol_found, std::string &file) |
OCTINTERP_API std::string | get_help_from_file (const std::string &nm, bool &symbol_found) |
OCTINTERP_API octave_function * | load_fcn_from_file (const std::string &file_name, const std::string &dir_name=std::string(), const std::string &dispatch_type=std::string(), const std::string &package_name=std::string(), const std::string &fcn_name=std::string(), bool autoload=false) |
OCTINTERP_API std::string | lookup_autoload (const std::string &nm) |
OCTINTERP_API string_vector | reverse_lookup_autoload (const std::string &nm) |
OCTINTERP_API void | source_file (const std::string &file_name, const std::string &context=std::string(), bool verbose=false, bool require_file=true, const std::string &warn_for=std::string()) |
Variables | |
octave_base_lexer * | LEXER |
int | octave_debug |
bool | reading_startup_message_printed |
OCTINTERP_API string_vector autoloaded_functions | ( | void | ) |
Definition at line 8172 of file oct-parse.cc.
References names().
Referenced by F__list_functions__(), and make_name_list().
OCTINTERP_API void cleanup_statement_list | ( | tree_statement_list ** | lst | ) |
Definition at line 8907 of file oct-parse.cc.
OCTINTERP_API octave_value_list eval_string | ( | const std::string & | , |
bool | silent, | ||
int & | parse_status, | ||
int | hargout | ||
) |
Definition at line 8810 of file oct-parse.cc.
References tree_statement_list::accept(), bind_ans(), tree_break_command::breaking, tree_continue_command::continuing, current_evaluator, octave_value_list::empty(), lexical_feedback::end_of_input, error(), error_state, tree_statement::expression(), octave_base_list< elt_type >::front(), tree_expression::is_assignment_expression(), tree_statement::is_expression(), tree_expression::is_identifier(), octave_base_list< elt_type >::length(), octave_base_parser::lexer, tree_expression::print_result(), octave_base_parser::reset(), tree_return_command::returning, octave_parser::run(), tree_expression::rvalue(), tree_expression::set_print_flag(), and octave_base_parser::stmt_list.
Referenced by gh_manager::do_execute_callback(), do_who(), eval_string(), execute_eval_option_code(), extract_function(), Feval(), Fevalin(), generate_struct_completions(), get_user_input(), octave_fcn_handle::load_ascii(), octave_fcn_handle::load_binary(), octave_fcn_handle::load_hdf5(), looks_like_struct(), mexEvalString(), octave_fcn_inline::octave_fcn_inline(), and read_mat5_binary_element().
OCTINTERP_API octave_value eval_string | ( | const std::string & | , |
bool | silent, | ||
int & | parse_status | ||
) |
Definition at line 8879 of file oct-parse.cc.
References octave_value_list::empty(), and eval_string().
OCTINTERP_API octave_value_list feval | ( | const std::string & | name, |
const octave_value_list & | args = octave_value_list() , |
||
int | nargout = 0 |
||
) |
Definition at line 8625 of file oct-parse.cc.
References octave_value::do_multi_index_op(), error(), error_state, symbol_table::find_function(), octave_value::is_defined(), and maybe_missing_function_hook().
Referenced by octave_class::all_strings(), bind_internal_variable(), compare_property_values(), do_colon_op(), gh_manager::do_execute_callback(), gtk_manager::do_get_toolkit(), do_octave_atexit(), do_who(), named_hook_function::eval(), F__ichol0__(), F__icholt__(), F__ilu0__(), F__iluc__(), F__ilutp__(), Fbuiltin(), Fdot(), Fend(), feval(), Ffeval(), Fquadcc(), have_gnuplot_binary(), octave_class::index_vector(), install_oct_parse_fcns(), interactive_input(), octave_class::load_ascii(), octave_class::load_binary(), octave_class::load_hdf5(), maybe_missing_function_hook(), mexCallMATLAB(), octave_class::numel(), gnuplot_graphics_toolkit::print_figure(), print_usage(), octave_class::print_with_name(), read_mat5_binary_element(), gnuplot_graphics_toolkit::redraw_figure(), tree_funcall::rvalue(), octave_class::save_ascii(), octave_class::save_binary(), octave_class::save_hdf5(), save_mat5_binary_element(), octave_class::size(), octave_class::subsasgn_common(), and octave_class::subsref().
OCTINTERP_API octave_value_list feval | ( | octave_function * | fcn, |
const octave_value_list & | args = octave_value_list() , |
||
int | nargout = 0 |
||
) |
Definition at line 8644 of file oct-parse.cc.
References octave_base_value::do_multi_index_op().
OCTINTERP_API octave_value_list feval | ( | const octave_value_list & | args, |
int | nargout = 0 |
||
) |
Definition at line 8668 of file oct-parse.cc.
References octave_value::do_multi_index_op(), error(), error_state, feval(), get_feval_args(), octave_value::is_anonymous_function(), octave_value::is_function_handle(), octave_value::is_inline_function(), octave_value::is_string(), octave_value_list::length(), and octave_value::string_value().
OCTINTERP_API std::string get_help_from_file | ( | const std::string & | nm, |
bool & | symbol_found, | ||
std::string & | file | ||
) |
Definition at line 8107 of file oct-parse.cc.
References octave_env::base_pathname(), file_ops::dir_sep_str(), octave_function::doc_string(), fcn_file_in_path(), and parse_fcn_file().
Referenced by get_help_from_file(), and raw_help_from_file().
OCTINTERP_API std::string get_help_from_file | ( | const std::string & | nm, |
bool & | symbol_found | ||
) |
Definition at line 8150 of file oct-parse.cc.
References get_help_from_file().
OCTINTERP_API octave_function* load_fcn_from_file | ( | const std::string & | file_name, |
const std::string & | dir_name = std::string() , |
||
const std::string & | dispatch_type = std::string() , |
||
const std::string & | package_name = std::string() , |
||
const std::string & | fcn_name = std::string() , |
||
bool | autoload = false |
||
) |
Definition at line 8198 of file oct-parse.cc.
References octave_env::absolute_pathname(), octave_env::base_pathname(), file_ops::dir_sep_str(), octave_function::doc_string(), octave_base_value::is_user_function(), octave_dynamic_loader::load_mex(), octave_dynamic_loader::load_oct(), octave_env::make_absolute(), parse_fcn_file(), octave_function::scope(), octave_function::stash_dir_name(), symbol_table::stash_dir_name_for_subfunctions(), and octave_function::stash_package_name().
Referenced by cdef_method::cdef_method_rep::check_method(), symbol_table::fcn_info::fcn_info_rep::find_autoload(), symbol_table::fcn_info::fcn_info_rep::find_user_function(), symbol_table::fcn_info::fcn_info_rep::load_class_constructor(), symbol_table::fcn_info::fcn_info_rep::load_class_method(), load_out_of_date_fcn(), symbol_table::fcn_info::fcn_info_rep::load_private_function(), read_mat5_binary_element(), and octave_fcn_handle::set_fcn().
OCTINTERP_API std::string lookup_autoload | ( | const std::string & | nm | ) |
Definition at line 8157 of file oct-parse.cc.
References load_path::find_file().
Referenced by symbol_table::fcn_info::fcn_info_rep::find_autoload(), out_of_date_check(), and symbol_exist().
OCTINTERP_API string_vector reverse_lookup_autoload | ( | const std::string & | nm | ) |
Definition at line 8185 of file oct-parse.cc.
References string_vector::append(), and names().
OCTINTERP_API void source_file | ( | const std::string & | file_name, |
const std::string & | context = std::string() , |
||
bool | verbose = false , |
||
bool | require_file = true , |
||
const std::string & | warn_for = std::string() |
||
) |
Definition at line 8405 of file oct-parse.cc.
References action_container::add_fcn(), octave_base_value::do_multi_index_op(), error(), error_state, octave_call_stack::goto_base_frame(), octave_call_stack::goto_caller_frame(), octave_base_value::is_user_script(), octave_env::make_absolute(), parse_fcn_file(), octave_call_stack::pop(), action_container::protect_var(), reading_startup_message_printed, file_ops::tilde_expand(), and Vmax_recursion_depth.
Referenced by do_edit_history(), do_run_history(), execute_pkg_add_or_del(), Fsource(), and safe_source_file().
octave_base_lexer* LEXER |
Definition at line 137 of file oct-parse.cc.
int octave_debug |
Referenced by F__parser_debug_flag__(), and octave_process_command_line().
bool reading_startup_message_printed |
Definition at line 149 of file oct-parse.cc.
Referenced by octave_execute_interpreter(), and source_file().