annotate libinterp/parse-tree/pt-id.h @ 22869:f75d289645ec

make deleted functions public * octave-gui.h, resource-manager.h, shortcut-manager.h, base-text-renderer.h, c-file-ptr-stream.h, dynamic-ld.cc, dynamic-ld.h, event-queue.h, ft-text-renderer.cc, gl-render.cc, gl-render.h, graphics.cc, graphics.in.h, interpreter.h, mex.cc, mxarray.in.h, oct-fstrm.h, oct-iostrm.h, oct-prcstrm.h, oct-procbuf.h, oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.h, octave-link.h, pager.h, profiler.h, sighandlers.cc, symtab.h, text-renderer.h, zfstream.h, __init_fltk__.cc, ov-builtin.h, ov-dld-fcn.h, ov-fcn.h, ov-mex-fcn.h, ov-typeinfo.h, ov-usr-fcn.h, octave.h, lex.h, parse.h, pt-arg-list.h, pt-array-list.h, pt-assign.h, pt-binop.h, pt-bp.h, pt-cell.h, pt-check.h, pt-classdef.h, pt-cmd.h, pt-colon.h, pt-const.h, pt-decl.h, pt-eval.h, pt-except.h, pt-exp.h, pt-fcn-handle.h, pt-funcall.h, pt-id.h, pt-idx.h, pt-jump.h, pt-loop.h, pt-mat.h, pt-misc.h, pt-pr-code.h, pt-select.h, pt-stmt.h, pt-unop.h, pt-walk.h, pt.h, token.h, Array.cc, idx-vector.h, oct-fftw.h, sparse-chol.cc, sparse-qr.cc, file-ops.h, mach-info.h, oct-env.h, action-container.h, cmd-edit.cc, cmd-edit.h, cmd-hist.h, oct-locbuf.h, oct-mutex.h, oct-shlib.cc, oct-sort.h, pathsearch.h, singleton-cleanup.h, unwind-prot.h, url-transfer.cc, url-transfer.h: Declare deleted copy constructors and assignment operators public.
author John W. Eaton <jwe@octave.org>
date Tue, 06 Dec 2016 12:40:45 -0500
parents 87e3163f6c87
children 4e3d47dc7e25
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
1 /*
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
2
22323
bac0d6f07a3e maint: Update copyright notices for 2016.
John W. Eaton <jwe@octave.org>
parents: 21333
diff changeset
3 Copyright (C) 1996-2016 John W. Eaton
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
4
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
6
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
8 under the terms of the GNU General Public License as published by
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
9 the Free Software Foundation; either version 3 of the License, or
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
10 (at your option) any later version.
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
11
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
12 Octave is distributed in the hope that it will be useful, but
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
13 WITHOUT ANY WARRANTY; without even the implied warranty of
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
15 GNU General Public License for more details.
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
16
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5861
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5861
diff changeset
19 <http://www.gnu.org/licenses/>.
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
20
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
21 */
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
22
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 20542
diff changeset
23 #if ! defined (octave_pt_id_h)
17822
ebb3ef964372 maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents: 17787
diff changeset
24 #define octave_pt_id_h 1
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
25
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
26 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
27
8950
d865363208d6 include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents: 8920
diff changeset
28 #include <iosfwd>
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
29 #include <string>
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
30
2943
e6dfc3ea6299 [project @ 1997-05-08 02:31:59 by jwe]
jwe
parents: 2887
diff changeset
31 class octave_value;
e6dfc3ea6299 [project @ 1997-05-08 02:31:59 by jwe]
jwe
parents: 2887
diff changeset
32 class octave_value_list;
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
33 class octave_function;
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
34
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
35 class tree_walker;
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
36
15037
56b8eb7c9c04 improvements in parsing classdef
John W. Eaton <jwe@octave.org>
parents: 14982
diff changeset
37 #include "oct-lvalue.h"
7677
db02cc0ba8f2 handle breakpoints in tree_identifier::do_lookup
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
38 #include "pt-bp.h"
2980
cd5ad3fd8049 [project @ 1997-05-16 01:12:13 by jwe]
jwe
parents: 2979
diff changeset
39 #include "pt-exp.h"
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
40 #include "symtab.h"
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
41
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
42 // Symbols from the symbol table.
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
43
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
44 class
2971
f2be17e6f1ea [project @ 1997-05-15 18:55:44 by jwe]
jwe
parents: 2960
diff changeset
45 tree_identifier : public tree_expression
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
46 {
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
47 friend class tree_index_expression;
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
48
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
49 public:
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
50
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
51 tree_identifier (int l = -1, int c = -1)
14912
3d3c002ccc60 Add symbol_table::symbol_record_ref
Max Brister <max@2bass.com>
parents: 14544
diff changeset
52 : tree_expression (l, c) { }
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
53
7752
40c428ea3408 initial implementation of dbup and dbdown
John W. Eaton <jwe@octave.org>
parents: 7677
diff changeset
54 tree_identifier (const symbol_table::symbol_record& s,
10313
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10206
diff changeset
55 int l = -1, int c = -1,
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10206
diff changeset
56 symbol_table::scope_id sc = symbol_table::current_scope ())
14912
3d3c002ccc60 Add symbol_table::symbol_record_ref
Max Brister <max@2bass.com>
parents: 14544
diff changeset
57 : tree_expression (l, c), sym (s, sc) { }
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
58
22869
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22868
diff changeset
59 // No copying!
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22868
diff changeset
60
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22868
diff changeset
61 tree_identifier (const tree_identifier&) = delete;
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22868
diff changeset
62
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22868
diff changeset
63 tree_identifier& operator = (const tree_identifier&) = delete;
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22868
diff changeset
64
22868
87e3163f6c87 use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents: 22865
diff changeset
65 ~tree_identifier (void) = default;
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
66
17355
f0edd6c752e9 don't convert "end" token to "__end__" for indexing
John W. Eaton <jwe@octave.org>
parents: 16442
diff changeset
67 bool has_magic_end (void) const { return (name () == "end"); }
4267
7cd865a8c815 [project @ 2003-01-03 15:27:05 by jwe]
jwe
parents: 4192
diff changeset
68
3933
f9ea3dcf58ee [project @ 2002-05-15 03:21:00 by jwe]
jwe
parents: 3523
diff changeset
69 bool is_identifier (void) const { return true; }
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
70
7752
40c428ea3408 initial implementation of dbup and dbdown
John W. Eaton <jwe@octave.org>
parents: 7677
diff changeset
71 // The name doesn't change with scope, so use sym instead of
40c428ea3408 initial implementation of dbup and dbdown
John W. Eaton <jwe@octave.org>
parents: 7677
diff changeset
72 // accessing it through sym so that this function may remain const.
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
73 std::string name (void) const { return sym.name (); }
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
74
14912
3d3c002ccc60 Add symbol_table::symbol_record_ref
Max Brister <max@2bass.com>
parents: 14544
diff changeset
75 bool is_defined (void) { return sym->is_defined (); }
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
76
20542
dd6345fd8a97 use exceptions for better invalid index error reporting (bug #45957)
Lachlan Andrew <lachlanbis@gmail.com>
parents: 20428
diff changeset
77 virtual bool is_variable (void) const { return sym->is_variable (); }
10206
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
78
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
79 virtual bool is_black_hole (void) { return false; }
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
80
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
81 // Try to find a definition for an identifier. Here's how:
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
82 //
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
83 // * If the identifier is already defined and is a function defined
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
84 // in an function file that has been modified since the last time
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
85 // we parsed it, parse it again.
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
86 //
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
87 // * If the identifier is not defined, try to find a builtin
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
88 // variable or an already compiled function with the same name.
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
89 //
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
90 // * If the identifier is still undefined, try looking for an
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
91 // function file to parse.
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
92 //
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
93 // * On systems that support dynamic linking, we prefer .oct files,
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
94 // then .mex files, then .m files.
2971
f2be17e6f1ea [project @ 1997-05-15 18:55:44 by jwe]
jwe
parents: 2960
diff changeset
95
f2be17e6f1ea [project @ 1997-05-15 18:55:44 by jwe]
jwe
parents: 2960
diff changeset
96 octave_value
9445
c5f03874ea2a simplify symbol_table::find and associated functions
Jaroslav Hajek <highegg@gmail.com>
parents: 8950
diff changeset
97 do_lookup (const octave_value_list& args = octave_value_list ())
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
98 {
14912
3d3c002ccc60 Add symbol_table::symbol_record_ref
Max Brister <max@2bass.com>
parents: 14544
diff changeset
99 return sym->find (args);
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
100 }
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
101
14912
3d3c002ccc60 Add symbol_table::symbol_record_ref
Max Brister <max@2bass.com>
parents: 14544
diff changeset
102 void mark_global (void) { sym->mark_global (); }
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
103
14912
3d3c002ccc60 Add symbol_table::symbol_record_ref
Max Brister <max@2bass.com>
parents: 14544
diff changeset
104 void mark_as_static (void) { sym->init_persistent (); }
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
105
14912
3d3c002ccc60 Add symbol_table::symbol_record_ref
Max Brister <max@2bass.com>
parents: 14544
diff changeset
106 void mark_as_formal_parameter (void) { sym->mark_formal (); }
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
107
3010
1aeb8869e464 [project @ 1997-06-01 19:24:02 by jwe]
jwe
parents: 2988
diff changeset
108 // We really need to know whether this symbol referst to a variable
1aeb8869e464 [project @ 1997-06-01 19:24:02 by jwe]
jwe
parents: 2988
diff changeset
109 // or a function, but we may not know that yet.
1aeb8869e464 [project @ 1997-06-01 19:24:02 by jwe]
jwe
parents: 2988
diff changeset
110
3933
f9ea3dcf58ee [project @ 2002-05-15 03:21:00 by jwe]
jwe
parents: 3523
diff changeset
111 bool lvalue_ok (void) const { return true; }
3010
1aeb8869e464 [project @ 1997-06-01 19:24:02 by jwe]
jwe
parents: 2988
diff changeset
112
8658
73c4516fae10 New evaluator and debugger derived from tree-walker class
John W. Eaton <jwe@octave.org>
parents: 7767
diff changeset
113 octave_value rvalue1 (int nargout = 1);
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
114
16091
1785493171ac pass lvalue_list to more subsref calls (bug #38374)
John W. Eaton <jwe@octave.org>
parents: 15236
diff changeset
115 octave_value_list rvalue (int nargout)
1785493171ac pass lvalue_list to more subsref calls (bug #38374)
John W. Eaton <jwe@octave.org>
parents: 15236
diff changeset
116 {
1785493171ac pass lvalue_list to more subsref calls (bug #38374)
John W. Eaton <jwe@octave.org>
parents: 15236
diff changeset
117 return rvalue (nargout, 0);
1785493171ac pass lvalue_list to more subsref calls (bug #38374)
John W. Eaton <jwe@octave.org>
parents: 15236
diff changeset
118 }
1785493171ac pass lvalue_list to more subsref calls (bug #38374)
John W. Eaton <jwe@octave.org>
parents: 15236
diff changeset
119
1785493171ac pass lvalue_list to more subsref calls (bug #38374)
John W. Eaton <jwe@octave.org>
parents: 15236
diff changeset
120 octave_value_list rvalue (int nargout,
1785493171ac pass lvalue_list to more subsref calls (bug #38374)
John W. Eaton <jwe@octave.org>
parents: 15236
diff changeset
121 const std::list<octave_lvalue> *lvalue_list);
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
122
2979
a3556d2adec9 [project @ 1997-05-15 22:35:37 by jwe]
jwe
parents: 2971
diff changeset
123 octave_lvalue lvalue (void);
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
124
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
125 void eval_undefined_error (void);
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
126
15236
44d6ffdf9479 Disallow new variables in nested functions (bug #36271)
Max Brister <max@2bass.com>
parents: 15195
diff changeset
127 void static_workspace_error (void)
44d6ffdf9479 Disallow new variables in nested functions (bug #36271)
Max Brister <max@2bass.com>
parents: 15195
diff changeset
128 {
20428
7ac907da9fba Use error() rather than ::error() unless explicitly required.
Rik <rik@octave.org>
parents: 19697
diff changeset
129 error ("can not add variable \"%s\" to a static workspace",
7ac907da9fba Use error() rather than ::error() unless explicitly required.
Rik <rik@octave.org>
parents: 19697
diff changeset
130 name ().c_str ());
15236
44d6ffdf9479 Disallow new variables in nested functions (bug #36271)
Max Brister <max@2bass.com>
parents: 15195
diff changeset
131 }
44d6ffdf9479 Disallow new variables in nested functions (bug #36271)
Max Brister <max@2bass.com>
parents: 15195
diff changeset
132
7767
71f068b22fcc scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents: 7753
diff changeset
133 tree_identifier *dup (symbol_table::scope_id scope,
10313
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10206
diff changeset
134 symbol_table::context_id context) const;
5861
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5307
diff changeset
135
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
136 void accept (tree_walker& tw);
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
137
14930
7d44ed216b98 Rename symbol_table::symbol_record_ref to symbol_table::symbol_reference
Max Brister <max@2bass.com>
parents: 14913
diff changeset
138 symbol_table::symbol_reference symbol (void) const
14913
c7071907a641 Use symbol_record_ref instead of names in JIT
Max Brister <max@2bass.com>
parents: 14912
diff changeset
139 {
c7071907a641 Use symbol_record_ref instead of names in JIT
Max Brister <max@2bass.com>
parents: 14912
diff changeset
140 return sym;
c7071907a641 Use symbol_record_ref instead of names in JIT
Max Brister <max@2bass.com>
parents: 14912
diff changeset
141 }
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
142 private:
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
143
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
144 // The symbol record that this identifier references.
14930
7d44ed216b98 Rename symbol_table::symbol_record_ref to symbol_table::symbol_reference
Max Brister <max@2bass.com>
parents: 14913
diff changeset
145 symbol_table::symbol_reference sym;
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
146 };
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
147
10206
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
148 class tree_black_hole : public tree_identifier
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
149 {
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
150 public:
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
151
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
152 tree_black_hole (int l = -1, int c = -1)
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
153 : tree_identifier (l, c) { }
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
154
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
155 std::string name (void) const { return "~"; }
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
156
20542
dd6345fd8a97 use exceptions for better invalid index error reporting (bug #45957)
Lachlan Andrew <lachlanbis@gmail.com>
parents: 20428
diff changeset
157 bool is_variable (void) const { return false; }
10206
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
158
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
159 bool is_black_hole (void) { return true; }
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
160
21333
c4690d9ff566 avoid warnings about overloading virtual functions from a base class
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
161 tree_black_hole *dup (symbol_table::scope_id,
c4690d9ff566 avoid warnings about overloading virtual functions from a base class
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
162 symbol_table::context_id) const
c4690d9ff566 avoid warnings about overloading virtual functions from a base class
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
163 {
c4690d9ff566 avoid warnings about overloading virtual functions from a base class
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
164 return new tree_black_hole;
c4690d9ff566 avoid warnings about overloading virtual functions from a base class
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
165 }
10206
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
166
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
167 octave_lvalue lvalue (void)
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
168 {
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
169 return octave_lvalue (); // black hole lvalue
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
170 }
10206
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
171 };
37a08e0ce2dc support Matlab-style empty output/input arguments
Jaroslav Hajek <highegg@gmail.com>
parents: 10160
diff changeset
172
2887
4b71bb90c388 [project @ 1997-04-28 01:20:55 by jwe]
jwe
parents:
diff changeset
173 #endif
22407
34ce5be04942 maint: Style check C++ code in libinterp/.
Rik <rik@octave.org>
parents: 22323
diff changeset
174