# HG changeset patch # User jwe # Date 863735800 0 # Node ID a3556d2adec93ad22e4a62e238543594c4c01ad6 # Parent 49de012386386b383cd6d050695610a84957636e [project @ 1997-05-15 22:35:37 by jwe] diff -r 49de01238638 -r a3556d2adec9 src/ChangeLog --- a/src/ChangeLog Thu May 15 21:13:43 1997 +0000 +++ b/src/ChangeLog Thu May 15 22:36:40 1997 +0000 @@ -1,5 +1,9 @@ Thu May 15 11:48:10 1997 John W. Eaton + * oct-lvalue.h: Rename from oct-var-ref.h. Rename class from + octave_variable_reference to octave_lvalue. Change all uses. + * oct-lvalue.cc: Rename from oct-var-ref.cc. + * variables.cc (bind_ans): Only bind ans and print result if value is defined. diff -r 49de01238638 -r a3556d2adec9 src/Makefile.in --- a/src/Makefile.in Thu May 15 21:13:43 1997 +0000 +++ b/src/Makefile.in Thu May 15 22:36:40 1997 +0000 @@ -80,7 +80,7 @@ oct-fstrm.h oct-hist.h oct-iostrm.h \ oct-map.h oct-obj.h oct-prcstrm.h oct-procbuf.h \ oct-stdstrm.h oct-stream.h oct-strstrm.h \ - oct-var-ref.h oct.h ops.h pager.h parse.h \ + oct-lvalue.h oct.h ops.h pager.h parse.h \ pr-output.h procstream.h sighandlers.h symtab.h sysdep.h \ systime.h syswait.h token.h toplev.h unwind-prot.h utils.h \ variables.h version.h xdiv.h xpow.h $(OV_INCLUDES) $(PT_INCLUDES) @@ -119,7 +119,7 @@ lex.l load-save.cc mappers.cc oct-fstrm.cc oct-hist.cc \ oct-iostrm.cc oct-map.cc oct-obj.cc oct-prcstrm.cc \ oct-procbuf.cc oct-stdstrm.cc oct-stream.cc oct-strstrm.cc \ - oct-var-ref.cc pager.cc parse.y pr-output.cc procstream.cc \ + oct-lvalue.cc pager.cc parse.y pr-output.cc procstream.cc \ sighandlers.cc strcasecmp.c strncase.c strfns.cc \ strftime.c symtab.cc syscalls.cc sysdep.cc token.cc \ toplev.cc unwind-prot.cc utils.cc variables.cc xdiv.cc \ diff -r 49de01238638 -r a3556d2adec9 src/oct-lvalue.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/oct-lvalue.cc Thu May 15 22:36:40 1997 +0000 @@ -0,0 +1,67 @@ +/* + +Copyright (C) 1996, 1997 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "oct-obj.h" +#include "oct-lvalue.h" +#include "ov.h" + +void +octave_lvalue::assign (octave_value::assign_op op, const octave_value& rhs) +{ + octave_value saved_val; + + if (chg_fcn) + octave_value saved_val = *val; + + if (idx.empty ()) + { + if (struct_elt_name.empty ()) + val->assign (op, rhs); + else + val->assign_struct_elt (op, struct_elt_name, rhs); + } + else + { + if (struct_elt_name.empty ()) + val->assign (op, idx, rhs); + else + val->assign_struct_elt (op, struct_elt_name, idx, rhs); + } + + if (chg_fcn && chg_fcn () < 0) + *val = saved_val; + + // Clear index so subsequent value() operations will not perform an + // indexing operation. + + idx = octave_value_list (); +} + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; End: *** +*/ diff -r 49de01238638 -r a3556d2adec9 src/oct-lvalue.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/oct-lvalue.h Thu May 15 22:36:40 1997 +0000 @@ -0,0 +1,112 @@ +/* + +Copyright (C) 1996, 1997 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#if !defined (octave_lvalue_h) +#define octave_lvalue_h 1 + +class octave_value; +class octave_value_list; + +#include + +#include "oct-obj.h" +#include "symtab.h" + +class +octave_lvalue +{ +public: + + octave_lvalue (octave_value *v = 0, symbol_record::sv_function f = 0) + : val (v), idx (), chg_fcn (f), struct_elt_name () { } + + octave_lvalue (octave_value *v, const string& nm, + symbol_record::sv_function f = 0) + : val (v), idx (), chg_fcn (f), struct_elt_name (nm) { } + + octave_lvalue (const octave_lvalue& vr) + : val (vr.val), idx (vr.idx), chg_fcn (vr.chg_fcn), + struct_elt_name (vr.struct_elt_name) { } + + octave_lvalue& operator = (const octave_lvalue& vr) + { + if (this != &vr) + { + val = vr.val; + idx = vr.idx; + chg_fcn = vr.chg_fcn; + struct_elt_name = vr.struct_elt_name; + } + + return *this; + } + + ~octave_lvalue (void) { } + + bool is_defined (void) { return val->is_defined (); } + + bool is_undefined (void) { return val->is_undefined (); } + + bool is_map (void) { return val->is_map (); } + + void define (const octave_value& v) { *val = v; } + + void assign (octave_value::assign_op, const octave_value&); + + octave_lvalue struct_elt_ref (const string& nm) + { return val->struct_elt_ref (nm); } + + void index (const octave_value_list& i) { idx = i; } + + void increment (void) { val->increment (); } + + void decrement (void) { val->decrement (); } + + octave_value value (void) + { + return struct_elt_name.empty () + ? (idx.empty () + ? *val + : val->do_index_op (idx)) + : (idx.empty () + ? val->do_struct_elt_index_op (struct_elt_name) + : val->do_struct_elt_index_op (struct_elt_name, idx)); + } + +private: + + octave_value *val; + + octave_value_list idx; + + symbol_record::sv_function chg_fcn; + + string struct_elt_name; +}; + +#endif + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; End: *** +*/ diff -r 49de01238638 -r a3556d2adec9 src/oct-var-ref.cc --- a/src/oct-var-ref.cc Thu May 15 21:13:43 1997 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* - -Copyright (C) 1996, 1997 John W. Eaton - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "oct-obj.h" -#include "oct-var-ref.h" -#include "ov.h" - -void -octave_variable_reference::assign (octave_value::assign_op op, - const octave_value& rhs) -{ - octave_value saved_val; - - if (chg_fcn) - octave_value saved_val = *val; - - if (idx.empty ()) - { - if (struct_elt_name.empty ()) - val->assign (op, rhs); - else - val->assign_struct_elt (op, struct_elt_name, rhs); - } - else - { - if (struct_elt_name.empty ()) - val->assign (op, idx, rhs); - else - val->assign_struct_elt (op, struct_elt_name, idx, rhs); - } - - if (chg_fcn && chg_fcn () < 0) - *val = saved_val; - - // Clear index so subsequent value() operations will not perform an - // indexing operation. - - idx = octave_value_list (); -} - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ diff -r 49de01238638 -r a3556d2adec9 src/oct-var-ref.h --- a/src/oct-var-ref.h Thu May 15 21:13:43 1997 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* - -Copyright (C) 1996, 1997 John W. Eaton - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#if !defined (octave_variable_reference_h) -#define octave_variable_reference_h 1 - -class octave_value; -class octave_value_list; - -#include - -#include "oct-obj.h" -#include "symtab.h" - -class -octave_variable_reference -{ -public: - - octave_variable_reference (octave_value *v = 0, - symbol_record::sv_function f = 0) - : val (v), idx (), chg_fcn (f), struct_elt_name () { } - - octave_variable_reference (octave_value *v, const string& nm, - symbol_record::sv_function f = 0) - : val (v), idx (), chg_fcn (f), struct_elt_name (nm) { } - - octave_variable_reference (const octave_variable_reference& vr) - : val (vr.val), idx (vr.idx), chg_fcn (vr.chg_fcn), - struct_elt_name (vr.struct_elt_name) { } - - octave_variable_reference& operator = (const octave_variable_reference& vr) - { - if (this != &vr) - { - val = vr.val; - idx = vr.idx; - chg_fcn = vr.chg_fcn; - struct_elt_name = vr.struct_elt_name; - } - - return *this; - } - - ~octave_variable_reference (void) { } - - bool is_defined (void) { return val->is_defined (); } - - bool is_undefined (void) { return val->is_undefined (); } - - bool is_map (void) { return val->is_map (); } - - void define (const octave_value& v) { *val = v; } - - void assign (octave_value::assign_op, const octave_value&); - - octave_variable_reference struct_elt_ref (const string& nm) - { return val->struct_elt_ref (nm); } - - void index (const octave_value_list& i) { idx = i; } - - void increment (void) { val->increment (); } - - void decrement (void) { val->decrement (); } - - octave_value value (void) - { - return struct_elt_name.empty () - ? (idx.empty () - ? *val - : val->do_index_op (idx)) - : (idx.empty () - ? val->do_struct_elt_index_op (struct_elt_name) - : val->do_struct_elt_index_op (struct_elt_name, idx)); - } - -private: - - octave_value *val; - - octave_value_list idx; - - symbol_record::sv_function chg_fcn; - - string struct_elt_name; -}; - -#endif - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ diff -r 49de01238638 -r a3556d2adec9 src/ov-base.cc --- a/src/ov-base.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/ov-base.cc Thu May 15 22:36:40 1997 +0000 @@ -35,7 +35,7 @@ #include "gripes.h" #include "oct-map.h" #include "oct-obj.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "ops.h" #include "ov-base.h" #include "ov-scalar.h" @@ -96,13 +96,13 @@ return octave_value (); } -octave_variable_reference +octave_lvalue octave_base_value::struct_elt_ref (octave_value *, const string&) { string nm = type_name (); error ("can't perform structure reference operations for %s type", nm.c_str ()); - return octave_variable_reference (); + return octave_lvalue (); } octave_value diff -r 49de01238638 -r a3556d2adec9 src/ov-base.h --- a/src/ov-base.h Thu May 15 21:13:43 1997 +0000 +++ b/src/ov-base.h Thu May 15 22:36:40 1997 +0000 @@ -82,8 +82,7 @@ octave_value do_struct_elt_index_op (const string& nm, bool silent); - octave_variable_reference - struct_elt_ref (octave_value *parent, const string& nm); + octave_lvalue struct_elt_ref (octave_value *parent, const string& nm); int rows (void) const { return -1; } diff -r 49de01238638 -r a3556d2adec9 src/ov-re-mat.cc --- a/src/ov-re-mat.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/ov-re-mat.cc Thu May 15 22:36:40 1997 +0000 @@ -36,7 +36,7 @@ #include "gripes.h" #include "oct-obj.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "ops.h" #include "ov-scalar.h" #include "ov-re-mat.h" @@ -249,10 +249,10 @@ return retval; } -octave_variable_reference +octave_lvalue octave_matrix::struct_elt_ref (octave_value *parent, const string& nm) { - return octave_variable_reference (parent, nm); + return octave_lvalue (parent, nm); } bool diff -r 49de01238638 -r a3556d2adec9 src/ov-re-mat.h --- a/src/ov-re-mat.h Thu May 15 21:13:43 1997 +0000 +++ b/src/ov-re-mat.h Thu May 15 22:36:40 1997 +0000 @@ -100,8 +100,7 @@ octave_value do_struct_elt_index_op (const string& nm, bool silent); - octave_variable_reference - struct_elt_ref (octave_value *parent, const string& nm); + octave_lvalue struct_elt_ref (octave_value *parent, const string& nm); int rows (void) const { return matrix.rows (); } int columns (void) const { return matrix.columns (); } diff -r 49de01238638 -r a3556d2adec9 src/ov-struct.cc --- a/src/ov-struct.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/ov-struct.cc Thu May 15 22:36:40 1997 +0000 @@ -31,7 +31,7 @@ #include #include "error.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "ov-struct.h" #include "unwind-prot.h" #include "variables.h" @@ -68,10 +68,10 @@ return retval; } -octave_variable_reference +octave_lvalue octave_struct::struct_elt_ref (octave_value *, const string& nm) { - return octave_variable_reference (&map [nm]); + return octave_lvalue (&map [nm]); } void diff -r 49de01238638 -r a3556d2adec9 src/ov-struct.h --- a/src/ov-struct.h Thu May 15 21:13:43 1997 +0000 +++ b/src/ov-struct.h Thu May 15 22:36:40 1997 +0000 @@ -79,8 +79,7 @@ octave_value do_struct_elt_index_op (const string& nm, bool silent); - octave_variable_reference - struct_elt_ref (octave_value *parent, const string& nm); + octave_lvalue struct_elt_ref (octave_value *parent, const string& nm); bool is_defined (void) const { return true; } diff -r 49de01238638 -r a3556d2adec9 src/ov.cc --- a/src/ov.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/ov.cc Thu May 15 22:36:40 1997 +0000 @@ -32,7 +32,7 @@ #include "str-vec.h" #include "oct-obj.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "ov.h" #include "ov-base.h" #include "ov-bool.h" @@ -559,18 +559,18 @@ rep->assign_struct_elt (op, elt_nm, idx, rhs); } -octave_variable_reference +octave_lvalue octave_value::struct_elt_ref (const string& nm) { return rep->struct_elt_ref (this, nm); } -octave_variable_reference +octave_lvalue octave_value::struct_elt_ref (octave_value *, const string&) { panic_impossible (); - return octave_variable_reference (); + return octave_lvalue (); } Octave_map diff -r 49de01238638 -r a3556d2adec9 src/ov.h --- a/src/ov.h Thu May 15 21:13:43 1997 +0000 +++ b/src/ov.h Thu May 15 22:36:40 1997 +0000 @@ -43,7 +43,7 @@ class octave_stream; class octave_function; class octave_value_list; -class octave_variable_reference; +class octave_lvalue; // Constants. @@ -244,9 +244,9 @@ bool silent = false) { return rep->do_struct_elt_index_op (nm, idx, silent); } - octave_variable_reference struct_elt_ref (const string& nm); + octave_lvalue struct_elt_ref (const string& nm); - virtual octave_variable_reference + virtual octave_lvalue struct_elt_ref (octave_value *parent, const string& nm); // Size. diff -r 49de01238638 -r a3556d2adec9 src/pt-cmd.cc --- a/src/pt-cmd.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-cmd.cc Thu May 15 22:36:40 1997 +0000 @@ -43,7 +43,7 @@ #include "error.h" #include "gripes.h" #include "oct-map.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "pt-cmd.h" #include "symtab.h" #include "ov.h" @@ -102,7 +102,7 @@ { octave_value init_val = expr->rvalue (); - octave_variable_reference ult = id->lvalue (); + octave_lvalue ult = id->lvalue (); ult.assign (octave_value::asn_eq, init_val); } @@ -141,7 +141,7 @@ { octave_value init_val = expr->rvalue (); - octave_variable_reference ult = id->lvalue (); + octave_lvalue ult = id->lvalue (); ult.assign (octave_value::asn_eq, init_val); } @@ -228,7 +228,7 @@ } inline void -tree_simple_for_command::do_for_loop_once (octave_variable_reference& ult, +tree_simple_for_command::do_for_loop_once (octave_lvalue& ult, const octave_value& rhs, bool& quit) { @@ -283,7 +283,7 @@ return; } - octave_variable_reference ult = lhs->lvalue (); + octave_lvalue ult = lhs->lvalue (); if (error_state) { @@ -403,8 +403,8 @@ } void -tree_complex_for_command::do_for_loop_once (octave_variable_reference &val_ref, - octave_variable_reference &key_ref, +tree_complex_for_command::do_for_loop_once (octave_lvalue &val_ref, + octave_lvalue &key_ref, const octave_value& val, const octave_value& key, bool& quit) @@ -452,11 +452,11 @@ Pix p = lhs->first (); tree_expression *elt = lhs->operator () (p); - octave_variable_reference val_ref = elt->lvalue (); + octave_lvalue val_ref = elt->lvalue (); lhs->next (p); elt = lhs->operator () (p); - octave_variable_reference key_ref = elt->lvalue (); + octave_lvalue key_ref = elt->lvalue (); Octave_map tmp_val (rhs.map_value ()); diff -r 49de01238638 -r a3556d2adec9 src/pt-cmd.h --- a/src/pt-cmd.h Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-cmd.h Thu May 15 22:36:40 1997 +0000 @@ -225,8 +225,8 @@ // List of commands to execute. tree_statement_list *list; - void do_for_loop_once (octave_variable_reference &ult, - const octave_value& rhs, bool& quit); + void do_for_loop_once (octave_lvalue &ult, const octave_value& rhs, + bool& quit); }; class @@ -266,10 +266,8 @@ // List of commands to execute. tree_statement_list *list; - void do_for_loop_once (octave_variable_reference &val_ref, - octave_variable_reference &key_ref, - const octave_value& val, - const octave_value& key, + void do_for_loop_once (octave_lvalue &val_ref, octave_lvalue &key_ref, + const octave_value& val, const octave_value& key, bool& quit); }; diff -r 49de01238638 -r a3556d2adec9 src/pt-exp-base.cc --- a/src/pt-exp-base.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-exp-base.cc Thu May 15 22:36:40 1997 +0000 @@ -35,7 +35,7 @@ #include "error.h" #include "pager.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "ov.h" #include "pt-exp-base.h" @@ -76,11 +76,11 @@ return octave_value_list (); } -octave_variable_reference +octave_lvalue tree_expression::lvalue (void) { ::error ("invalid lvalue function called in expression"); - return octave_variable_reference (); + return octave_lvalue (); } string diff -r 49de01238638 -r a3556d2adec9 src/pt-exp-base.h --- a/src/pt-exp-base.h Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-exp-base.h Thu May 15 22:36:40 1997 +0000 @@ -30,7 +30,7 @@ #include class octave_value; -class octave_variable_reference; +class octave_lvalue; #include "pt-base.h" @@ -80,7 +80,7 @@ virtual octave_value_list rvalue (int nargout); - virtual octave_variable_reference lvalue (void); + virtual octave_lvalue lvalue (void); int paren_count (void) const { return num_parens; } diff -r 49de01238638 -r a3556d2adec9 src/pt-exp.cc --- a/src/pt-exp.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-exp.cc Thu May 15 22:36:40 1997 +0000 @@ -37,7 +37,7 @@ #include "help.h" #include "input.h" #include "oct-obj.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "pager.h" #include "ov.h" #include "pt-exp.h" @@ -105,7 +105,7 @@ } else if (etype == increment || etype == decrement) { - octave_variable_reference ref = op->lvalue (); + octave_lvalue ref = op->lvalue (); if (! error_state) { @@ -220,7 +220,7 @@ } else if (etype == increment || etype == decrement) { - octave_variable_reference ref = op->lvalue (); + octave_lvalue ref = op->lvalue (); if (! error_state) { @@ -519,7 +519,7 @@ } else { - octave_variable_reference ult = lhs->lvalue (); + octave_lvalue ult = lhs->lvalue (); if (error_state) eval_error (); @@ -789,10 +789,10 @@ return retval; } -octave_variable_reference +octave_lvalue tree_index_expression::lvalue (void) { - octave_variable_reference retval; + octave_lvalue retval; if (! error_state) { @@ -898,7 +898,7 @@ if (lhs_elt) { - octave_variable_reference ult = lhs_elt->lvalue (); + octave_lvalue ult = lhs_elt->lvalue (); if (error_state) eval_error (); diff -r 49de01238638 -r a3556d2adec9 src/pt-exp.h --- a/src/pt-exp.h Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-exp.h Thu May 15 22:36:40 1997 +0000 @@ -39,7 +39,7 @@ class octave_value; class octave_value_list; -class octave_variable_reference; +class octave_lvalue; #include "oct-obj.h" #include "pt-exp-base.h" @@ -286,12 +286,10 @@ private: - void do_assign (octave_variable_reference& ult, - const octave_value_list& args, + void do_assign (octave_lvalue& ult, const octave_value_list& args, const octave_value& rhs_val); - void do_assign (octave_variable_reference& ult, - const octave_value& rhs_val); + void do_assign (octave_lvalue& ult, const octave_value& rhs_val); // The left hand side of the assignment. tree_expression *lhs; @@ -383,7 +381,7 @@ octave_value_list rvalue (int nargout); - octave_variable_reference lvalue (void); + octave_lvalue lvalue (void); void eval_error (void); diff -r 49de01238638 -r a3556d2adec9 src/pt-id.cc --- a/src/pt-id.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-id.cc Thu May 15 22:36:40 1997 +0000 @@ -30,7 +30,7 @@ #include "error.h" #include "oct-obj.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "pager.h" #include "pt-const.h" #include "pt-id.h" @@ -196,7 +196,7 @@ return retval; } -octave_variable_reference +octave_lvalue tree_identifier::lvalue (void) { return sym->variable_reference (); diff -r 49de01238638 -r a3556d2adec9 src/pt-id.h --- a/src/pt-id.h Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-id.h Thu May 15 22:36:40 1997 +0000 @@ -83,7 +83,7 @@ octave_value_list rvalue (int nargout); - octave_variable_reference lvalue (void); + octave_lvalue lvalue (void); void eval_undefined_error (void); diff -r 49de01238638 -r a3556d2adec9 src/pt-indir.cc --- a/src/pt-indir.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-indir.cc Thu May 15 22:36:40 1997 +0000 @@ -32,7 +32,7 @@ #include "gripes.h" #include "oct-map.h" #include "oct-obj.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "pager.h" #include "pt-const.h" #include "pt-id.h" @@ -95,10 +95,10 @@ return retval; } -octave_variable_reference +octave_lvalue tree_indirect_ref::lvalue (void) { - octave_variable_reference tmp = expr->lvalue (); + octave_lvalue tmp = expr->lvalue (); if (tmp.is_undefined () || ! tmp.is_map ()) tmp.define (Octave_map ()); diff -r 49de01238638 -r a3556d2adec9 src/pt-indir.h --- a/src/pt-indir.h Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-indir.h Thu May 15 22:36:40 1997 +0000 @@ -65,7 +65,7 @@ octave_value_list rvalue (int nargout); - octave_variable_reference lvalue (void); + octave_lvalue lvalue (void); tree_expression *expression (void) { return expr; } diff -r 49de01238638 -r a3556d2adec9 src/pt-misc.cc --- a/src/pt-misc.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/pt-misc.cc Thu May 15 22:36:40 1997 +0000 @@ -44,7 +44,7 @@ #include "error.h" #include "input.h" #include "oct-obj.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "ov-usr-fcn.h" #include "ov.h" #include "pager.h" @@ -354,7 +354,7 @@ if (! elt->is_defined ()) { - octave_variable_reference tmp = elt->lvalue (); + octave_lvalue tmp = elt->lvalue (); tmp.assign (octave_value::asn_eq, val); } @@ -377,7 +377,7 @@ { tree_identifier *elt = this->operator () (p); - octave_variable_reference ref = elt->lvalue (); + octave_lvalue ref = elt->lvalue (); if (i < nargin) { diff -r 49de01238638 -r a3556d2adec9 src/symtab.cc --- a/src/symtab.cc Thu May 15 21:13:43 1997 +0000 +++ b/src/symtab.cc Thu May 15 22:36:40 1997 +0000 @@ -34,7 +34,7 @@ #include "str-vec.h" #include "error.h" -#include "oct-var-ref.h" +#include "oct-lvalue.h" #include "ov.h" #include "symtab.h" #include "utils.h" @@ -542,7 +542,7 @@ return is_variable () ? def () : foo; } -octave_variable_reference +octave_lvalue symbol_record::variable_reference (void) { if (is_function ()) @@ -560,7 +560,7 @@ } } - return octave_variable_reference (&(def ()), sv_fcn); + return octave_lvalue (&(def ()), sv_fcn); } symbol_record * diff -r 49de01238638 -r a3556d2adec9 src/symtab.h --- a/src/symtab.h Thu May 15 21:13:43 1997 +0000 +++ b/src/symtab.h Thu May 15 22:36:40 1997 +0000 @@ -39,7 +39,7 @@ #define HASH_TABLE_SIZE 1024 #define HASH_MASK (HASH_TABLE_SIZE - 1) -class octave_variable_reference; +class octave_lvalue; class string_vector; @@ -185,7 +185,7 @@ bool is_static (void) const; octave_value& variable_value (void); - octave_variable_reference variable_reference (void); + octave_lvalue variable_reference (void); symbol_record *next (void) const;