2123
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
2123
|
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 2, or (at your option) any |
|
10 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, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_tree_walker_h) |
|
24 #define octave_tree_walker_h 1 |
|
25 |
2876
|
26 class tree_argument_list; |
|
27 class tree_binary_expression; |
|
28 class tree_break_command; |
|
29 class tree_colon_expression; |
|
30 class tree_continue_command; |
|
31 class tree_decl_command; |
|
32 class tree_decl_elt; |
|
33 class tree_decl_init_list; |
2969
|
34 class tree_simple_for_command; |
|
35 class tree_complex_for_command; |
2891
|
36 class octave_user_function; |
2876
|
37 class tree_identifier; |
|
38 class tree_if_clause; |
|
39 class tree_if_command; |
|
40 class tree_if_command_list; |
|
41 class tree_switch_case; |
|
42 class tree_switch_case_list; |
|
43 class tree_switch_command; |
|
44 class tree_index_expression; |
|
45 class tree_indirect_ref; |
|
46 class tree_matrix; |
2969
|
47 class tree_multi_assignment; |
2876
|
48 class tree_no_op_command; |
|
49 class tree_oct_obj; |
|
50 class tree_constant; |
|
51 class tree_parameter_list; |
|
52 class tree_plot_command; |
|
53 class plot_limits; |
|
54 class plot_range; |
|
55 class tree_postfix_expression; |
|
56 class tree_prefix_expression; |
|
57 class tree_return_command; |
|
58 class tree_return_list; |
2969
|
59 class tree_simple_assignment; |
2876
|
60 class tree_statement; |
|
61 class tree_statement_list; |
|
62 class subplot; |
|
63 class subplot_list; |
|
64 class subplot_style; |
|
65 class subplot_using; |
|
66 class tree_try_catch_command; |
|
67 class tree_unwind_protect_command; |
|
68 class tree_while_command; |
2123
|
69 |
|
70 class |
|
71 tree_walker |
|
72 { |
|
73 public: |
|
74 |
|
75 virtual void |
|
76 visit_argument_list (tree_argument_list&) = 0; |
|
77 |
|
78 virtual void |
|
79 visit_binary_expression (tree_binary_expression&) = 0; |
|
80 |
|
81 virtual void |
|
82 visit_break_command (tree_break_command&) = 0; |
|
83 |
|
84 virtual void |
|
85 visit_colon_expression (tree_colon_expression&) = 0; |
|
86 |
|
87 virtual void |
|
88 visit_continue_command (tree_continue_command&) = 0; |
|
89 |
|
90 virtual void |
2846
|
91 visit_decl_command (tree_decl_command&) = 0; |
|
92 |
|
93 virtual void |
|
94 visit_decl_elt (tree_decl_elt&) = 0; |
|
95 |
|
96 virtual void |
|
97 visit_decl_init_list (tree_decl_init_list&) = 0; |
|
98 |
|
99 virtual void |
2969
|
100 visit_simple_for_command (tree_simple_for_command&) = 0; |
|
101 |
|
102 virtual void |
|
103 visit_complex_for_command (tree_complex_for_command&) = 0; |
2123
|
104 |
|
105 virtual void |
2891
|
106 visit_octave_user_function (octave_user_function&) = 0; |
2123
|
107 |
|
108 virtual void |
|
109 visit_identifier (tree_identifier&) = 0; |
|
110 |
|
111 virtual void |
|
112 visit_if_clause (tree_if_clause&) = 0; |
|
113 |
|
114 virtual void |
|
115 visit_if_command (tree_if_command&) = 0; |
|
116 |
|
117 virtual void |
|
118 visit_if_command_list (tree_if_command_list&) = 0; |
|
119 |
|
120 virtual void |
2764
|
121 visit_switch_case (tree_switch_case&) = 0; |
|
122 |
|
123 virtual void |
|
124 visit_switch_case_list (tree_switch_case_list&) = 0; |
|
125 |
|
126 virtual void |
|
127 visit_switch_command (tree_switch_command&) = 0; |
|
128 |
|
129 virtual void |
2123
|
130 visit_index_expression (tree_index_expression&) = 0; |
|
131 |
|
132 virtual void |
|
133 visit_indirect_ref (tree_indirect_ref&) = 0; |
|
134 |
|
135 virtual void |
|
136 visit_matrix (tree_matrix&) = 0; |
|
137 |
|
138 virtual void |
2969
|
139 visit_multi_assignment (tree_multi_assignment&) = 0; |
2123
|
140 |
|
141 virtual void |
2620
|
142 visit_no_op_command (tree_no_op_command&) = 0; |
|
143 |
|
144 virtual void |
2123
|
145 visit_oct_obj (tree_oct_obj&) = 0; |
|
146 |
|
147 virtual void |
2372
|
148 visit_constant (tree_constant&) = 0; |
2123
|
149 |
|
150 virtual void |
|
151 visit_parameter_list (tree_parameter_list&) = 0; |
|
152 |
|
153 virtual void |
|
154 visit_plot_command (tree_plot_command&) = 0; |
|
155 |
|
156 virtual void |
|
157 visit_plot_limits (plot_limits&) = 0; |
|
158 |
|
159 virtual void |
|
160 visit_plot_range (plot_range&) = 0; |
|
161 |
|
162 virtual void |
|
163 visit_postfix_expression (tree_postfix_expression&) = 0; |
|
164 |
|
165 virtual void |
|
166 visit_prefix_expression (tree_prefix_expression&) = 0; |
|
167 |
|
168 virtual void |
|
169 visit_return_command (tree_return_command&) = 0; |
|
170 |
|
171 virtual void |
|
172 visit_return_list (tree_return_list&) = 0; |
|
173 |
|
174 virtual void |
2969
|
175 visit_simple_assignment (tree_simple_assignment&) = 0; |
2123
|
176 |
|
177 virtual void |
|
178 visit_statement (tree_statement&) = 0; |
|
179 |
|
180 virtual void |
|
181 visit_statement_list (tree_statement_list&) = 0; |
|
182 |
|
183 virtual void |
|
184 visit_subplot (subplot&) = 0; |
|
185 |
|
186 virtual void |
|
187 visit_subplot_list (subplot_list&) = 0; |
|
188 |
|
189 virtual void |
|
190 visit_subplot_style (subplot_style&) = 0; |
|
191 |
|
192 virtual void |
|
193 visit_subplot_using (subplot_using&) = 0; |
|
194 |
|
195 virtual void |
|
196 visit_try_catch_command (tree_try_catch_command&) = 0; |
|
197 |
|
198 virtual void |
|
199 visit_unwind_protect_command (tree_unwind_protect_command&) = 0; |
|
200 |
|
201 virtual void |
|
202 visit_while_command (tree_while_command&) = 0; |
|
203 |
|
204 protected: |
|
205 |
|
206 tree_walker (void) { } |
|
207 |
|
208 virtual ~tree_walker (void) { } |
|
209 |
|
210 private: |
|
211 |
|
212 // No copying! |
|
213 |
|
214 tree_walker (const tree_walker&); |
|
215 |
|
216 tree_walker& operator = (const tree_walker&); |
|
217 }; |
|
218 |
|
219 #endif |
|
220 |
|
221 /* |
|
222 ;;; Local Variables: *** |
|
223 ;;; mode: C++ *** |
|
224 ;;; End: *** |
|
225 */ |