changeset 2988:daa1ed1f5462

[project @ 1997-05-16 07:23:15 by jwe]
author jwe
date Fri, 16 May 1997 07:23:17 +0000
parents ae20b3f37f5e
children 6a7b578b6fb4
files src/pt-arg-list.h src/pt-assign.h src/pt-binop.h src/pt-cmd.h src/pt-colon.h src/pt-const.h src/pt-decl.h src/pt-except.h src/pt-exp.h src/pt-id.h src/pt-idx.h src/pt-indir.h src/pt-jump.h src/pt-loop.h src/pt-mat.h src/pt-misc.h src/pt-plot.h src/pt-pr-code.cc src/pt-select.h src/pt-stmt.h src/pt-unop.h
diffstat 21 files changed, 325 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/src/pt-arg-list.h
+++ b/src/pt-arg-list.h
@@ -60,6 +60,14 @@
   string_vector get_arg_names (void) const;
 
   void accept (tree_walker& tw);
+
+private:
+
+  // No copying!
+
+  tree_argument_list (const tree_argument_list&);
+
+  tree_argument_list& operator = (const tree_argument_list&);
 };
 
 #endif
--- a/src/pt-assign.h
+++ b/src/pt-assign.h
@@ -101,6 +101,13 @@
 
   // The type of the expression.
   octave_value::assign_op etype;
+
+  // No copying!
+
+  tree_simple_assignment_expression (const tree_simple_assignment_expression&);
+
+  tree_simple_assignment_expression&
+  operator = (const tree_simple_assignment_expression&);
 };
 
 // Multi-valued assignment expressions.
@@ -142,6 +149,13 @@
   bool preserve;
   tree_argument_list *lhs;
   tree_expression *rhs;
+
+  // No copying!
+
+  tree_multi_assignment_expression (const tree_multi_assignment_expression&);
+
+  tree_multi_assignment_expression&
+  operator = (const tree_multi_assignment_expression&);
 };
 
 #endif
--- a/src/pt-binop.h
+++ b/src/pt-binop.h
@@ -88,6 +88,12 @@
 
   // The type of the expression.
   octave_value::binary_op etype;
+
+  // No copying!
+
+  tree_binary_expression (const tree_binary_expression&);
+
+  tree_binary_expression& operator = (const tree_binary_expression&);
 };
 
 // Boolean expressions.
@@ -126,6 +132,12 @@
 
   // The type of the expression.
   type etype;
+
+  // No copying!
+
+  tree_boolean_expression (const tree_boolean_expression&);
+
+  tree_boolean_expression& operator = (const tree_boolean_expression&);
 };
 
 #endif
--- a/src/pt-cmd.h
+++ b/src/pt-cmd.h
@@ -31,7 +31,7 @@
 
 class tree_walker;
 
-#include "pt-base.h"
+#include "pt.h"
 
 // A base class for commands.
 
@@ -46,6 +46,14 @@
   virtual ~tree_command (void) { }
 
   virtual void eval (void) = 0;
+
+private:
+
+  // No copying!
+
+  tree_command (const tree_command&);
+
+  tree_command& operator = (const tree_command&);
 };
 
 // No-op.
@@ -69,6 +77,12 @@
 private:
 
   string orig_cmd;
+
+  // No copying!
+
+  tree_no_op_command (const tree_no_op_command&);
+
+  tree_no_op_command& operator = (const tree_no_op_command&);
 };
 
 #endif
--- a/src/pt-colon.h
+++ b/src/pt-colon.h
@@ -82,6 +82,12 @@
   tree_expression *op_base;
   tree_expression *op_limit;
   tree_expression *op_increment;
+
+  // No copying!
+
+  tree_colon_expression (const tree_colon_expression&);
+
+  tree_colon_expression& operator = (const tree_colon_expression&);
 };
 
 #endif
--- a/src/pt-const.h
+++ b/src/pt-const.h
@@ -116,6 +116,12 @@
 
   // The original text form of this constant.
   string orig_text;
+
+  // No copying!
+
+  tree_constant (const tree_constant&);
+
+  tree_constant& operator = (const tree_constant&);
 };
 
 #endif
--- a/src/pt-decl.h
+++ b/src/pt-decl.h
@@ -67,6 +67,12 @@
 
   // An initializer expression (may be zero);
   tree_expression *expr;
+
+  // No copying!
+
+  tree_decl_elt (const tree_decl_elt&);
+
+  tree_decl_elt& operator = (const tree_decl_elt&);
 };
 
 class
@@ -92,6 +98,14 @@
   void eval (tree_decl_elt::eval_fcn, bool);
 
   void accept (tree_walker& tw);
