#include "pt-const.h"
Public Member Functions | |
tree_constant (const octave_value &v, const std::string &ot, int l=-1, int c=-1) | |
tree_constant (const octave_value &v, int l=-1, int c=-1) | |
tree_constant (const tree_constant &)=delete | |
tree_constant (int l=-1, int c=-1) | |
~tree_constant (void)=default | |
void | accept (tree_walker &tw) |
const std::string | bp_cond (void) const |
void | column (int c) |
virtual int | column (void) const |
virtual void | copy_base (const tree_expression &e) |
virtual void | delete_breakpoint (void) |
tree_expression * | dup (symbol_scope &scope) const |
octave_value | evaluate (tree_evaluator &, int nargout=1) |
octave_value_list | evaluate_n (tree_evaluator &tw, int nargout=1) |
bool | is_active_breakpoint (tree_evaluator &tw) const |
virtual bool | is_assignment_expression (void) const |
virtual bool | is_binary_expression (void) const |
virtual bool | is_boolean_expression (void) const |
bool | is_breakpoint (void) const |
virtual bool | is_colon_expression (void) const |
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_matrix (void) const |
bool | is_postfix_indexed (void) const |
virtual bool | is_prefix_expression (void) const |
virtual bool | is_unary_expression (void) const |
virtual bool | iscell (void) const |
void | line (int l) |
virtual int | line (void) const |
virtual octave_lvalue | lvalue (tree_evaluator &) |
virtual bool | lvalue_ok (void) const |
void | mark_as_for_cmd_expr (void) |
tree_expression * | mark_in_parens (void) |
void | maybe_mutate (void) |
bool | meets_bp_condition (tree_evaluator &tw) const |
virtual std::string | name (void) const |
virtual std::string | oper (void) const |
tree_constant & | operator= (const tree_constant &)=delete |
std::string | original_text (void) const |
int | paren_count (void) const |
char | postfix_index (void) const |
void | print (std::ostream &os, bool pr_as_read_syntax=false, bool pr_orig_txt=true) |
void | print_raw (std::ostream &os, bool pr_as_read_syntax=false, bool pr_orig_txt=true) |
bool | print_result (void) const |
bool | rvalue_ok (void) const |
virtual void | set_breakpoint (const std::string &condition) |
void | set_location (int l, int c) |
tree_expression * | set_postfix_index (char type) |
tree_expression * | set_print_flag (bool print) |
void | stash_original_text (const std::string &s) |
std::string | str_print_code (void) |
octave_value | value (void) |
Protected Attributes | |
bool | m_for_cmd_expr |
int | m_num_parens |
char | m_postfix_index_type |
bool | m_print_flag |
Private Attributes | |
std::string * | m_bp_cond |
int | m_column_num |
int | m_line_num |
std::string | m_orig_text |
octave_value | m_value |
Definition at line 47 of file pt-const.h.
|
inline |
Definition at line 51 of file pt-const.h.
Referenced by dup().
|
inline |
Definition at line 55 of file pt-const.h.
|
inline |
Definition at line 59 of file pt-const.h.
|
delete |
|
default |
|
inlinevirtual |
Implements tree.
Definition at line 90 of file pt-const.h.
References tree_walker::visit_constant().
|
inlineinherited |
Definition at line 106 of file pt.h.
References tree::m_bp_cond.
Referenced by tree_statement::bp_cond(), and tree_breakpoint::take_action().
|
inlineinherited |
Definition at line 66 of file pt.h.
References tree::m_column_num.
|
inlinevirtualinherited |
Reimplemented in tree_statement.
Definition at line 62 of file pt.h.
References tree::m_column_num.
Referenced by tree_statement::column(), tree_binary_expression::dup(), tree_braindead_shortcircuit_binary_expression::dup(), tree_boolean_expression::dup(), tree_cell::dup(), tree_superclass_ref::dup(), tree_metaclass_query::dup(), tree_colon_expression::dup(), dup(), tree_fcn_handle::dup(), tree_anon_fcn_handle::dup(), tree_identifier::dup(), tree_index_expression::dup(), tree_matrix::dup(), tree_prefix_expression::dup(), tree_postfix_expression::dup(), anon_fcn_validator::error(), tree_identifier::eval_undefined_error(), base_parser::finish_if_command(), base_parser::finish_switch_command(), tree_evaluator::is_logically_true(), base_parser::make_colon_expression(), base_parser::make_fcn_name(), base_parser::make_index_expression(), base_parser::make_indirect_ref(), base_parser::maybe_convert_to_braindead_shortcircuit(), base_parser::maybe_warn_assign_as_truth_value(), base_parser::maybe_warn_variable_switch_label(), parse_tree_validator::visit_index_expression(), tree_evaluator::visit_simple_for_command(), and tree_evaluator::visit_switch_command().
|
inlinevirtualinherited |
Definition at line 132 of file pt-exp.h.
References tree_expression::m_num_parens, tree_expression::m_postfix_index_type, and tree_expression::m_print_flag.
Referenced by tree_array_list::copy_base(), tree_simple_assignment::dup(), tree_binary_expression::dup(), tree_braindead_shortcircuit_binary_expression::dup(), tree_boolean_expression::dup(), tree_superclass_ref::dup(), tree_metaclass_query::dup(), tree_colon_expression::dup(), dup(), tree_fcn_handle::dup(), tree_anon_fcn_handle::dup(), tree_identifier::dup(), tree_index_expression::dup(), tree_prefix_expression::dup(), and tree_postfix_expression::dup().
|
inlinevirtualinherited |
Reimplemented in tree_statement.
Definition at line 82 of file pt.h.
References tree::m_bp_cond.
Referenced by tree_statement::delete_breakpoint(), and tree_breakpoint::take_action().
|
virtual |
Implements tree_expression.
Definition at line 64 of file pt-const.cc.
References tree_constant(), tree::column(), tree_expression::copy_base(), tree::line(), m_orig_text, and m_value.
|
inlinevirtual |
Implements tree_expression.
Definition at line 102 of file pt-const.h.
References error(), and value().
Referenced by evaluate_n().
|
inlinevirtual |
Implements tree_expression.
Definition at line 110 of file pt-const.h.
References evaluate(), and ovl().
|
inlineinherited |
Definition at line 99 of file pt.h.
References tree::m_bp_cond, and tree::meets_bp_condition().
Referenced by tree_statement::is_active_breakpoint(), tree_evaluator::visit_break_command(), tree_evaluator::visit_complex_for_command(), tree_evaluator::visit_continue_command(), tree_evaluator::visit_decl_command(), tree_evaluator::visit_do_until_command(), tree_evaluator::visit_no_op_command(), tree_evaluator::visit_return_command(), tree_evaluator::visit_simple_for_command(), tree_evaluator::visit_statement(), tree_evaluator::visit_switch_command(), and tree_evaluator::visit_while_command().
|
inlinevirtualinherited |
Reimplemented in tree_multi_assignment, and tree_simple_assignment.
Definition at line 74 of file pt-exp.h.
Referenced by bp_table::condition_valid(), tree_evaluator::eval_string(), base_parser::maybe_warn_assign_as_truth_value(), and tree_evaluator::visit_statement().
|
inlinevirtualinherited |
Reimplemented in tree_binary_expression.
Definition at line 80 of file pt-exp.h.
Referenced by base_parser::maybe_convert_to_braindead_shortcircuit().
|
inlinevirtualinherited |
Reimplemented in tree_boolean_expression.
|
inlineinherited |
Definition at line 94 of file pt.h.
References tree::m_bp_cond.
Referenced by tree_statement::is_breakpoint(), and tree_breakpoint::take_action().
|
inlinevirtualinherited |
Reimplemented in tree_colon_expression.
|
inlinevirtual |
Reimplemented from tree_expression.
Definition at line 74 of file pt-const.h.
|
inlineinherited |
Definition at line 112 of file pt-exp.h.
References tree_expression::m_for_cmd_expr.
Referenced by tree_colon_expression::evaluate().
|
inlinevirtualinherited |
Reimplemented in tree_identifier.
Definition at line 70 of file pt-exp.h.
Referenced by tree_argument_list::append(), compute_attribute_value(), tree_evaluator::eval_string(), tree_index_expression::evaluate_n(), tree_evaluator::is_defined(), tree_argument_list::is_valid_lvalue_list(), tree_evaluator::is_variable(), base_parser::make_assign_op(), base_parser::make_try_command(), tree_argument_list::variable_names(), and tree_evaluator::visit_statement().
|
inlinevirtualinherited |
Reimplemented in tree_index_expression.
Definition at line 72 of file pt-exp.h.
Referenced by tree_argument_list::is_valid_lvalue_list(), base_parser::make_assign_op(), base_parser::make_index_expression(), base_parser::make_indirect_ref(), and tree_argument_list::variable_names().
|
inlinevirtualinherited |
Reimplemented in tree_matrix.
Definition at line 66 of file pt-exp.h.
Referenced by base_parser::validate_array_list(), and base_parser::validate_matrix_for_assignment().
|
inlineinherited |
Definition at line 94 of file pt-exp.h.
References tree_expression::m_postfix_index_type.
Referenced by tree_superclass_ref::evaluate_n(), tree_identifier::evaluate_n(), base_parser::make_index_expression(), and base_parser::make_indirect_ref().
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Reimplemented in tree_unary_expression.
Definition at line 78 of file pt-exp.h.
Referenced by strip_trans_herm().
|
inlinevirtualinherited |
|
inlineinherited |
Definition at line 64 of file pt.h.
References tree::m_line_num.
|
inlinevirtualinherited |
Reimplemented in tree_statement.
Definition at line 60 of file pt.h.
References tree::m_line_num.
Referenced by tree_binary_expression::dup(), tree_braindead_shortcircuit_binary_expression::dup(), tree_boolean_expression::dup(), tree_cell::dup(), tree_superclass_ref::dup(), tree_metaclass_query::dup(), tree_colon_expression::dup(), dup(), tree_fcn_handle::dup(), tree_anon_fcn_handle::dup(), tree_identifier::dup(), tree_index_expression::dup(), tree_matrix::dup(), tree_prefix_expression::dup(), tree_postfix_expression::dup(), anon_fcn_validator::error(), tree_identifier::eval_undefined_error(), base_parser::finish_if_command(), base_parser::finish_switch_command(), tree_evaluator::is_logically_true(), tree_statement::line(), base_parser::make_colon_expression(), base_parser::make_fcn_name(), base_parser::make_index_expression(), base_parser::make_indirect_ref(), base_parser::maybe_convert_to_braindead_shortcircuit(), base_parser::maybe_warn_assign_as_truth_value(), base_parser::maybe_warn_variable_switch_label(), tree_breakpoint::take_action(), tree_checker::visit_argument_list(), tree_breakpoint::visit_break_command(), tree_evaluator::visit_break_command(), tree_breakpoint::visit_complex_for_command(), tree_checker::visit_complex_for_command(), tree_evaluator::visit_complex_for_command(), tree_breakpoint::visit_continue_command(), tree_evaluator::visit_continue_command(), tree_breakpoint::visit_decl_command(), tree_evaluator::visit_decl_command(), tree_breakpoint::visit_do_until_command(), tree_evaluator::visit_do_until_command(), tree_evaluator::visit_if_command(), parse_tree_validator::visit_index_expression(), tree_breakpoint::visit_no_op_command(), tree_evaluator::visit_no_op_command(), tree_breakpoint::visit_return_command(), tree_evaluator::visit_return_command(), tree_checker::visit_simple_assignment(), tree_breakpoint::visit_simple_for_command(), tree_checker::visit_simple_for_command(), tree_evaluator::visit_simple_for_command(), tree_breakpoint::visit_switch_command(), tree_evaluator::visit_switch_command(), tree_checker::visit_try_catch_command(), tree_evaluator::visit_try_catch_command(), tree_evaluator::visit_unwind_protect_command(), tree_breakpoint::visit_while_command(), and tree_evaluator::visit_while_command().
|
virtualinherited |
Reimplemented in tree_index_expression, tree_black_hole, and tree_identifier.
Definition at line 43 of file pt-exp.cc.
References error().
Referenced by tree_prefix_expression::evaluate(), tree_postfix_expression::evaluate(), tree_simple_assignment::evaluate(), tree_index_expression::lvalue(), tree_evaluator::visit_complex_for_command(), and tree_evaluator::visit_simple_for_command().
|
inlinevirtualinherited |
Reimplemented in tree_index_expression, and tree_identifier.
Definition at line 86 of file pt-exp.h.
Referenced by tree_index_expression::lvalue_ok(), tree_checker::visit_argument_list(), tree_checker::visit_simple_assignment(), and tree_checker::visit_simple_for_command().
|
inlineinherited |
Definition at line 110 of file pt-exp.h.
References tree_expression::m_for_cmd_expr.
Referenced by base_parser::make_for_command().
|
inlineinherited |
Definition at line 114 of file pt-exp.h.
References tree_expression::m_num_parens.
|
inline |
Definition at line 76 of file pt-const.h.
References m_value, and octave_value::maybe_mutate().
|
inherited |
Definition at line 62 of file pt.cc.
References tree_evaluator::eval_string(), tree_evaluator::get_interpreter(), interpreter_try(), tree::m_bp_cond, interpreter::recover_from_exception(), and warning().
Referenced by tree::is_active_breakpoint().
|
inlinevirtualinherited |
Reimplemented in tree_index_expression, tree_black_hole, tree_identifier, and tree_fcn_handle.
Definition at line 106 of file pt-exp.h.
Referenced by compute_attribute_value(), tree_simple_assignment::evaluate(), tree_multi_assignment::evaluate_n(), tree_evaluator::final_index_error(), base_parser::make_assign_op(), base_parser::make_for_command(), and tree_index_expression::name().
|
inlinevirtualinherited |
Reimplemented in tree_unary_expression, tree_boolean_expression, tree_binary_expression, tree_multi_assignment, and tree_simple_assignment.
Definition at line 104 of file pt-exp.h.
Referenced by anon_fcn_validator::error().
|
delete |
|
inlinevirtual |
Reimplemented from tree_expression.
Definition at line 100 of file pt-const.h.
References m_orig_text.
|
inlineinherited |
Definition at line 92 of file pt-exp.h.
References tree_expression::m_num_parens.
Referenced by base_parser::maybe_warn_assign_as_truth_value(), tree_print_code::print_parens(), and tree_print_code::visit_index_expression().
|
inlineinherited |
Definition at line 97 of file pt-exp.h.
References tree_expression::m_postfix_index_type.
Referenced by tree_identifier::evaluate_n().
void tree_constant::print | ( | std::ostream & | os, |
bool | pr_as_read_syntax = false , |
||
bool | pr_orig_txt = true |
||
) |
Definition at line 44 of file pt-const.cc.
References m_orig_text, m_value, and octave_value::print().
void tree_constant::print_raw | ( | std::ostream & | os, |
bool | pr_as_read_syntax = false , |
||
bool | pr_orig_txt = true |
||
) |
Definition at line 54 of file pt-const.cc.
References m_orig_text, m_value, and octave_value::print_raw().
Referenced by tree_print_code::visit_constant().
|
inlineinherited |
Definition at line 102 of file pt-exp.h.
References tree_expression::m_print_flag.
Referenced by tree_evaluator::eval_string(), tree_simple_assignment::evaluate(), tree_multi_assignment::evaluate_n(), tree_identifier::evaluate_n(), tree_statement::print_result(), and tree_evaluator::visit_statement().
|
inlinevirtual |
Reimplemented from tree_expression.
Definition at line 84 of file pt-const.h.
|
inlinevirtualinherited |
Reimplemented in tree_statement.
Definition at line 74 of file pt.h.
References tree::m_bp_cond.
Referenced by tree_statement::set_breakpoint(), and tree_breakpoint::take_action().
|
inlineinherited |
Definition at line 68 of file pt.h.
References tree::m_column_num, and tree::m_line_num.
Referenced by base_parser::finish_array_list(), and tree_statement::set_location().
|
inlineinherited |
Definition at line 120 of file pt-exp.h.
References tree_expression::m_postfix_index_type.
Referenced by base_parser::make_index_expression(), and base_parser::make_indirect_ref().
|
inlineinherited |
Definition at line 126 of file pt-exp.h.
References tree_expression::m_print_flag.
Referenced by tree_evaluator::eval_string(), base_parser::make_anon_fcn_handle(), and tree_statement::set_print_flag().
|
inline |
Definition at line 98 of file pt-const.h.
References m_orig_text.
Referenced by base_parser::finish_array_list(), base_parser::make_colon_expression(), and base_parser::make_constant().
|
inherited |
Definition at line 46 of file pt.cc.
References tree::accept().
Referenced by tree_argument_list::get_arg_names().
|
inline |
|
privateinherited |
Definition at line 123 of file pt.h.
Referenced by tree::bp_cond(), tree::delete_breakpoint(), tree::is_active_breakpoint(), tree::is_breakpoint(), tree::meets_bp_condition(), and tree::set_breakpoint().
|
privateinherited |
Definition at line 120 of file pt.h.
Referenced by tree::column(), and tree::set_location().
|
protectedinherited |
Definition at line 161 of file pt-exp.h.
Referenced by tree_expression::is_for_cmd_expr(), and tree_expression::mark_as_for_cmd_expr().
|
privateinherited |
Definition at line 119 of file pt.h.
Referenced by tree::line(), and tree::set_location().
|
protectedinherited |
Definition at line 152 of file pt-exp.h.
Referenced by tree_expression::copy_base(), tree_expression::mark_in_parens(), and tree_expression::paren_count().
|
private |
Definition at line 121 of file pt-const.h.
Referenced by dup(), original_text(), print(), print_raw(), and stash_original_text().
|
protectedinherited |
Definition at line 157 of file pt-exp.h.
Referenced by tree_expression::copy_base(), tree_expression::is_postfix_indexed(), tree_expression::postfix_index(), and tree_expression::set_postfix_index().
|
protectedinherited |
Definition at line 164 of file pt-exp.h.
Referenced by tree_expression::copy_base(), tree_expression::print_result(), and tree_expression::set_print_flag().
|
private |
Definition at line 118 of file pt-const.h.
Referenced by dup(), maybe_mutate(), print(), print_raw(), and value().