GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
tree_binary_expression Class Reference

#include "pt-binop.h"

Inheritance diagram for tree_binary_expression:
Inheritance graph
[legend]
Collaboration diagram for tree_binary_expression:
Collaboration graph
[legend]

Public Member Functions

 tree_binary_expression (int l=-1, int c=-1, octave_value::binary_op t=octave_value::unknown_binary_op)
 
 tree_binary_expression (tree_expression *a, tree_expression *b, int l=-1, int c=-1, octave_value::binary_op t=octave_value::unknown_binary_op)
 
 ~tree_binary_expression (void)
 
void accept (tree_walker &tw)
 
const std::string bp_cond (void) const
 
virtual int column (void) const
 
void column (int c)
 
virtual void copy_base (const tree_expression &e)
 
virtual void delete_breakpoint (void)
 
tree_expressiondup (symbol_table::scope_id scope, symbol_table::context_id context) const
 
bool has_magic_end (void) const
 
virtual bool is_assignment_expression (void) const
 
bool is_binary_expression (void) const
 
virtual bool is_boolean_expression (void) const
 
bool is_breakpoint (bool check_active=false) const
 
virtual bool is_cell (void) const
 
virtual bool is_constant (void) const
 
bool is_for_cmd_expr (void) const
 
virtual bool is_identifier (void) const
 
virtual bool is_index_expression (void) const
 
virtual bool is_logically_true (const char *)
 
virtual bool is_matrix (void) const
 
bool is_postfix_indexed (void) const
 
virtual bool is_prefix_expression (void) const
 
virtual bool is_unary_expression (void) const
 
tree_expressionlhs (void)
 
virtual int line (void) const
 
void line (int l)
 
virtual octave_lvalue lvalue (void)
 
virtual bool lvalue_ok (void) const
 
void mark_as_for_cmd_expr (void)
 
void mark_braindead_shortcircuit (void)
 
tree_expressionmark_in_parens (void)
 
bool meets_bp_condition (void) const
 
virtual std::string name (void) const
 
octave_value::binary_op op_type (void) const
 
std::string oper (void) const
 
virtual std::string original_text (void) const
 
int paren_count (void) const
 
char postfix_index (void) const
 
bool print_result (void) const
 
std::string profiler_name (void) const
 
tree_expressionrhs (void)
 
virtual octave_value_list rvalue (int nargout, const std::list< octave_lvalue > *lvalue_list)
 
octave_value_list rvalue (int nargout)
 
octave_value rvalue1 (int nargout=1)
 
bool rvalue_ok (void) const
 
virtual void set_breakpoint (const std::string &condition)
 
void set_location (int l, int c)
 
tree_expressionset_postfix_index (char type)
 
tree_expressionset_print_flag (bool print)
 
std::string str_print_code (void)
 

Protected Attributes

bool for_cmd_expr
 
int num_parens
 
tree_expressionop_lhs
 
tree_expressionop_rhs
 
char postfix_index_type
 
bool print_flag
 

Private Member Functions

 tree_binary_expression (const tree_binary_expression &)
 
void matlab_style_short_circuit_warning (const char *op)
 
tree_binary_expressionoperator= (const tree_binary_expression &)
 

Private Attributes

bool braindead_shortcircuit_warning_issued
 
bool eligible_for_braindead_shortcircuit
 
octave_value::binary_op etype
 

Detailed Description

Definition at line 42 of file pt-binop.h.

Constructor & Destructor Documentation

tree_binary_expression::tree_binary_expression ( int  l = -1,
int  c = -1,
octave_value::binary_op  t = octave_value::unknown_binary_op 
)
inline

Definition at line 47 of file pt-binop.h.

Referenced by dup().

tree_binary_expression::tree_binary_expression ( tree_expression a,
tree_expression b,
int  l = -1,
int  c = -1,
octave_value::binary_op  t = octave_value::unknown_binary_op 
)
inline

Definition at line 54 of file pt-binop.h.

tree_binary_expression::~tree_binary_expression ( void  )
inline

Definition at line 62 of file pt-binop.h.