+
+private:
+
+  // No copying!
+
+  tree_decl_init_list (const tree_decl_init_list&);
+
+  tree_decl_init_list& operator = (const tree_decl_init_list&);
 };
 
 // Base class for declaration commands -- global, static, etc.
@@ -126,6 +140,14 @@
 
   // The list of variables or initializers in this declaration command.
   tree_decl_init_list *init_list;
+
+private:
+
+  // No copying!
+
+  tree_decl_command (const tree_decl_command&);
+
+  tree_decl_command& operator = (const tree_decl_command&);
 };
 
 // Global.
@@ -144,6 +166,14 @@
   ~tree_global_command (void) { }
 
   void eval (void);
+
+private:
+
+  // No copying!
+
+  tree_global_command (const tree_global_command&);
+
+  tree_global_command& operator = (const tree_global_command&);
 };
 
 // Static.
@@ -162,6 +192,14 @@
   ~tree_static_command (void) { }
 
   void eval (void);
+
+private:
+
+  // No copying!
+
+  tree_static_command (const tree_static_command&);
+
+  tree_static_command& operator = (const tree_static_command&);
 };
 
 #endif
--- a/src/pt-except.h
+++ b/src/pt-except.h
@@ -64,6 +64,12 @@
 
   // The code to execute if an error occurs in the first block.
   tree_statement_list *catch_code;
+
+  // No copying!
+
+  tree_try_catch_command (const tree_try_catch_command&);
+
+  tree_try_catch_command& operator = (const tree_try_catch_command&);
 };
 
 // Simple exception handling.
@@ -99,6 +105,12 @@
   // The body of code to execute no matter what happens in the first
   // body of code.
   tree_statement_list *cleanup_code;
+
+  // No copying!
+
+  tree_unwind_protect_command (const tree_unwind_protect_command&);
+
+  tree_unwind_protect_command& operator = (const tree_unwind_protect_command&);
 };
 
 #endif
--- a/src/pt-exp.h
+++ b/src/pt-exp.h
@@ -32,7 +32,7 @@
 class octave_value;
 class octave_lvalue;
 
-#include "pt-base.h"
+#include "pt.h"
 
 // A base class for expressions.
 
@@ -133,6 +133,14 @@
 
   // Print result of rvalue for this expression?
   bool print_flag;
+
+private:
+
+  // No copying!
+
+  tree_expression (const tree_expression&);
+
+  tree_expression& operator = (const tree_expression&);
 };
 
 #endif
--- a/src/pt-id.h
+++ b/src/pt-id.h
@@ -93,6 +93,12 @@
 
   // The symbol record that this identifier references.
   symbol_record *sym;
+
+  // No copying!
+
+  tree_identifier (const tree_identifier&);
+
+  tree_identifier& operator = (const tree_identifier&);
 };
 
 #endif
--- a/src/pt-idx.h
+++ b/src/pt-idx.h
@@ -81,6 +81,12 @@
   tree_argument_list *list;
 
   string_vector arg_nm;
+
+  // No copying!
+
+  tree_index_expression (const tree_index_expression&);
+
+  tree_index_expression& operator = (const tree_index_expression&);
 };
 
 #endif
--- a/src/pt-indir.h
+++ b/src/pt-indir.h
@@ -84,6 +84,12 @@
   string nm;
 
   void eval_error (void) const;
+
+  // No copying!
+
+  tree_indirect_ref (const tree_indirect_ref&);
+
+  tree_indirect_ref& operator = (const tree_indirect_ref&);
 };
 
 #endif
--- a/src/pt-jump.h
+++ b/src/pt-jump.h
@@ -48,6 +48,14 @@
   void accept (tree_walker& tw);
 
   static int breaking;
+
+private:
+
+  // No copying!
+
+  tree_break_command (const tree_break_command&);
+
+  tree_break_command& operator = (const tree_break_command&);
 };
 
 // Continue.
@@ -67,6 +75,14 @@
   void accept (tree_walker& tw);
 
   static int continuing;
+
+private:
+
+  // No copying!
+
+  tree_continue_command (const tree_continue_command&);
+
+  tree_continue_command& operator = (const tree_continue_command&);
 };
 
 // Return.
@@ -86,6 +102,14 @@
   void accept (tree_walker& tw);
 
   static int returning;
+
+private:
+
+  // No copying!
+
+  tree_return_command (const tree_return_command&);
+
+  tree_return_command& operator = (const tree_return_command&);
 };
 
 #endif
