GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
tree_index_expression Class Reference

#include "pt-idx.h"

Inheritance diagram for tree_index_expression:
tree_expression tree

Public Member Functions

 tree_index_expression (tree_expression *e, const token &dot_tok, const token &open_paren, tree_expression *df, const token &close_paren)
 
 tree_index_expression (tree_expression *e, const token &dot_tok, const token &struct_elt_tok)
 
 tree_index_expression (tree_expression *e, const token &open_delim, tree_argument_list *lst, const token &close_delim, char t)
 
 ~tree_index_expression ()
 
void accept (tree_walker &tw)
 
tree_index_expressionappend (const token &dot_tok, const token &open_paren, tree_expression *df, const token &close_paren)
 
tree_index_expressionappend (const token &dot_tok, const token &struct_elt_tok)
 
tree_index_expressionappend (const token &open_delim, tree_argument_list *lst, const token &close_delim, char t='(')
 
std::list< tree_argument_list * > arg_lists ()
 
std::list< string_vectorarg_names ()
 
filepos beg_pos () const
 
tree_index_expressiondup (symbol_scope &scope) const
 
std::list< tree_expression * > dyn_fields ()
 
filepos end_pos () const
 
octave_value evaluate (tree_evaluator &tw, int nargout=1)
 
octave_value_list evaluate_n (tree_evaluator &tw, int nargout=1)
 
tree_expressionexpression ()
 
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
 
comment_list leading_comments () 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 ()
 
virtual ~tree_expression ()=default
 
virtual void copy_base (const tree_expression &e)
 
size_t delim_count () const
 
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_expressionmark_in_delims (const token &open_delim, const token &close_delim)
 
virtual std::string oper () const
 
virtual std::string original_text () const
 
char postfix_index () const
 
bool print_result () const
 
tree_expressionset_postfix_index (char type)
 
tree_expressionset_print_flag (bool print)
 
- Public Member Functions inherited from tree
 tree ()
 
virtual ~tree ()=default
 
const std::string bp_cond () const
 
virtual int column () const
 
virtual void delete_breakpoint ()
 
bool is_active_breakpoint (tree_evaluator &tw) const
 
bool is_breakpoint () const
 
virtual int line () const
 
bool meets_bp_condition (tree_evaluator &tw) const
 
virtual void set_breakpoint (const std::string &condition)
 
std::string str_print_code ()
 

Additional Inherited Members

- Protected Attributes inherited from tree_expression
tree_delimiter_list m_delims
 
bool m_for_cmd_expr
 
char m_postfix_index_type
 
bool m_print_flag
 

Detailed Description

Definition at line 51 of file pt-idx.h.

Constructor & Destructor Documentation

◆ tree_index_expression() [1/3]

tree_index_expression::tree_index_expression ( tree_expression e,
const token open_delim,
tree_argument_list lst,
const token close_delim,
char  t 
)

Definition at line 49 of file pt-idx.cc.

Referenced by tree_index_expression(), and tree_index_expression().

◆ tree_index_expression() [2/3]

tree_index_expression::tree_index_expression ( tree_expression e,
const token dot_tok,
const token struct_elt_tok 
)

Definition at line 55 of file pt-idx.cc.

References tree_index_expression(), and append().

◆ tree_index_expression() [3/3]

tree_index_expression::tree_index_expression ( tree_expression e,
const token dot_tok,
const token open_paren,
tree_expression df,
const token close_paren 
)

Definition at line 61 of file pt-idx.cc.

References tree_index_expression(), and append().

◆ ~tree_index_expression()

tree_index_expression::~tree_index_expression ( )

Definition at line 108 of file pt-idx.cc.

Member Function Documentation

◆ accept()

void tree_index_expression::accept ( tree_walker tw)
inlinevirtual

Implements tree.

Definition at line 112 of file pt-idx.h.

References tree_walker::visit_index_expression().

◆ append() [1/3]

tree_index_expression * tree_index_expression::append ( const token dot_tok,
const token open_paren,
tree_expression df,
const token close_paren 
)

Definition at line 96 of file pt-idx.cc.

References tree_expression::mark_in_delims().

◆ append() [2/3]

tree_index_expression * tree_index_expression::append ( const token dot_tok,
const token struct_elt_tok 
)

Definition at line 84 of file pt-idx.cc.

References token::text().

◆ append() [3/3]

◆ arg_lists()

std::list< tree_argument_list * > tree_index_expression::arg_lists ( )
inline

◆ arg_names()

std::list< string_vector > tree_index_expression::arg_names ( )
inline

◆ beg_pos()

filepos tree_index_expression::beg_pos ( ) const
inlinevirtual

Implements tree.

Definition at line 78 of file pt-idx.h.

References tree::beg_pos().

◆ dup()

tree_index_expression * tree_index_expression::dup ( symbol_scope scope) const
virtual

Implements tree_expression.

Definition at line 287 of file pt-idx.cc.

References tree_expression::copy_base(), and tree_expression::dup().

◆ dyn_fields()

std::list< tree_expression * > tree_index_expression::dyn_fields ( )
inline

◆ end_pos()

filepos tree_index_expression::end_pos ( ) const
virtual

◆ evaluate()

octave_value tree_index_expression::evaluate ( tree_evaluator tw,
int  nargout = 1 
)
inlinevirtual

Implements tree_expression.

Definition at line 103 of file pt-idx.h.

References evaluate_n(), and octave_value_list::length().

◆ evaluate_n()

◆ expression()

tree_expression * tree_index_expression::expression ( )
inline

◆ get_struct_index()

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 189 of file pt-idx.cc.

References error(), tree_expression::evaluate(), and octave_value::xstring_value().

Referenced by evaluate_n(), and lvalue().

◆ is_index_expression()

bool tree_index_expression::is_index_expression ( ) const
inlinevirtual

Reimplemented from tree_expression.

Definition at line 72 of file pt-idx.h.

◆ is_word_list_cmd()

bool tree_index_expression::is_word_list_cmd ( ) const
inline

Definition at line 93 of file pt-idx.h.

Referenced by evaluate_n().

◆ leading_comments()

comment_list tree_index_expression::leading_comments ( ) const
inlinevirtual

Reimplemented from tree.

Definition at line 76 of file pt-idx.h.

References tree::leading_comments().

◆ lvalue()

◆ lvalue_ok()

bool tree_index_expression::lvalue_ok ( ) const
inlinevirtual

Reimplemented from tree_expression.

Definition at line 95 of file pt-idx.h.

References tree_expression::lvalue_ok().

◆ mark_word_list_cmd()

void tree_index_expression::mark_word_list_cmd ( )
inline

Definition at line 91 of file pt-idx.h.

Referenced by base_parser::make_word_list_command().

◆ name()

std::string tree_index_expression::name ( ) const
virtual

Reimplemented from tree_expression.

Definition at line 131 of file pt-idx.cc.

References tree_expression::name().

Referenced by tree_argument_list::variable_names().

◆ rvalue_ok()

bool tree_index_expression::rvalue_ok ( ) const
inlinevirtual

Reimplemented from tree_expression.

Definition at line 97 of file pt-idx.h.

◆ type_tags()

std::string tree_index_expression::type_tags ( )
inline

The documentation for this class was generated from the following files: