GNU Octave  3.8.0
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 Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
tree_evaluator Class Reference

#include "pt-eval.h"

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

Public Types

typedef void(* decl_elt_init_fcn )(tree_decl_elt &)
enum  stmt_list_type { function, script, other }

Public Member Functions

 tree_evaluator (void)
 ~tree_evaluator (void)
void do_unwind_protect_cleanup_code (tree_statement_list *list)
void visit_anon_fcn_handle (tree_anon_fcn_handle &)
void visit_argument_list (tree_argument_list &)
void visit_binary_expression (tree_binary_expression &)
void visit_break_command (tree_break_command &)
void visit_cell (tree_cell &)
void visit_colon_expression (tree_colon_expression &)
void visit_complex_for_command (tree_complex_for_command &)
void visit_constant (tree_constant &)
void visit_continue_command (tree_continue_command &)
void visit_decl_elt (tree_decl_elt &)
void visit_decl_init_list (tree_decl_init_list &)
void visit_do_until_command (tree_do_until_command &)
void visit_fcn_handle (tree_fcn_handle &)
void visit_function_def (tree_function_def &)
void visit_global_command (tree_global_command &)
void visit_identifier (tree_identifier &)
void visit_if_clause (tree_if_clause &)
void visit_if_command (tree_if_command &)
void visit_if_command_list (tree_if_command_list &)
void visit_index_expression (tree_index_expression &)
void visit_matrix (tree_matrix &)
void visit_multi_assignment (tree_multi_assignment &)
void visit_no_op_command (tree_no_op_command &)
void visit_octave_user_function (octave_user_function &)
void visit_octave_user_function_header (octave_user_function &)
void visit_octave_user_function_trailer (octave_user_function &)
void visit_octave_user_script (octave_user_script &)
void visit_parameter_list (tree_parameter_list &)
void visit_persistent_command (tree_persistent_command &)
void visit_postfix_expression (tree_postfix_expression &)
void visit_prefix_expression (tree_prefix_expression &)
void visit_return_command (tree_return_command &)
void visit_return_list (tree_return_list &)
void visit_simple_assignment (tree_simple_assignment &)
void visit_simple_for_command (tree_simple_for_command &)
void visit_statement (tree_statement &)
void visit_statement_list (tree_statement_list &)
void visit_switch_case (tree_switch_case &)
void visit_switch_case_list (tree_switch_case_list &)
void visit_switch_command (tree_switch_command &)
void visit_try_catch_command (tree_try_catch_command &)
void visit_unwind_protect_command (tree_unwind_protect_command &)
void visit_while_command (tree_while_command &)

Static Public Member Functions

static void reset_debug_state (void)
static bool statement_printing_enabled (void)

Static Public Attributes

static size_t current_frame = 0
static int dbstep_flag = 0
static bool debug_mode = false
static bool in_loop_command = false
static stmt_list_type statement_context = tree_evaluator::other

Private Member Functions

 tree_evaluator (const tree_evaluator &)
void do_breakpoint (tree_statement &stmt) const
void do_breakpoint (bool is_breakpoint, bool is_end_of_fcn_or_script=false) const
void do_decl_init_list (decl_elt_init_fcn fcn, tree_decl_init_list *init_list)
virtual octave_value do_keyboard (const octave_value_list &args=octave_value_list()) const
tree_evaluatoroperator= (const tree_evaluator &)

Detailed Description

Definition at line 37 of file pt-eval.h.

Member Typedef Documentation

typedef void(* tree_evaluator::decl_elt_init_fcn)(tree_decl_elt &)

Definition at line 43 of file pt-eval.h.

Member Enumeration Documentation

Enumerator:
function 
script 
other 

Definition at line 153 of file pt-eval.h.

Constructor & Destructor Documentation

tree_evaluator::tree_evaluator ( void  )
inline

Definition at line 45 of file pt-eval.h.

tree_evaluator::~tree_evaluator ( void  )
inline

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

tree_evaluator::tree_evaluator ( const tree_evaluator )
private

Member Function Documentation

void tree_evaluator::do_breakpoint ( tree_statement stmt) const
private
void tree_evaluator::do_breakpoint ( bool  is_breakpoint,
bool  is_end_of_fcn_or_script = false 
) const
private
void tree_evaluator::do_decl_init_list ( decl_elt_init_fcn  fcn,
tree_decl_init_list init_list 
)
private
octave_value tree_evaluator::do_keyboard ( const octave_value_list args = octave_value_list ()) const
privatevirtual

Definition at line 1248 of file pt-eval.cc.

Referenced by do_breakpoint().

void tree_evaluator::do_unwind_protect_cleanup_code ( tree_statement_list list)
tree_evaluator& tree_evaluator::operator= ( const tree_evaluator )
private
void tree_evaluator::reset_debug_state ( void  )
static
bool tree_evaluator::statement_printing_enabled ( void  )
static
void tree_evaluator::visit_anon_fcn_handle ( tree_anon_fcn_handle )
virtual