--- a/src/pt-loop.h
+++ b/src/pt-loop.h
@@ -74,6 +74,12 @@
 
   // List of commands to execute.
   tree_statement_list *list;
+
+  // No copying!
+
+  tree_while_command (const tree_while_command&);
+
+  tree_while_command& operator = (const tree_while_command&);
 };
 
 // For.
@@ -117,6 +123,12 @@
 
   void do_for_loop_once (octave_lvalue &ult, const octave_value& rhs,
 			 bool& quit);
+
+  // No copying!
+
+  tree_simple_for_command (const tree_simple_for_command&);
+
+  tree_simple_for_command& operator = (const tree_simple_for_command&);
 };
 
 class
@@ -159,6 +171,12 @@
   void do_for_loop_once (octave_lvalue &val_ref, octave_lvalue &key_ref,
 			 const octave_value& val, const octave_value& key,
 			 bool& quit);
+
+  // No copying!
+
+  tree_complex_for_command (const tree_complex_for_command&);
+
+  tree_complex_for_command& operator = (const tree_complex_for_command&);
 };
 
 #endif
--- a/src/pt-mat.h
+++ b/src/pt-mat.h
@@ -66,6 +66,14 @@
   octave_value_list rvalue (int nargout);
 
   void accept (tree_walker& tw);
+
+private:
+
+  // No copying!
+
+  tree_matrix (const tree_matrix&);
+
+  tree_matrix& operator = (const tree_matrix&);
 };
 
 #endif
--- a/src/pt-misc.h
+++ b/src/pt-misc.h
@@ -82,6 +82,12 @@
 private:
 
   int marked_for_varargs;
+
+  // No copying!
+
+  tree_parameter_list (const tree_parameter_list&);
+
+  tree_parameter_list& operator = (const tree_parameter_list&);
 };
 
 // Return lists.  Used to hold the right hand sides of multiple
@@ -101,6 +107,14 @@
   ~tree_return_list (void);
 
   void accept (tree_walker& tw);
+
+private:
+
+  // No copying!
+
+  tree_return_list (const tree_return_list&);
+
+  tree_return_list& operator = (const tree_return_list&);
 };
 
 class
@@ -111,6 +125,14 @@
   tree_va_return_list (void) : SLList<octave_value> () { }
 
   ~tree_va_return_list (void) { }
+
+private:
+
+  // No copying!
+
+  tree_va_return_list (const tree_va_return_list&);
+
+  tree_va_return_list& operator = (const tree_va_return_list&);
 };
 
 #endif
--- a/src/pt-plot.h
+++ b/src/pt-plot.h
@@ -82,6 +82,12 @@
   // The list of plots for this plot command.  For example, the
   // command "plot sin(x), cos(x)" has two subplot commands.
   subplot_list *plot_list;
+
+  // No copying!
+
+  tree_plot_command (const tree_plot_command&);
+
+  tree_plot_command& operator = (const tree_plot_command&);
 };
 
 class
@@ -110,6 +116,12 @@
   plot_range *x_range;
   plot_range *y_range;
   plot_range *z_range;
+
+  // No copying!
+
+  plot_limits (const plot_limits&);
+
+  plot_limits& operator = (const plot_limits&);
 };
 
 class
@@ -136,6 +148,12 @@
   // is specified, the range to display is determined from the data.
   tree_expression *lower;
   tree_expression *upper;
+
+  // No copying!
+
+  plot_range (const plot_range&);
+
+  plot_range& operator = (const plot_range&);
 };
 
 class
@@ -197,6 +215,12 @@
 
   // A vector to hold using qualifiers.
   tree_expression *x[4];
+
+  // No copying!
+
+  subplot_using (const subplot_using&);
+
+  subplot_using& operator = (const subplot_using&);
 };
 
 class
@@ -232,6 +256,12 @@
 
   // The number of the point type to use.
   tree_expression *sp_pointtype;
+
+  // No copying!
+
+  subplot_style (const subplot_style&);
+
+  subplot_style& operator = (const subplot_style&);
 };
 
 class
@@ -284,6 +314,12 @@
 
   // The `style' option
   subplot_style *sp_style_clause;
+
+  // No copying!
+
+  subplot (const subplot&);
+
+  subplot& operator = (const subplot&);
 };
 
 class
@@ -302,6 +338,14 @@
   int print (int ndim, ostrstream& plot_buf);
 
   void accept (tree_walker& tw);
