23 #if defined (HAVE_CONFIG_H) 51 param_list->
accept (*
this);
65 while (
p != lst.
end ())
160 init_list->
accept (*
this);
168 while (
p != lst.
end ())
241 list->accept (*
this);
284 list->accept (*
this);
349 int len = ret_list->
length ();
351 if (len > 1 || takes_var_return)
359 if (takes_var_return)
367 if (len > 1 || takes_var_return)
378 m_os << (fcn_name.empty () ?
"(empty)" : fcn_name) <<
' ';
386 int len = param_list->length ();
388 if (len > 0 || takes_varargs)
394 param_list->accept (*
this);
404 if (len > 0 || takes_varargs)
468 list->accept (*
this);
486 list->accept (*
this);
500 bool first_elt =
true;
502 while (
p != lst.
end ())
539 std::list<tree_argument_list *> arg_lists = expr.
arg_lists ();
541 std::list<string_vector> arg_names = expr.
arg_names ();
543 int n = type_tags.length ();
545 std::list<tree_argument_list *>::iterator p_arg_lists = arg_lists.begin ();
546 std::list<string_vector>::iterator p_arg_names = arg_names.begin ();
548 for (
int i = 0;
i < n;
i++)
550 switch (type_tags[
i])
555 if ((nc ==
'[' || nc ==
'{') && expr.
paren_count () == 0)
573 if ((nc ==
'[' || nc ==
'{') && expr.
paren_count () == 0)
593 assert (
nm.numel () == 1);
621 while (
p != lst.
end ())
652 while (
p != lst.
end ())
761 while (
p != lst.
end ())
822 while (
p != lst.
end ())
907 if (
cs.is_default_case ())
925 list->accept (*
this);
938 while (
p != lst.
end ())
969 list->accept (*
this);
1024 catch_code->
accept (*
this);
1033 m_os <<
"end_try_catch";
1043 m_os <<
"unwind_protect";
1049 if (unwind_protect_code)
1053 unwind_protect_code->
accept (*
this);
1062 m_os <<
"unwind_protect_cleanup";
1072 cleanup_code->
accept (*
this);
1081 m_os <<
"end_unwind_protect";
1106 list->accept (*
this);
1135 list->accept (*
this);
1216 for (
int i = 0;
i < n;
i++)
1223 bool printed_something =
false;
1225 bool prev_char_was_newline =
false;
1229 size_t len = comment.length ();
1233 while (
i < len && comment[
i++] ==
'\n')
1239 char c = comment[
i++];
1243 if (prev_char_was_newline)
1245 printed_something =
true;
1254 prev_char_was_newline =
true;
1260 printed_something =
true;
1266 if (! (isspace (
c) ||
c ==
'!'))
1270 m_os << static_cast<char> (
c);
1272 prev_char_was_newline =
false;
void accept(tree_walker &tw)
comment_list * trailing_comment(void)
void visit_return_list(tree_return_list &)
tree_expression * right_hand_side(void)
comment_list * leading_comment(void)
void visit_break_command(tree_break_command &)
void visit_try_catch_command(tree_try_catch_command &)
comment_list * leading_comment(void)
tree_statement_list * cleanup(void)
The value of lines which begin with a space character are not saved in the history list A value of all commands are saved on the history list
void visit_switch_command(tree_switch_command &)
void visit_return_command(tree_return_command &)
void visit_simple_assignment(tree_simple_assignment &)
tree_expression * base(void)
void visit_function_def(tree_function_def &)
std::string oper(void) const
identity matrix If supplied two scalar respectively For allows like xample val
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE * f
comment_list * trailing_comment(void)
std::string oper(void) const
virtual void accept(tree_walker &tw)=0
size_t length(void) const
void visit_fcn_handle(tree_fcn_handle &)
void visit_octave_user_function_trailer(octave_user_function &)
tree_decl_init_list * initializer_list(void)
void visit_postfix_expression(tree_postfix_expression &)
tree_statement_list * body(void)
std::list< tree_expression * >::iterator iterator
void print_fcn_handle_body(tree_expression *)
octave_value function(void)
std::list< string_vector > arg_names(void)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
std::string oper(void) const
void accept(tree_walker &tw)
void visit_constant(tree_constant &)
void visit_simple_for_command(tree_simple_for_command &)
std::stack< char > m_nesting
comment_list * leading_comment(void)
void visit_if_command_list(tree_if_command_list &)
void visit_do_until_command(tree_do_until_command &)
comment_list * trailing_comment(void)
comment_list * middle_comment(void)
tree_statement_list * commands(void)
comment_list * leading_comment(void)
void visit_switch_case(tree_switch_case &)
void print_indented_comment(comment_list *comment_list)
void accept(tree_walker &tw)
void visit_statement_list(tree_statement_list &)
void visit_parameter_list(tree_parameter_list &)
void visit_octave_user_function(octave_user_function &)
void visit_complex_for_command(tree_complex_for_command &)
void visit_binary_expression(tree_binary_expression &)
int m_curr_print_indent_level
OCTAVE_EXPORT octave_value_list isdir nd deftypefn *std::string nm
tree_expression * expression(void)
tree_parameter_list * parameter_list(void) const
void print_raw(std::ostream &os, bool pr_as_read_syntax=false, bool pr_orig_txt=true)
void visit_octave_user_script(octave_user_script &)
comment_list * trailing_comment(void)
void visit_if_command(tree_if_command &)
bool m_print_original_text
std::string oper(void) const
std::string original_command(void)
std::list< tree_argument_list * > arg_lists(void)
void visit_unwind_protect_command(tree_unwind_protect_command &)
comment_list * comment_text(void)
std::string type_tags(void)
tree_expression * control_expr(void)
tree_expression * control_expr(void)
void accept(tree_walker &tw)
void visit_while_command(tree_while_command &)
tree_statement_list * cleanup(void)
tree_expression * left_hand_side(void)
void accept(tree_walker &tw)
virtual bool takes_varargs(void) const
void print_raw(std::ostream &os, bool pr_as_read_syntax=false, bool pr_orig_txt=true)
virtual bool takes_var_return(void) const
#define panic_impossible()
tree_expression * maxproc_expr(void)
void increment_indent_level(void)
tree_expression * expression(void)
void visit_continue_command(tree_continue_command &)
base_list< tree_argument_list * >::iterator iterator
tree_expression * increment(void)
void visit_decl_command(tree_decl_command &)
tree_command * command(void)
void visit_prefix_expression(tree_prefix_expression &)
comment_list * trailing_comment(void)
comment_list * leading_comment(void)
void print_comment_list(comment_list *comment_list)
void visit_decl_elt(tree_decl_elt &)
comment_list * trailing_comment(void)
comment_list * middle_comment(void)
void accept(tree_walker &tw)
tree_expression * switch_value(void)
tree_expression * right_hand_side(void)
void visit_switch_case_list(tree_switch_case_list &)
tree_statement_list * body(void)
tree_statement_list * body(void)
void decrement_indent_level(void)
tree_expression * rhs(void)
void visit_octave_user_function_header(octave_user_function &)
void accept(tree_walker &tw)
bool is_else_clause(void)
tree_statement_list * body(void)
tree_expression * left_hand_side(void)
void newline(const char *alt_txt=", ")
tree_expression * expression(void) const
comment_list * leading_comment(void)
void visit_if_clause(tree_if_clause &)
tree_argument_list * left_hand_side(void)
void accept(tree_walker &tw)
tree_expression * lhs(void)
void visit_cell(tree_cell &)
void print_comment_elt(const comment_elt &comment_elt)
void visit_colon_expression(tree_colon_expression &)
void visit_argument_list(tree_argument_list &)
void visit_identifier(tree_identifier &)
void visit_matrix(tree_matrix &)
int paren_count(void) const
comment_list * leading_comment(void)
void visit_decl_init_list(tree_decl_init_list &)
std::string name(void) const
virtual octave_function * function_value(bool silent=false)
comment_list * leading_comment(void)
tree_expression * operand(void)
void accept(tree_walker &tw)
tree_identifier * ident(void)
void visit_statement(tree_statement &)
void visit_funcall(tree_funcall &)
std::string name(void) const
tree_expression * condition(void)
void visit_multi_assignment(tree_multi_assignment &)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
bool is_end_of_fcn_or_script(void) const
tree_statement_list * body(void)
void visit_index_expression(tree_index_expression &)
tree_switch_case_list * case_list(void)
void visit_no_op_command(tree_no_op_command &)
tree_argument_list * left_hand_side(void)
void visit_anon_fcn_handle(tree_anon_fcn_handle &)
tree_if_command_list * cmd_list(void)
void print_parens(const tree_expression &expr, const char *txt)
tree_expression * condition(void)
tree_identifier * identifier(void)
tree_expression * limit(void)
tree_expression * expression(void)