Mercurial > hg > octave-lyh
annotate libinterp/parse-tree/pt-mat.h @ 16177:a7669b4d27f6
eliminate global global_command variable
* toplev.h, toplev.cc (global_command): Delete.
* parse.h, oct-parse.in.yy (octave_parser::stmt_list):
New member variable.
(octave_parser::octave_parser): Initialize it to zero.
(octave_parser:~octave_parser): Delete it.
(octave_parser::reset): Delete it and set it to zero.
* toplev.cc (main_loop): Use curr_parser->stmt_list instead of
global_command.
* input.cc (get_debug_input): Likewise.
* oct-parse.in.yy (eval_string, parse_fcn_file): Likewise.
(ABORT_PARSE): Don't set global_command to zero.
(input): Set curr_parser->stmt_list instead of global_command.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 02 Mar 2013 19:31:26 -0500 |
parents | 2fc554ffbc28 |
children | 70f465930546 |
rev | line source |
---|---|
1739 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11586
diff
changeset
|
3 Copyright (C) 1996-2012 John W. Eaton |
1739 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
1739 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
1739 | 20 |
21 */ | |
22 | |
23 #if !defined (octave_tree_mat_h) | |
24 #define octave_tree_mat_h 1 | |
25 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
26 #include <iosfwd> |
1739 | 27 |
2086 | 28 class octave_value; |
2982 | 29 class octave_value_list; |
30 class tree_argument_list; | |
1739 | 31 |
2124 | 32 class tree_walker; |
33 | |
4219 | 34 #include "base-list.h" |
1739 | 35 #include "pt-exp.h" |
7336 | 36 #include "symtab.h" |
1739 | 37 |
38 // General matrices. This allows us to construct matrices from | |
39 // other matrices, variables, and functions. | |
40 | |
41 class | |
4219 | 42 tree_matrix : public tree_expression, |
10313 | 43 public octave_base_list<tree_argument_list *> |
1739 | 44 { |
45 public: | |
46 | |
4587 | 47 tree_matrix (tree_argument_list *row = 0, int l = -1, int c = -1) |
48 : tree_expression (l, c) | |
2990 | 49 { |
50 if (row) | |
4219 | 51 append (row); |
2990 | 52 } |
1827 | 53 |
2990 | 54 ~tree_matrix (void); |
1827 | 55 |
4267 | 56 bool has_magic_end (void) const; |
57 | |
2529 | 58 bool all_elements_are_constant (void) const; |
1827 | 59 |
3933 | 60 bool rvalue_ok (void) const { return true; } |
2971 | 61 |
8658
73c4516fae10
New evaluator and debugger derived from tree-walker class
John W. Eaton <jwe@octave.org>
parents:
8113
diff
changeset
|
62 octave_value rvalue1 (int nargout = 1); |
2971 | 63 |
64 octave_value_list rvalue (int nargout); | |
1739 | 65 |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
66 tree_expression *dup (symbol_table::scope_id scope, |
10313 | 67 symbol_table::context_id context) const; |
5861 | 68 |
2124 | 69 void accept (tree_walker& tw); |
2988 | 70 |
71 private: | |
72 | |
73 // No copying! | |
74 | |
75 tree_matrix (const tree_matrix&); | |
76 | |
77 tree_matrix& operator = (const tree_matrix&); | |
1739 | 78 }; |
79 | |
3836 | 80 // The character to fill with when creating string arrays. |
81 extern char Vstring_fill_char; | |
82 | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
83 extern std::string |
8107
8655dc0906e6
Special case single type conacation in Fcat. Rework cell2mat to take advantage
David Bateman <dbateman@free.fr>
parents:
7767
diff
changeset
|
84 get_concat_class (const std::string& c1, const std::string& c2); |
8655dc0906e6
Special case single type conacation in Fcat. Rework cell2mat to take advantage
David Bateman <dbateman@free.fr>
parents:
7767
diff
changeset
|
85 |
8655dc0906e6
Special case single type conacation in Fcat. Rework cell2mat to take advantage
David Bateman <dbateman@free.fr>
parents:
7767
diff
changeset
|
86 extern void |
8655dc0906e6
Special case single type conacation in Fcat. Rework cell2mat to take advantage
David Bateman <dbateman@free.fr>
parents:
7767
diff
changeset
|
87 maybe_warn_string_concat (bool all_dq_strings_p, bool all_sq_strings_p); |
8655dc0906e6
Special case single type conacation in Fcat. Rework cell2mat to take advantage
David Bateman <dbateman@free.fr>
parents:
7767
diff
changeset
|
88 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
89 extern std::string |
8113
38a797766a2a
Special case single type conacation in Fcat. Rework cell2mat to take advantage
David Bateman <dbateman@free.fr>
parents:
8107
diff
changeset
|
90 get_concat_class (const std::string& c1, const std::string& c2); |
38a797766a2a
Special case single type conacation in Fcat. Rework cell2mat to take advantage
David Bateman <dbateman@free.fr>
parents:
8107
diff
changeset
|
91 |
38a797766a2a
Special case single type conacation in Fcat. Rework cell2mat to take advantage
David Bateman <dbateman@free.fr>
parents:
8107
diff
changeset
|
92 extern void |
38a797766a2a
Special case single type conacation in Fcat. Rework cell2mat to take advantage
David Bateman <dbateman@free.fr>
parents:
8107
diff
changeset
|
93 maybe_warn_string_concat (bool all_dq_strings_p, bool all_sq_strings_p); |
38a797766a2a
Special case single type conacation in Fcat. Rework cell2mat to take advantage
David Bateman <dbateman@free.fr>
parents:
8107
diff
changeset
|
94 |
1739 | 95 #endif |