GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
pt-walk.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1996-2015 John W. Eaton
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
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
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
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if !defined (octave_pt_walk_h)
24 #define octave_pt_walk_h 1
25 
27 class tree_argument_list;
29 class tree_break_command;
34 class tree_decl_elt;
38 class octave_user_script;
40 class tree_function_def;
41 class tree_identifier;
42 class tree_if_clause;
43 class tree_if_command;
45 class tree_switch_case;
49 class tree_matrix;
50 class tree_cell;
52 class tree_no_op_command;
53 class tree_constant;
54 class tree_fcn_handle;
55 class tree_funcall;
60 class tree_return_list;
62 class tree_statement;
66 class tree_while_command;
68 
81 class tree_classdef_enum;
84 class tree_classdef_body;
85 class tree_classdef;
86 
87 class
89 {
90 public:
91 
92  virtual void
93  visit_anon_fcn_handle (tree_anon_fcn_handle&) = 0;
94 
95  virtual void
96  visit_argument_list (tree_argument_list&) = 0;
97 
98  virtual void
99  visit_binary_expression (tree_binary_expression&) = 0;
100 
101  virtual void
102  visit_break_command (tree_break_command&) = 0;
103 
104  virtual void
105  visit_colon_expression (tree_colon_expression&) = 0;
106 
107  virtual void
108  visit_continue_command (tree_continue_command&) = 0;
109 
110  virtual void
111  visit_global_command (tree_global_command&) = 0;
112 
113  virtual void
114  visit_persistent_command (tree_persistent_command&) = 0;
115 
116  virtual void
117  visit_decl_elt (tree_decl_elt&) = 0;
118 
119  virtual void
120  visit_decl_init_list (tree_decl_init_list&) = 0;
121 
122  virtual void
123  visit_simple_for_command (tree_simple_for_command&) = 0;
124 
125  virtual void
126  visit_complex_for_command (tree_complex_for_command&) = 0;
127 
128  virtual void
129  visit_octave_user_script (octave_user_script&) = 0;
130 
131  virtual void
132  visit_octave_user_function (octave_user_function&) = 0;
133 
134  virtual void
135  visit_function_def (tree_function_def&) = 0;
136 
137  virtual void
138  visit_identifier (tree_identifier&) = 0;
139 
140  virtual void
141  visit_if_clause (tree_if_clause&) = 0;
142 
143  virtual void
144  visit_if_command (tree_if_command&) = 0;
145 
146  virtual void
147  visit_if_command_list (tree_if_command_list&) = 0;
148 
149  virtual void
150  visit_switch_case (tree_switch_case&) = 0;
151 
152  virtual void
153  visit_switch_case_list (tree_switch_case_list&) = 0;
154 
155  virtual void
156  visit_switch_command (tree_switch_command&) = 0;
157 
158  virtual void
159  visit_index_expression (tree_index_expression&) = 0;
160 
161  virtual void
162  visit_matrix (tree_matrix&) = 0;
163 
164  virtual void
165  visit_cell (tree_cell&) = 0;
166 
167  virtual void
168  visit_multi_assignment (tree_multi_assignment&) = 0;
169 
170  virtual void
171  visit_no_op_command (tree_no_op_command&) = 0;
172 
173  virtual void
174  visit_constant (tree_constant&) = 0;
175 
176  virtual void
177  visit_fcn_handle (tree_fcn_handle&) = 0;
178 
179  virtual void
180  visit_funcall (tree_funcall&) = 0;
181 
182  virtual void
183  visit_parameter_list (tree_parameter_list&) = 0;
184 
185  virtual void
186  visit_postfix_expression (tree_postfix_expression&) = 0;
187 
188  virtual void
189  visit_prefix_expression (tree_prefix_expression&) = 0;
190 
191  virtual void
192  visit_return_command (tree_return_command&) = 0;
193 
194  virtual void
195  visit_return_list (tree_return_list&) = 0;
196 
197  virtual void
198  visit_simple_assignment (tree_simple_assignment&) = 0;
199 
200  virtual void
201  visit_statement (tree_statement&) = 0;
202 
203  virtual void
204  visit_statement_list (tree_statement_list&) = 0;
205 
206  virtual void
207  visit_try_catch_command (tree_try_catch_command&) = 0;
208 
209  virtual void
210  visit_unwind_protect_command (tree_unwind_protect_command&) = 0;
211 
212  virtual void
213  visit_while_command (tree_while_command&) = 0;
214 
215  virtual void
216  visit_do_until_command (tree_do_until_command&) = 0;
217 
218  virtual void
220 
221  virtual void
223 
224  virtual void
226 
227  virtual void
229 
230  virtual void
232 
233  virtual void
235 
236  virtual void
238 
239  virtual void
241 
242  virtual void
244 
245  virtual void
247 
248  virtual void
250 
251  virtual void
253 
254  virtual void
256 
257  virtual void
259 
260  virtual void
262 
263  virtual void
265 
266  virtual void
267  visit_classdef (tree_classdef&) { } /* = 0; */
268 
269 protected:
270 
271  tree_walker (void) { }
272 
273  virtual ~tree_walker (void) { }
274 
275 private:
276 
277  // No copying!
278 
279  tree_walker (const tree_walker&);
280 
282 };
283 
284 #endif
virtual void visit_classdef_methods_list(tree_classdef_methods_list &)
Definition: pt-walk.h:240
virtual void visit_classdef_events_block(tree_classdef_events_block &)
Definition: pt-walk.h:252
virtual void visit_classdef_superclass_list(tree_classdef_superclass_list &)
Definition: pt-walk.h:228
virtual void visit_classdef_properties_block(tree_classdef_properties_block &)
Definition: pt-walk.h:237
virtual void visit_classdef_attribute_list(tree_classdef_attribute_list &)
Definition: pt-walk.h:222
virtual void visit_classdef_enum_list(tree_classdef_enum_list &)
Definition: pt-walk.h:258
virtual void visit_classdef_body(tree_classdef_body &)
Definition: pt-walk.h:264
virtual void visit_classdef_property_list(tree_classdef_property_list &)
Definition: pt-walk.h:234
virtual void visit_classdef_event(tree_classdef_event &)
Definition: pt-walk.h:246
virtual void visit_classdef_methods_block(tree_classdef_methods_block &)
Definition: pt-walk.h:243
virtual void visit_classdef_property(tree_classdef_property &)
Definition: pt-walk.h:231
virtual void visit_classdef(tree_classdef &)
Definition: pt-walk.h:267
virtual void visit_classdef_attribute(tree_classdef_attribute &)
Definition: pt-walk.h:219
virtual void visit_classdef_enum(tree_classdef_enum &)
Definition: pt-walk.h:255
virtual void visit_classdef_events_list(tree_classdef_events_list &)
Definition: pt-walk.h:249
tree_walker(void)
Definition: pt-walk.h:271
virtual void visit_classdef_enum_block(tree_classdef_enum_block &)
Definition: pt-walk.h:261
virtual ~tree_walker(void)
Definition: pt-walk.h:273
virtual void visit_classdef_superclass(tree_classdef_superclass &)
Definition: pt-walk.h:225
tree_classdef & operator=(const tree_classdef &)