Implements tree_walker.

Definition at line 76 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_argument_list ( tree_argument_list )
virtual

Implements tree_walker.

Definition at line 82 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_binary_expression ( tree_binary_expression )
virtual

Implements tree_walker.

Definition at line 88 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_break_command ( tree_break_command cmd)
virtual
void tree_evaluator::visit_cell ( tree_cell )
virtual

Implements tree_walker.

Definition at line 609 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_colon_expression ( tree_colon_expression )
virtual

Implements tree_walker.

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

References panic_impossible.

void tree_evaluator::visit_complex_for_command ( tree_complex_for_command cmd)
virtual
void tree_evaluator::visit_constant ( tree_constant )
virtual

Implements tree_walker.

Definition at line 628 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_continue_command ( tree_continue_command cmd)
virtual
void tree_evaluator::visit_decl_elt ( tree_decl_elt )
virtual

Implements tree_walker.

Definition at line 237 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_decl_init_list ( tree_decl_init_list )
virtual

Implements tree_walker.

Definition at line 267 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_do_until_command ( tree_do_until_command cmd)
virtual
void tree_evaluator::visit_fcn_handle ( tree_fcn_handle )
virtual

Implements tree_walker.

Definition at line 634 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_function_def ( tree_function_def cmd)
virtual
void tree_evaluator::visit_global_command ( tree_global_command cmd)
virtual
void tree_evaluator::visit_identifier ( tree_identifier )
virtual

Implements tree_walker.

Definition at line 546 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_if_clause ( tree_if_clause )
virtual

Implements tree_walker.

Definition at line 552 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_if_command ( tree_if_command cmd)
virtual

Implements tree_walker.

Definition at line 558 of file pt-eval.cc.

References tree_if_command_list::accept(), and tree_if_command::cmd_list().

void tree_evaluator::visit_if_command_list ( tree_if_command_list lst)
virtual
void tree_evaluator::visit_index_expression ( tree_index_expression )
virtual

Implements tree_walker.

Definition at line 597 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_matrix ( tree_matrix )
virtual

Implements tree_walker.

Definition at line 603 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_multi_assignment ( tree_multi_assignment )
virtual

Implements tree_walker.

Definition at line 615 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_no_op_command ( tree_no_op_command cmd)
virtual
void tree_evaluator::visit_octave_user_function ( octave_user_function )
virtual

Implements tree_walker.

Definition at line 508 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_octave_user_function_header ( octave_user_function )

Definition at line 514 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_octave_user_function_trailer ( octave_user_function )

Definition at line 520 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_octave_user_script ( octave_user_script )
virtual

Implements tree_walker.

Definition at line 502 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_parameter_list ( tree_parameter_list )
virtual

Implements tree_walker.

Definition at line 640 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_persistent_command ( tree_persistent_command cmd)
virtual
void tree_evaluator::visit_postfix_expression ( tree_postfix_expression )
virtual

Implements tree_walker.

Definition at line 646 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_prefix_expression ( tree_prefix_expression )
virtual

Implements tree_walker.

Definition at line 652 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_return_command ( tree_return_command cmd)
virtual
void tree_evaluator::visit_return_list ( tree_return_list )
virtual

Implements tree_walker.

Definition at line 681 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_simple_assignment ( tree_simple_assignment )
virtual

Implements tree_walker.

Definition at line 687 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_simple_for_command ( tree_simple_for_command cmd)
virtual
void tree_evaluator::visit_statement ( tree_statement stmt)
virtual
void tree_evaluator::visit_statement_list ( tree_statement_list lst)
virtual
void tree_evaluator::visit_switch_case ( tree_switch_case )
virtual

Implements tree_walker.

Definition at line 836 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_switch_case_list ( tree_switch_case_list )
virtual

Implements tree_walker.

Definition at line 842 of file pt-eval.cc.

References panic_impossible.

void tree_evaluator::visit_switch_command ( tree_switch_command cmd)
virtual
void tree_evaluator::visit_try_catch_command ( tree_try_catch_command cmd)
virtual
void tree_evaluator::visit_unwind_protect_command ( tree_unwind_protect_command cmd)
virtual
void tree_evaluator::visit_while_command ( tree_while_command cmd)
virtual

Member Data Documentation

size_t tree_evaluator::current_frame = 0
static

Definition at line 148 of file pt-eval.h.

Referenced by do_breakpoint(), Fkeyboard(), and visit_return_command().

int tree_evaluator::dbstep_flag = 0
static

Definition at line 145 of file pt-eval.h.

Referenced by do_breakpoint(), Fdbstep(), and reset_debug_state().

bool tree_evaluator::debug_mode = false
static
bool tree_evaluator::in_loop_command = false
static
tree_evaluator::stmt_list_type tree_evaluator::statement_context = tree_evaluator::other
static

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