tree_binary_expression::tree_binary_expression ( const tree_binary_expression )
private

Member Function Documentation

void tree_binary_expression::accept ( tree_walker tw)
virtual

Implements tree.

Definition at line 163 of file pt-binop.cc.

References tree_walker::visit_binary_expression().

const std::string tree::bp_cond ( void  ) const
inlineinherited

Definition at line 80 of file pt.h.

References string.

Referenced by tree_statement::bp_cond(), and tree_breakpoint::take_action().

virtual int tree::column ( void  ) const
inlinevirtualinherited

Reimplemented in tree_colon_expression, and tree_statement.

Definition at line 51 of file pt.h.

Referenced by tree_statement::column(), tree_colon_expression::column(), tree_break_command::dup(), tree_cell::dup(), tree_funcall::dup(), tree_try_catch_command::dup(), tree_continue_command::dup(), tree_fcn_handle::dup(), tree_no_op_command::dup(), tree_constant::dup(), tree_while_command::dup(), tree_index_expression::dup(), dup(), tree_return_command::dup(), tree_prefix_expression::dup(), tree_function_def::dup(), tree_identifier::dup(), tree_unwind_protect_command::dup(), tree_anon_fcn_handle::dup(), tree_if_command::dup(), tree_postfix_expression::dup(), tree_do_until_command::dup(), tree_boolean_expression::dup(), tree_global_command::dup(), tree_simple_for_command::dup(), tree_persistent_command::dup(), tree_switch_command::dup(), tree_complex_for_command::dup(), tree_identifier::eval_undefined_error(), octave::base_parser::finish_array_list(), octave::base_parser::finish_colon_expression(), octave::base_parser::finish_if_command(), octave::base_parser::finish_switch_command(), octave::base_parser::make_index_expression(), octave::base_parser::make_indirect_ref(), octave::base_parser::maybe_warn_assign_as_truth_value(), octave::base_parser::maybe_warn_variable_switch_label(), tree_anon_fcn_handle::rvalue1(), octave::tree_evaluator::visit_do_until_command(), octave::tree_evaluator::visit_if_command_list(), octave::tree_evaluator::visit_simple_for_command(), and octave::tree_evaluator::visit_switch_command().

void tree::column ( int  c)
inlineinherited

Definition at line 55 of file pt.h.

References c.

virtual void tree_expression::copy_base ( const tree_expression e)
inlinevirtualinherited
virtual void tree::delete_breakpoint ( void  )
inlinevirtualinherited

Reimplemented in tree_statement.

Definition at line 71 of file pt.h.

Referenced by tree_statement::delete_breakpoint(), and tree_breakpoint::take_action().

tree_expression * tree_binary_expression::dup ( symbol_table::scope_id  scope,
symbol_table::context_id  context 
) const
virtual
bool tree_binary_expression::has_magic_end ( void  ) const
inlinevirtual

Implements tree_expression.

Definition at line 79 of file pt-binop.h.

virtual bool tree_expression::is_assignment_expression ( void  ) const
inlinevirtualinherited
bool tree_binary_expression::is_binary_expression ( void  ) const
inlinevirtual

Reimplemented from tree_expression.

Definition at line 85 of file pt-binop.h.

virtual bool tree_expression::is_boolean_expression ( void  ) const
inlinevirtualinherited

Reimplemented in tree_boolean_expression.

Definition at line 73 of file pt-exp.h.

bool tree::is_breakpoint ( bool  check_active = false) const
inlineinherited
virtual bool tree_expression::is_cell ( void  ) const
inlinevirtualinherited

Reimplemented in tree_cell.

Definition at line 59 of file pt-exp.h.

virtual bool tree_expression::is_constant ( void  ) const
inlinevirtualinherited
bool tree_expression::is_for_cmd_expr ( void  ) const
inlineinherited

Definition at line 111 of file pt-exp.h.

Referenced by tree_colon_expression::rvalue1().

