26 #if defined (HAVE_CONFIG_H)
52 param_list->
accept (*
this);
62 auto p = lst.
begin ();
64 while (p != lst.
end ())
84 m_os <<
"arguments ... endarguments";
198 init_list->
accept (*
this);
204 auto p = lst.
begin ();
206 while (p != lst.
end ())
418 std::string fcn_name = fcn.
name ();
420 m_os << (fcn_name.empty () ?
"(empty)" : fcn_name) <<
' ';
425 param_list->accept (*
this);
458 std::string nm =
id.name ();
459 m_os << (nm.empty () ?
"(empty)" : nm);
510 auto p = lst.
begin ();
512 bool first_elt =
true;
514 while (p != lst.
end ())
551 std::list<tree_argument_list *> arg_lists = expr.
arg_lists ();
552 std::string type_tags = expr.
type_tags ();
553 std::list<string_vector> arg_names = expr.
arg_names ();
554 std::list<tree_expression *> dyn_fields = expr.
dyn_fields ();
556 int n = type_tags.length ();
558 auto p_arg_lists = arg_lists.begin ();
559 auto p_arg_names = arg_names.begin ();
560 auto p_dyn_fields = dyn_fields.begin ();
562 for (
int i = 0; i <
n; i++)
564 switch (type_tags[i])
569 if ((nc ==
'[' || nc ==
'{') && expr.
paren_count () == 0)
587 if ((nc ==
'[' || nc ==
'{') && expr.
paren_count () == 0)
606 std::string fn = (*p_arg_names)(0);
647 auto p = lst.
begin ();
649 while (p != lst.
end ())
678 auto p = lst.
begin ();
680 while (p != lst.
end ())
795 auto p = lst.
begin ();
797 while (p != lst.
end ())
1002 m_os <<
"endswitch";
1023 try_code->
accept (*
this);
1048 catch_code->
accept (*
this);
1057 m_os <<
"end_try_catch";
1067 m_os <<
"unwind_protect";
1073 if (unwind_protect_code)
1077 unwind_protect_code->
accept (*
this);
1086 m_os <<
"unwind_protect_cleanup";
1096 cleanup_code->
accept (*
this);
1105 m_os <<
"end_unwind_protect";
1252 for (
int i = 0; i <
n; i++)
1259 bool printed_something =
false;
1261 bool prev_char_was_newline =
false;
1263 std::string comment = elt.
text ();
1265 std::size_t
len = comment.length ();
1269 while (i <
len && comment[i++] ==
'\n')
1275 char c = comment[i++];
1279 if (prev_char_was_newline)
1281 printed_something =
true;
1290 prev_char_was_newline =
true;
1296 printed_something =
true;
1302 if (! (isspace (c) || c ==
'!'))
1306 m_os << static_cast<char> (c);
1308 prev_char_was_newline =
false;
std::size_t length(void) const
std::string name(void) const
octave::tree_statement_list * body(void)
octave::tree_parameter_list * return_list(void)
octave::tree_parameter_list * parameter_list(void)
octave::comment_list * trailing_comment(void)
octave::comment_list * leading_comment(void)
OCTINTERP_API octave_function * function_value(bool silent=false) const
tree_expression * expression(void) const
tree_parameter_list * parameter_list(void) const
void accept(tree_walker &tw)
tree_expression * rhs(void)
tree_expression * lhs(void)
std::string oper(void) const
tree_expression * limit(void)
tree_expression * increment(void)
tree_expression * base(void)
tree_statement_list * body(void)
comment_list * trailing_comment(void)
comment_list * leading_comment(void)
tree_expression * control_expr(void)
tree_argument_list * left_hand_side(void)
void print_raw(std::ostream &os, bool pr_as_read_syntax=false, bool pr_orig_txt=true)
tree_decl_init_list * initializer_list(void)
std::string name(void) const
tree_identifier * ident(void)
void accept(tree_walker &tw)
tree_expression * expression(void)
void accept(tree_walker &tw)
int paren_count(void) const
void print_raw(std::ostream &os, bool pr_as_read_syntax=false, bool pr_orig_txt=true)
octave_value function(void)
void accept(tree_walker &tw)
void accept(tree_walker &tw)
comment_list * leading_comment(void)
bool is_else_clause(void)
tree_expression * condition(void)
tree_statement_list * commands(void)
void accept(tree_walker &tw)
comment_list * trailing_comment(void)
comment_list * leading_comment(void)
tree_if_command_list * cmd_list(void)
tree_expression * expression(void)
std::list< tree_argument_list * > arg_lists(void)
std::list< tree_expression * > dyn_fields(void)
std::string type_tags(void)
std::list< string_vector > arg_names(void)
tree_expression * right_hand_side(void)
tree_argument_list * left_hand_side(void)
std::string oper(void) const
bool is_end_of_fcn_or_script(void) const
std::string original_command(void)
void accept(tree_walker &tw)
bool is_input_list(void) const
std::string varargs_symbol_name(void) const
bool takes_varargs(void) const
void visit_binary_expression(tree_binary_expression &)
void visit_continue_command(tree_continue_command &)
std::stack< char > m_nesting
void visit_switch_case(tree_switch_case &)
void visit_decl_init_list(tree_decl_init_list &)
void visit_constant(tree_constant &)
void visit_postfix_expression(tree_postfix_expression &)
void visit_superclass_ref(tree_superclass_ref &)
void visit_no_op_command(tree_no_op_command &)
void visit_args_block_attribute_list(tree_args_block_attribute_list &)
void visit_while_command(tree_while_command &)
void increment_indent_level(void)
void visit_fcn_handle(tree_fcn_handle &)
void visit_arguments_block(tree_arguments_block &)
int m_curr_print_indent_level
void decrement_indent_level(void)
void visit_switch_command(tree_switch_command &)
void visit_prefix_expression(tree_prefix_expression &)
void visit_octave_user_function_header(octave_user_function &)
void visit_simple_assignment(tree_simple_assignment &)
void visit_decl_command(tree_decl_command &)
void visit_if_clause(tree_if_clause &)
void visit_index_expression(tree_index_expression &)
void print_fcn_handle_body(tree_expression *)
void print_parens(const tree_expression &expr, const char *txt)
void visit_statement(tree_statement &)
void visit_break_command(tree_break_command &)
void visit_return_command(tree_return_command &)
void visit_if_command(tree_if_command &)
void visit_unwind_protect_command(tree_unwind_protect_command &)
void print_comment_elt(const comment_elt &comment_elt)
void visit_identifier(tree_identifier &)
void visit_complex_for_command(tree_complex_for_command &)
void visit_multi_assignment(tree_multi_assignment &)
void visit_matrix(tree_matrix &)
void visit_if_command_list(tree_if_command_list &)
void visit_try_catch_command(tree_try_catch_command &)
void visit_do_until_command(tree_do_until_command &)
void visit_arg_validation(tree_arg_validation &)
void visit_octave_user_function(octave_user_function &)
void visit_parameter_list(tree_parameter_list &)
bool m_print_original_text
void visit_statement_list(tree_statement_list &)
void newline(const char *alt_txt=", ")
void visit_spmd_command(tree_spmd_command &)
void visit_decl_elt(tree_decl_elt &)
void visit_args_block_validation_list(tree_args_block_validation_list &)
void visit_arg_size_spec(tree_arg_size_spec &)
void visit_simple_for_command(tree_simple_for_command &)
void visit_anon_fcn_handle(tree_anon_fcn_handle &)
void visit_argument_list(tree_argument_list &)
void visit_colon_expression(tree_colon_expression &)
void visit_octave_user_script(octave_user_script &)
void visit_arg_validation_fcns(tree_arg_validation_fcns &)
void visit_cell(tree_cell &)
void visit_octave_user_function_trailer(octave_user_function &)
void visit_metaclass_query(tree_metaclass_query &)
void visit_function_def(tree_function_def &)
void print_comment_list(comment_list *comment_list)
void print_indented_comment(comment_list *comment_list)
tree_expression * right_hand_side(void)
tree_expression * left_hand_side(void)
std::string oper(void) const
comment_list * trailing_comment(void)
comment_list * leading_comment(void)
tree_expression * left_hand_side(void)
tree_expression * maxproc_expr(void)
tree_statement_list * body(void)
tree_expression * control_expr(void)
tree_statement_list * body(void)
comment_list * trailing_comment(void)
comment_list * leading_comment(void)
void accept(tree_walker &tw)
comment_list * comment_text(void)
tree_command * command(void)
tree_expression * expression(void)
std::string method_name(void) const
std::string class_name(void) const
void accept(tree_walker &tw)
tree_statement_list * commands(void)
tree_expression * case_label(void)
comment_list * leading_comment(void)
bool is_default_case(void)
tree_switch_case_list * case_list(void)
tree_expression * switch_value(void)
comment_list * leading_comment(void)
tree_statement_list * cleanup(void)
tree_statement_list * body(void)
comment_list * middle_comment(void)
tree_identifier * identifier(void)
comment_list * trailing_comment(void)
comment_list * leading_comment(void)
tree_expression * operand(void)
std::string oper(void) const
tree_statement_list * body(void)
comment_list * trailing_comment(void)
tree_statement_list * cleanup(void)
comment_list * leading_comment(void)
comment_list * middle_comment(void)
comment_list * leading_comment(void)
tree_expression * condition(void)
comment_list * trailing_comment(void)
tree_statement_list * body(void)
virtual void accept(tree_walker &tw)=0
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void panic_unless(bool cond)
#define panic_impossible()
F77_RET_T const F77_DBLE const F77_DBLE * f