annotate libinterp/parse-tree/pt-loop.h @ 27923:bd51beb6205e

update formatting of copyright notices * Use <https://octave.org/copyright/> instead of <https://octave.org/COPYRIGHT.html/>. * For consistency with other comments in the Octave sources, use C++-style comments for copyright blocks in C and C++ files. * Use delimiters above and below copyright blocks that are appropriate for the language used in the file. * Eliminate extra spacing inside copyright blocks. * lex.ll (looks_like_copyright): Also allow newlines and carriage returns before the word "Copyright". * scripts/mk-doc.pl (gethelp): Also skip empty comment lines. * bp-table.cc, type.m: Adjust tests.
author John W. Eaton <jwe@octave.org>
date Wed, 08 Jan 2020 11:59:41 -0500
parents 1891570abac8
children 0a5b15007766
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ////////////////////////////////////////////////////////////////////////
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
3 // Copyright (C) 1996-2020 The Octave Project Developers
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 // See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 // distribution or <https://octave.org/copyright/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
8 // This file is part of Octave.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
9 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
10 // Octave is free software: you can redistribute it and/or modify it
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
11 // under the terms of the GNU General Public License as published by
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
12 // the Free Software Foundation, either version 3 of the License, or
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
13 // (at your option) any later version.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
14 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
15 // Octave is distributed in the hope that it will be useful, but
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
18 // GNU General Public License for more details.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
19 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
20 // You should have received a copy of the GNU General Public License
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
21 // along with Octave; see the file COPYING. If not, see
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
22 // <https://www.gnu.org/licenses/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ////////////////////////////////////////////////////////////////////////
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
25
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 19697
diff changeset
26 #if ! defined (octave_pt_loop_h)
17822
ebb3ef964372 maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents: 17787
diff changeset
27 #define octave_pt_loop_h 1
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
28
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
29 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
30
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
31 class octave_value;
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
32
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
33 #include "pt-cmd.h"
23435
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
34 #include "pt-walk.h"
24235
176e5f761039 pt-loop.cc: Add missing header pt-jit.h
Julien Bect <jbect@users.sourceforge.net>
parents: 23796
diff changeset
35 #include "pt-jit.h"
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
36
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
37 namespace octave
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
38 {
24249
790b4389cfb4 jit: Use MJCIT instead of the old JIT
Julien Bect <jbect@users.sourceforge.net>
parents: 24239
diff changeset
39 class jit_info;
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
40 class tree_argument_list;
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
41 class tree_expression;
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
42 class tree_statement_list;
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
43
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
44 // While.
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
45
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
46 class tree_while_command : public tree_command
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
47 {
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
48 public:
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
49
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
50 tree_while_command (int l = -1, int c = -1)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
51 : tree_command (l, c), m_expr (nullptr), m_list (nullptr),
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
52 m_lead_comm (nullptr), m_trail_comm (nullptr)
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
53 #if defined (HAVE_LLVM)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
54 , m_compiled (nullptr)
15023
75d1bc2fd6d2 Compile top level while loops in JIT.
Max Brister <max@2bass.com>
parents: 14920
diff changeset
55 #endif
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
56 { }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
57
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
58 tree_while_command (tree_expression *e,
23750
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
59 comment_list *lc = nullptr,
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
60 comment_list *tc = nullptr,
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
61 int l = -1, int c = -1)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
62 : tree_command (l, c), m_expr (e), m_list (nullptr),
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
63 m_lead_comm (lc), m_trail_comm (tc)
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
64 #if defined (HAVE_LLVM)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
65 , m_compiled (nullptr)
15023
75d1bc2fd6d2 Compile top level while loops in JIT.
Max Brister <max@2bass.com>
parents: 14920
diff changeset
66 #endif
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
67 { }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
68
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
69 tree_while_command (tree_expression *e, tree_statement_list *lst,
23750
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
70 comment_list *lc = nullptr,
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
71 comment_list *tc = nullptr,
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
72 int l = -1, int c = -1)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
73 : tree_command (l, c), m_expr (e), m_list (lst), m_lead_comm (lc),
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
74 m_trail_comm (tc)
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
75 #if defined (HAVE_LLVM)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
76 , m_compiled (nullptr)
15023
75d1bc2fd6d2 Compile top level while loops in JIT.
Max Brister <max@2bass.com>
parents: 14920
diff changeset
77 #endif
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
78 { }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
79
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
80 // No copying!
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
81
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
82 tree_while_command (const tree_while_command&) = delete;
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
83
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
84 tree_while_command& operator = (const tree_while_command&) = delete;
22869
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22868
diff changeset
85
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
86 ~tree_while_command (void);
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
87
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
88 tree_expression * condition (void) { return m_expr; }
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3485
diff changeset
89
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
90 tree_statement_list * body (void) { return m_list; }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
91
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
92 comment_list * leading_comment (void) { return m_lead_comm; }
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3485
diff changeset
93
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
94 comment_list * trailing_comment (void) { return m_trail_comm; }
5861
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5307
diff changeset
95
23435
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
96 void accept (tree_walker& tw)
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
97 {
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
98 tw.visit_while_command (*this);
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
99 }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
100
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
101 #if defined (HAVE_LLVM)
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
102 // some functions use by tree_jit
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
103 jit_info * get_info (void) const { return m_compiled; }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
104
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
105 void stash_info (jit_info *jinfo) { m_compiled = jinfo; }
15023
75d1bc2fd6d2 Compile top level while loops in JIT.
Max Brister <max@2bass.com>
parents: 14920
diff changeset
106 #endif
75d1bc2fd6d2 Compile top level while loops in JIT.
Max Brister <max@2bass.com>
parents: 14920
diff changeset
107
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
108 protected:
2988
daa1ed1f5462 [project @ 1997-05-16 07:23:15 by jwe]
jwe
parents: 2982
diff changeset
109
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
110 // Expression to test.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
111 tree_expression *m_expr;
2988
daa1ed1f5462 [project @ 1997-05-16 07:23:15 by jwe]
jwe
parents: 2982
diff changeset
112
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
113 // List of commands to execute.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
114 tree_statement_list *m_list;
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
115
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
116 // Comment preceding WHILE token.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
117 comment_list *m_lead_comm;
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3485
diff changeset
118
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
119 // Comment preceding ENDWHILE token.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
120 comment_list *m_trail_comm;
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
121
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
122 private:
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
123
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
124 #if defined (HAVE_LLVM)
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
125 // compiled version of the loop
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
126 jit_info *m_compiled;
15023
75d1bc2fd6d2 Compile top level while loops in JIT.
Max Brister <max@2bass.com>
parents: 14920
diff changeset
127 #endif
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
128 };
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
129
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
130 // Do-Until.
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
131
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
132 class tree_do_until_command : public tree_while_command
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
133 {
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
134 public:
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
135
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
136 tree_do_until_command (int l = -1, int c = -1)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
137 : tree_while_command (l, c)
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
138 { }
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
139
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
140 tree_do_until_command (tree_expression *e,
23750
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
141 comment_list *lc = nullptr,
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
142 comment_list *tc = nullptr,
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
143 int l = -1, int c = -1)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
144 : tree_while_command (e, lc, tc, l, c)
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
145 { }
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
146
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
147 tree_do_until_command (tree_expression *e, tree_statement_list *lst,
23750
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
148 comment_list *lc = nullptr,
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
149 comment_list *tc = nullptr,
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
150 int l = -1, int c = -1)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
151 : tree_while_command (e, lst, lc, tc, l, c)
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
152 { }
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
153
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
154 // No copying!
5861
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5307
diff changeset
155
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
156 tree_do_until_command (const tree_do_until_command&) = delete;
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
157
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
158 tree_do_until_command& operator = (const tree_do_until_command&) = delete;
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
159
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
160 ~tree_do_until_command (void) = default;
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 2988
diff changeset
161
23435
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
162 void accept (tree_walker& tw)
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
163 {
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
164 tw.visit_do_until_command (*this);
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
165 }
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
166 };
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
167
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
168 // For.
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
169
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
170 class tree_simple_for_command : public tree_command
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
171 {
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
172 public:
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
173
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
174 tree_simple_for_command (int l = -1, int c = -1)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
175 : tree_command (l, c), m_parallel (false), m_lhs (nullptr),
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
176 m_expr (nullptr), m_maxproc (nullptr), m_list (nullptr),
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
177 m_lead_comm (nullptr), m_trail_comm (nullptr)
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
178 #if defined (HAVE_LLVM)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
179 , m_compiled (nullptr)
15023
75d1bc2fd6d2 Compile top level while loops in JIT.
Max Brister <max@2bass.com>
parents: 14920
diff changeset
180 #endif
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
181 { }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
182
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
183 tree_simple_for_command (bool parallel_arg, tree_expression *le,
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
184 tree_expression *re,
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
185 tree_expression *maxproc_arg,
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
186 tree_statement_list *lst,
23750
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
187 comment_list *lc = nullptr,
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
188 comment_list *tc = nullptr,
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
189 int l = -1, int c = -1)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
190 : tree_command (l, c), m_parallel (parallel_arg), m_lhs (le),
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
191 m_expr (re), m_maxproc (maxproc_arg), m_list (lst),
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
192 m_lead_comm (lc), m_trail_comm (tc)
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
193 #if defined (HAVE_LLVM)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
194 , m_compiled (0)
15023
75d1bc2fd6d2 Compile top level while loops in JIT.
Max Brister <max@2bass.com>
parents: 14920
diff changeset
195 #endif
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
196 { }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
197
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
198 // No copying!
22869
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22868
diff changeset
199
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
200 tree_simple_for_command (const tree_simple_for_command&) = delete;
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
201
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
202 tree_simple_for_command& operator = (const tree_simple_for_command&) = delete;
22869
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22868
diff changeset
203
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
204 ~tree_simple_for_command (void);
13245
027a2186cd90 parfor keyword and infrastructure, but handle parfor as normal for loop for now
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
205
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
206 bool in_parallel (void) { return m_parallel; }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
207
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
208 tree_expression * left_hand_side (void) { return m_lhs; }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
209
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
210 tree_expression * control_expr (void) { return m_expr; }
13245
027a2186cd90 parfor keyword and infrastructure, but handle parfor as normal for loop for now
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
211
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
212 tree_expression * maxproc_expr (void) { return m_maxproc; }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
213
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
214 tree_statement_list * body (void) { return m_list; }
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3485
diff changeset
215
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
216 comment_list * leading_comment (void) { return m_lead_comm; }
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3485
diff changeset
217
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
218 comment_list * trailing_comment (void) { return m_trail_comm; }
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3485
diff changeset
219
23435
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
220 void accept (tree_walker& tw)
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
221 {
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
222 tw.visit_simple_for_command (*this);
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
223 }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
224
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
225 #if defined (HAVE_LLVM)
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
226 // some functions use by tree_jit
23446
cd4e1ee28716 maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents: 23444
diff changeset
227 jit_info * get_info (void) const
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
228 {
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
229 return m_compiled;
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
230 }
14906
3f81e8b42955 JIT for loops over ranges
Max Brister <max@2bass.com>
parents: 14138
diff changeset
231
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
232 void stash_info (jit_info *jinfo)
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
233 {
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
234 m_compiled = jinfo;
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
235 }
15023
75d1bc2fd6d2 Compile top level while loops in JIT.
Max Brister <max@2bass.com>
parents: 14920
diff changeset
236 #endif
14906
3f81e8b42955 JIT for loops over ranges
Max Brister <max@2bass.com>
parents: 14138
diff changeset
237
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
238 private:
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
239 // TRUE means operate in parallel (subject to the value of the
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
240 // maxproc expression).
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
241 bool m_parallel;
13245
027a2186cd90 parfor keyword and infrastructure, but handle parfor as normal for loop for now
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
242
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
243 // Expression to modify.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
244 tree_expression *m_lhs;
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
245
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
246 // Expression to evaluate.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
247 tree_expression *m_expr;
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
248
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
249 // Expression to tell how many processors should be used (only valid
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
250 // if parallel is TRUE).
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
251 tree_expression *m_maxproc;
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
252
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
253 // List of commands to execute.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
254 tree_statement_list *m_list;
13245
027a2186cd90 parfor keyword and infrastructure, but handle parfor as normal for loop for now
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
255
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
256 // Comment preceding FOR token.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
257 comment_list *m_lead_comm;
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
258
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
259 // Comment preceding ENDFOR token.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
260 comment_list *m_trail_comm;
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3485
diff changeset
261
23398
d4ef04757ead eliminate some compiler warnings
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
262 #if defined (HAVE_LLVM)
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
263 // compiled version of the loop
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
264 jit_info *m_compiled;
23398
d4ef04757ead eliminate some compiler warnings
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
265 #endif
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
266 };
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3485
diff changeset
267
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
268 class tree_complex_for_command : public tree_command
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
269 {
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
270 public:
14906
3f81e8b42955 JIT for loops over ranges
Max Brister <max@2bass.com>
parents: 14138
diff changeset
271
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
272 tree_complex_for_command (int l = -1, int c = -1)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
273 : tree_command (l, c), m_lhs (nullptr), m_expr (nullptr),
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
274 m_list (nullptr), m_lead_comm (nullptr), m_trail_comm (nullptr)
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
275 { }
2988
daa1ed1f5462 [project @ 1997-05-16 07:23:15 by jwe]
jwe
parents: 2982
diff changeset
276
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
277 tree_complex_for_command (tree_argument_list *le, tree_expression *re,
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
278 tree_statement_list *lst,
23750
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
279 comment_list *lc = nullptr,
ea879bc55272 move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents: 23615
diff changeset
280 comment_list *tc = nullptr,
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
281 int l = -1, int c = -1)
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
282 : tree_command (l, c), m_lhs (le), m_expr (re), m_list (lst),
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
283 m_lead_comm (lc), m_trail_comm (tc)
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
284 { }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
285
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
286 // No copying!
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
287
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
288 tree_complex_for_command (const tree_complex_for_command&) = delete;
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
289
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
290 tree_complex_for_command& operator = (const tree_complex_for_command&) = delete;
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
291
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
292 ~tree_complex_for_command (void);
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
293
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
294 tree_argument_list * left_hand_side (void) { return m_lhs; }
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
295
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
296 tree_expression * control_expr (void) { return m_expr; }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
297
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
298 tree_statement_list * body (void) { return m_list; }
22869
f75d289645ec make deleted functions public
John W. Eaton <jwe@octave.org>
parents: 22868
diff changeset
299
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
300 comment_list * leading_comment (void) { return m_lead_comm; }
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
301
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
302 comment_list * trailing_comment (void) { return m_trail_comm; }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
303
23435
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
304 void accept (tree_walker& tw)
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
305 {
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
306 tw.visit_complex_for_command (*this);
c452180ab672 begin refactoring parse tree evaluator
John W. Eaton <jwe@octave.org>
parents: 23398
diff changeset
307 }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
308
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
309 private:
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3485
diff changeset
310
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
311 // Expression to modify.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
312 tree_argument_list *m_lhs;
3665
0689afb1d001 [project @ 2000-05-11 19:07:56 by jwe]
jwe
parents: 3485
diff changeset
313
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
314 // Expression to evaluate.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
315 tree_expression *m_expr;
5861
2a6cb4ed8f1e [project @ 2006-06-16 05:09:41 by jwe]
jwe
parents: 5307
diff changeset
316
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
317 // List of commands to execute.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
318 tree_statement_list *m_list;
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
319
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
320 // Comment preceding FOR token.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
321 comment_list *m_lead_comm;
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
322
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
323 // Comment preceding ENDFOR token.
24846
7620f1f5290d use m_ prefix for member variables in parse tree classes
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
324 comment_list *m_trail_comm;
23075
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
325 };
4e3d47dc7e25 move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 22869
diff changeset
326 }
2982
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
327
20f5cec4f11c [project @ 1997-05-16 03:29:26 by jwe]
jwe
parents:
diff changeset
328 #endif