#include "pt-idx.h"
Public Member Functions | |
tree_index_expression (tree_expression *e, const std::string &n, int l=-1, int c=-1) | |
tree_index_expression (tree_expression *e, tree_expression *df, int l=-1, int c=-1) | |
tree_index_expression (tree_expression *e=nullptr, tree_argument_list *lst=nullptr, int l=-1, int c=-1, char t='(') | |
~tree_index_expression () | |
void | accept (tree_walker &tw) |
tree_index_expression * | append (const std::string &n) |
tree_index_expression * | append (tree_argument_list *lst=nullptr, char t='(') |
tree_index_expression * | append (tree_expression *df) |
std::list< tree_argument_list * > | arg_lists () |
std::list< string_vector > | arg_names () |
tree_index_expression * | dup (symbol_scope &scope) const |
std::list< tree_expression * > | dyn_fields () |
octave_value | evaluate (tree_evaluator &tw, int nargout=1) |
octave_value_list | evaluate_n (tree_evaluator &tw, int nargout=1) |
tree_expression * | expression () |
std::string | get_struct_index (tree_evaluator &tw, std::list< string_vector >::const_iterator p_arg_nm, std::list< tree_expression * >::const_iterator p_dyn_field) const |
bool | is_index_expression () const |
bool | is_word_list_cmd () const |
octave_lvalue | lvalue (tree_evaluator &tw) |
bool | lvalue_ok () const |
void | mark_word_list_cmd () |
std::string | name () const |
bool | rvalue_ok () const |
std::string | type_tags () |
Public Member Functions inherited from tree_expression | |
tree_expression (int l=-1, int c=-1) | |
virtual | ~tree_expression ()=default |
virtual void | copy_base (const tree_expression &e) |
virtual bool | is_assignment_expression () const |
virtual bool | is_binary_expression () const |
virtual bool | is_boolean_expression () const |
virtual bool | is_colon_expression () const |
virtual bool | is_constant () const |
bool | is_for_cmd_expr () const |
virtual bool | is_identifier () const |
virtual bool | is_matrix () const |
bool | is_postfix_indexed () const |
virtual bool | is_prefix_expression () const |
virtual bool | is_unary_expression () const |
virtual bool | iscell () const |
void | mark_as_for_cmd_expr () |
tree_expression * | mark_in_parens () |
virtual std::string | oper () const |
virtual std::string | original_text () const |
int | paren_count () const |
char | postfix_index () const |
bool | print_result () const |
tree_expression * | set_postfix_index (char type) |
tree_expression * | set_print_flag (bool print) |
Public Member Functions inherited from tree | |
tree (int l=-1, int c=-1) | |
virtual | ~tree ()=default |
const std::string | bp_cond () const |
virtual int | column () const |
void | column (int c) |
virtual void | delete_breakpoint () |
bool | is_active_breakpoint (tree_evaluator &tw) const |
bool | is_breakpoint () const |
virtual int | line () const |
void | line (int l) |
bool | meets_bp_condition (tree_evaluator &tw) const |
virtual void | set_breakpoint (const std::string &condition) |
void | set_location (int l, int c) |
std::string | str_print_code () |
Additional Inherited Members | |
Protected Attributes inherited from tree_expression | |
bool | m_for_cmd_expr |
int | m_num_parens |
char | m_postfix_index_type |
bool | m_print_flag |
tree_index_expression::tree_index_expression | ( | tree_expression * | e = nullptr , |
tree_argument_list * | lst = nullptr , |
||
int | l = -1 , |
||
int | c = -1 , |
||
char | t = '(' |
||
) |
tree_index_expression::tree_index_expression | ( | tree_expression * | e, |
const std::string & | n, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
tree_index_expression::tree_index_expression | ( | tree_expression * | e, |
tree_expression * | df, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
|
inlinevirtual |
Implements tree.
Definition at line 111 of file pt-idx.h.
References tree_walker::visit_index_expression().
tree_index_expression * tree_index_expression::append | ( | const std::string & | n | ) |
tree_index_expression * tree_index_expression::append | ( | tree_argument_list * | lst = nullptr , |
char | t = '(' |
||
) |
Definition at line 81 of file pt-idx.cc.
References error(), tree_argument_list::get_arg_names(), and tree_argument_list::has_magic_tilde().
Referenced by tree_index_expression(), base_parser::make_index_expression(), and base_parser::make_indirect_ref().
tree_index_expression * tree_index_expression::append | ( | tree_expression * | df | ) |
|
inline |
Definition at line 82 of file pt-idx.h.
Referenced by tree_print_code::visit_index_expression(), and tree_walker::visit_index_expression().
|
inline |
Definition at line 86 of file pt-idx.h.
Referenced by tree_print_code::visit_index_expression(), and tree_walker::visit_index_expression().
|
virtual |
Implements tree_expression.
Definition at line 243 of file pt-idx.cc.
References tree_index_expression(), tree::column(), tree_expression::copy_base(), and tree_expression::dup().
|
inline |
Definition at line 88 of file pt-idx.h.
Referenced by tree_print_code::visit_index_expression(), and tree_walker::visit_index_expression().
|
inlinevirtual |
Implements tree_expression.
Definition at line 102 of file pt-idx.h.
References evaluate_n(), octave_value_list::length(), and octave_value().
|
virtual |
Implements tree_expression.
Definition at line 345 of file pt-idx.cc.
References tree_evaluator::append_index_list(), octave_function::call(), octave_value_list::clear(), tree_evaluator::clear_index_list(), tree_evaluator::convert_to_const_vector(), err_indexed_cs_list(), error(), tree_expression::evaluate(), tree_evaluator::final_index_error(), symbol_table::find_function(), octave_value::function_value(), tree_evaluator::get_interpreter(), get_struct_index(), interpreter::get_symbol_table(), tree_evaluator::index_list(), tree_evaluator::index_type(), tree_evaluator::indexed_object(), octave_value::is_classdef_meta(), octave_value::is_cs_list(), octave_value::is_function(), tree_expression::is_identifier(), octave_value::is_package(), octave_value::is_undefined(), tree_evaluator::is_variable(), is_word_list_cmd(), string_vector::isempty(), octave_value::isjava(), octave_value::isobject(), octave_value_list::length(), base_list< elt_type >::length(), tree_evaluator::lvalue_list(), tree_evaluator::make_value_list(), n, octave_value(), panic_if, panic_impossible, tree_evaluator::set_index_list(), tree_evaluator::set_indexed_object(), tree_evaluator::set_lvalue_list(), octave_value_list::stash_name_tags(), and octave_value::subsref().
Referenced by evaluate().
|
inline |
Definition at line 80 of file pt-idx.h.
Referenced by tree_print_code::visit_index_expression(), and tree_walker::visit_index_expression().
std::string tree_index_expression::get_struct_index | ( | tree_evaluator & | tw, |
std::list< string_vector >::const_iterator | p_arg_nm, | ||
std::list< tree_expression * >::const_iterator | p_dyn_field | ||
) | const |
Definition at line 145 of file pt-idx.cc.
References tree_expression::evaluate(), panic_impossible, and octave_value::xstring_value().
Referenced by evaluate_n(), and lvalue().
|
inlinevirtual |
Reimplemented from tree_expression.
|
inline |
Definition at line 92 of file pt-idx.h.
Referenced by evaluate_n().
|
virtual |
Reimplemented from tree_expression.
Definition at line 170 of file pt-idx.cc.
References tree_evaluator::append_index_list(), tree_evaluator::clear_index_list(), error(), get_struct_index(), tree_evaluator::index_list(), tree_evaluator::index_type(), tree_evaluator::indexed_object(), tree_expression::lvalue(), tree_evaluator::make_value_list(), n, panic_impossible, octave_lvalue::set_index(), tree_evaluator::set_index_list(), tree_evaluator::set_indexed_object(), and octave_lvalue::value().
|
inlinevirtual |
Reimplemented from tree_expression.
Definition at line 94 of file pt-idx.h.
References tree_expression::lvalue_ok().
|
virtual |
Reimplemented from tree_expression.
Definition at line 139 of file pt-idx.cc.
References tree_expression::name().
Referenced by tree_argument_list::variable_names().
|
inlinevirtual |
Reimplemented from tree_expression.
|
inline |
Definition at line 84 of file pt-idx.h.
Referenced by tree_print_code::visit_index_expression(), and tree_walker::visit_index_expression().