virtual bool tree_expression::is_identifier ( void  ) const
inlinevirtualinherited
virtual bool tree_expression::is_index_expression ( void  ) const
inlinevirtualinherited
bool tree_expression::is_logically_true ( const char *  warn_for)
virtualinherited
virtual bool tree_expression::is_matrix ( void  ) const
inlinevirtualinherited
bool tree_expression::is_postfix_indexed ( void  ) const
inlineinherited
virtual bool tree_expression::is_prefix_expression ( void  ) const
inlinevirtualinherited

Definition at line 67 of file pt-exp.h.

virtual bool tree_expression::is_unary_expression ( void  ) const
inlinevirtualinherited

Reimplemented in tree_unary_expression.

Definition at line 69 of file pt-exp.h.

Referenced by strip_not(), and strip_trans_herm().

tree_expression* tree_binary_expression::lhs ( void  )
inline
virtual int tree::line ( void  ) const
inlinevirtualinherited

Reimplemented in tree_colon_expression, and tree_statement.

Definition at line 49 of file pt.h.

Referenced by tree_breakpoint::do_decl_command(), tree_try_catch_command::dup(), tree_while_command::dup(), dup(), tree_prefix_expression::dup(), tree_unwind_protect_command::dup(), tree_anon_fcn_handle::dup(), tree_if_command::dup(), tree_postfix_expression::dup(), tree_do_until_command::dup(), tree_boolean_expression::dup(), tree_global_command::dup(), tree_simple_for_command::dup(), tree_persistent_command::dup(), tree_switch_command::dup(), tree_complex_for_command::dup(), tree_identifier::eval_undefined_error(), octave::base_parser::finish_array_list(), octave::base_parser::finish_colon_expression(), octave::base_parser::finish_if_command(), octave::base_parser::finish_switch_command(), tree_statement::line(), tree_colon_expression::line(), octave::base_parser::make_index_expression(), octave::base_parser::make_indirect_ref(), octave::base_parser::maybe_warn_assign_as_truth_value(), octave::base_parser::maybe_warn_variable_switch_label(), tree_breakpoint::take_action(), tree_checker::visit_argument_list(), tree_breakpoint::visit_break_command(), tree_checker::visit_complex_for_command(), tree_breakpoint::visit_complex_for_command(), tree_breakpoint::visit_continue_command(), tree_breakpoint::visit_do_until_command(), octave::tree_evaluator::visit_do_until_command(), tree_breakpoint::visit_if_command_list(), octave::tree_evaluator::visit_if_command_list(), tree_breakpoint::visit_no_op_command(), tree_breakpoint::visit_return_command(), tree_checker::visit_simple_assignment(), tree_checker::visit_simple_for_command(), tree_breakpoint::visit_simple_for_command(), octave::tree_evaluator::visit_simple_for_command(), tree_breakpoint::visit_switch_case_list(), tree_breakpoint::visit_switch_command(), octave::tree_evaluator::visit_switch_command(), tree_checker::visit_try_catch_command(), and tree_breakpoint::visit_while_command().

void tree::line ( int  l)
inlineinherited

Definition at line 53 of file pt.h.

octave_lvalue tree_expression::lvalue ( void  )
virtualinherited
virtual bool tree_expression::lvalue_ok ( void  ) const
inlinevirtualinherited
void tree_expression::mark_as_for_cmd_expr ( void  )
inlineinherited

Definition at line 109 of file pt-exp.h.

Referenced by octave::base_parser::make_for_command().

void tree_binary_expression::mark_braindead_shortcircuit ( void  )
inlinevirtual

Reimplemented from tree_expression.

Definition at line 68 of file pt-binop.h.

References octave_value::op_el_and, and octave_value::op_el_or.

tree_expression* tree_expression::mark_in_parens ( void  )
inlineinherited

Definition at line 113 of file pt-exp.h.

void tree_binary_expression::matlab_style_short_circuit_warning ( const char *  op)
private

Definition at line 58 of file pt-binop.cc.

References braindead_shortcircuit_warning_issued, and warning_with_id().

Referenced by rvalue1().

bool tree::meets_bp_condition ( void  ) const
inherited
virtual std::string tree_expression::name ( void  ) const
inlinevirtualinherited
octave_value::binary_op tree_binary_expression::op_type ( void  ) const
inline

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