+
+private:
+
+  // No copying!
+
+  subplot_list (const subplot_list&);
+
+  subplot_list& operator = (const subplot_list&);
 };
 
 extern string save_in_tmp_file (octave_value& t, int ndim = 2,
--- a/src/pt-pr-code.cc
+++ b/src/pt-pr-code.cc
@@ -33,30 +33,7 @@
 #include "error.h"
 #include "ov-usr-fcn.h"
 #include "pr-output.h"
-#include "pt-arg-list.h"
-#include "pt-assign.h"
-#include "pt-base.h"
-#include "pt-binop.h"
-#include "pt-cmd.h"
-#include "pt-colon.h"
-#include "pt-const.h"
-#include "pt-decl.h"
-#include "pt-except.h"
-#include "pt-exp.h"
-#include "pt-id.h"
-#include "pt-idx.h"
-#include "pt-indir.h"
-#include "pt-jump.h"
-#include "pt-loop.h"
-#include "pt-mat.h"
-#include "pt-misc.h"
-#include "pt-plot.h"
-#include "pt-pr-code.h"
-#include "pt-select.h"
-#include "pt-stmt.h"
-#include "pt-unop.h"
-#include "pt-pr-code.h"
-#include "pt-walk.h"
+#include "pt-all.h"
 
 void
 tree_print_code::visit_argument_list (tree_argument_list& lst)
--- a/src/pt-select.h
+++ b/src/pt-select.h
@@ -72,6 +72,12 @@
 
   // The list of statements to evaluate if expr is true.
   tree_statement_list *list;
+
+  // No copying!
+
+  tree_if_clause (const tree_if_clause&);
+
+  tree_if_clause& operator = (const tree_if_clause&);
 };
 
 class
@@ -97,6 +103,14 @@
   void eval (void);
 
   void accept (tree_walker& tw);
+
+private:
+
+  // No copying!
+
+  tree_if_command_list (const tree_if_command_list&);
+
+  tree_if_command_list& operator = (const tree_if_command_list&);
 };
 
 class
@@ -122,6 +136,12 @@
 
   // List of if commands (if, elseif, elseif, ... else, endif)
   tree_if_command_list *list;
+
+  // No copying!
+
+  tree_if_command (const tree_if_command&);
+
+  tree_if_command& operator = (const tree_if_command&);
 };
 
 // Switch.
@@ -164,6 +184,12 @@
 
   // The list of statements to evaluate if the label matches.
   tree_statement_list *list;
+
+  // No copying!
+
+  tree_switch_case (const tree_switch_case&);
+
+  tree_switch_case& operator = (const tree_switch_case&);
 };
 
 class
@@ -189,6 +215,14 @@
   void eval (const octave_value& val);
 
   void accept (tree_walker& tw);
+
+private:
+
+  // No copying!
+
+  tree_switch_case_list (const tree_switch_case_list&);
+
+  tree_switch_case_list& operator = (const tree_switch_case_list&);
 };
 
 class
@@ -222,6 +256,12 @@
 
   // List of cases (case 1, case 2, ..., default)
   tree_switch_case_list *list;
+
+  // No copying!
+
+  tree_switch_command (const tree_switch_command&);
+
+  tree_switch_command& operator = (const tree_switch_command&);
 };
 
 #endif
--- a/src/pt-stmt.h
+++ b/src/pt-stmt.h
@@ -91,6 +91,12 @@
 
   // Print result of eval for this command?
   bool print_flag;
+
+  // No copying!
+
+  tree_statement (const tree_statement&);
+
+  tree_statement& operator = (const tree_statement&);
 };
 
 // A list of statements to evaluate.
@@ -125,6 +131,12 @@
 
   // Does this list of statements make up the body of a function?
   bool function_body;
+
+  // No copying!
+
+  tree_statement_list (const tree_statement_list&);
+
+  tree_statement_list& operator = (const tree_statement_list&);
 };
 
 #endif
--- a/src/pt-unop.h
+++ b/src/pt-unop.h
@@ -58,6 +58,12 @@
 
   // The operand for the expression.
   tree_expression *op;
+
+  // No copying!
+
+  tree_unary_expression (const tree_unary_expression&);
+
+  tree_unary_expression& operator = (const tree_unary_expression&);
 };
 
 // Prefix expressions.
@@ -102,6 +108,12 @@
 
   // The type of the expression.
   type etype;
+
+  // No copying!
+
+  tree_prefix_expression (const tree_prefix_expression&);
+
+  tree_prefix_expression& operator = (const tree_prefix_expression&);
 };
 
 // Postfix expressions.
@@ -146,6 +158,12 @@
 
   // The type of the expression.
   type etype;
+
+  // No copying!
+
+  tree_postfix_expression (const tree_postfix_expression&);
+
+  tree_postfix_expression& operator = (const tree_postfix_expression&);
 };
 
 #endif