Referenced by jit_convert::visit_binary_expression().

std::string tree_binary_expression::oper ( void  ) const
virtual
tree_binary_expression& tree_binary_expression::operator= ( const tree_binary_expression )
private
std::string tree_expression::original_text ( void  ) const
virtualinherited

Reimplemented in tree_constant.

Definition at line 78 of file pt-exp.cc.

Referenced by tree_funcall::print_raw().

int tree_expression::paren_count ( void  ) const
inlineinherited
char tree_expression::postfix_index ( void  ) const
inlineinherited

Definition at line 94 of file pt-exp.h.

Referenced by tree_funcall::rvalue(), and tree_identifier::rvalue().

bool tree_expression::print_result ( void  ) const
inlineinherited
std::string tree_binary_expression::profiler_name ( void  ) const
inline

Definition at line 105 of file pt-binop.h.

tree_expression* tree_binary_expression::rhs ( void  )
inline
octave_value_list tree_expression::rvalue ( int  nargout,
const std::list< octave_lvalue > *  lvalue_list 
)
virtualinherited

Reimplemented in tree_identifier, and tree_index_expression.

Definition at line 66 of file pt-exp.cc.

References tree_expression::rvalue().

octave_value_list tree_binary_expression::rvalue ( int  nargout)
virtual

Reimplemented from tree_expression.

Reimplemented in tree_boolean_expression, and tree_compound_binary_expression.

Definition at line 44 of file pt-binop.cc.

References error(), oper(), retval, and rvalue1().

octave_value tree_binary_expression::rvalue1 ( int  nargout = 1)
virtual
bool tree_binary_expression::rvalue_ok ( void  ) const
inlinevirtual

Reimplemented from tree_expression.

Reimplemented in tree_boolean_expression, and tree_compound_binary_expression.

Definition at line 87 of file pt-binop.h.

virtual void tree::set_breakpoint ( const std::string condition)
inlinevirtualinherited

Reimplemented in tree_statement.

Definition at line 63 of file pt.h.

References string.

Referenced by tree_statement::set_breakpoint(), and tree_breakpoint::take_action().

void tree::set_location ( int  l,
int  c 
)
inlineinherited

Definition at line 57 of file pt.h.

References c.

Referenced by tree_statement::set_location().

tree_expression* tree_expression::set_postfix_index ( char  type)
inlineinherited

Definition at line 119 of file pt-exp.h.

References type.

Referenced by octave::base_parser::make_index_expression(), and octave::base_parser::make_indirect_ref().

tree_expression* tree_expression::set_print_flag ( bool  print)
inlineinherited

Definition at line 125 of file pt-exp.h.

Referenced by tree_statement::set_print_flag().

std::string tree::str_print_code ( void  )
inherited

Definition at line 40 of file pt.cc.

References tree::accept(), retval, and string.

Referenced by jit_info::compile().

Member Data Documentation

bool tree_binary_expression::braindead_shortcircuit_warning_issued
private

Definition at line 124 of file pt-binop.h.

Referenced by matlab_style_short_circuit_warning().

bool tree_binary_expression::eligible_for_braindead_shortcircuit
private

Definition at line 120 of file pt-binop.h.

Referenced by rvalue1().

octave_value::binary_op tree_binary_expression::etype
private

Definition at line 116 of file pt-binop.h.

Referenced by dup(), oper(), and rvalue1().

bool tree_expression::for_cmd_expr
protectedinherited

Definition at line 155 of file pt-exp.h.

int tree_expression::num_parens
protectedinherited

Definition at line 146 of file pt-exp.h.

Referenced by tree_expression::copy_base().

tree_expression* tree_binary_expression::op_lhs
protected
tree_expression* tree_binary_expression::op_rhs
protected
char tree_expression::postfix_index_type
protectedinherited

Definition at line 151 of file pt-exp.h.

Referenced by tree_expression::copy_base().

bool tree_expression::print_flag
protectedinherited

Definition at line 158 of file pt-exp.h.

Referenced by tree_expression::copy_base().


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