2123
|
1 /* |
|
2 |
|
3 Copyright (C) 1996 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 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 |
|
26 #include "pt-cmd.h" |
|
27 #include "pt-const.h" |
|
28 #include "pt-exp.h" |
|
29 #include "pt-fcn.h" |
|
30 #include "pt-fvc.h" |
|
31 #include "pt-mat.h" |
|
32 #include "pt-misc.h" |
|
33 #include "pt-mvr.h" |
|
34 #include "pt-plot.h" |
|
35 |
|
36 class |
|
37 tree_walker |
|
38 { |
|
39 public: |
|
40 |
|
41 virtual void |
|
42 visit_argument_list (tree_argument_list&) = 0; |
|
43 |
|
44 virtual void |
|
45 visit_binary_expression (tree_binary_expression&) = 0; |
|
46 |
|
47 virtual void |
|
48 visit_break_command (tree_break_command&) = 0; |
|
49 |
|
50 virtual void |
|
51 visit_builtin (tree_builtin&) = 0; |
|
52 |
|
53 virtual void |
|
54 visit_colon_expression (tree_colon_expression&) = 0; |
|
55 |
|
56 virtual void |
|
57 visit_continue_command (tree_continue_command&) = 0; |
|
58 |
|
59 virtual void |
|
60 visit_for_command (tree_for_command&) = 0; |
|
61 |
|
62 virtual void |
|
63 visit_function (tree_function&) = 0; |
|
64 |
|
65 virtual void |
|
66 visit_global (tree_global&) = 0; |
|
67 |
|
68 virtual void |
|
69 visit_global_command (tree_global_command&) = 0; |
|
70 |
|
71 virtual void |
|
72 visit_global_init_list (tree_global_init_list&) = 0; |
|
73 |
|
74 virtual void |
|
75 visit_identifier (tree_identifier&) = 0; |
|
76 |
|
77 virtual void |
|
78 visit_if_clause (tree_if_clause&) = 0; |
|
79 |
|
80 virtual void |
|
81 visit_if_command (tree_if_command&) = 0; |
|
82 |
|
83 virtual void |
|
84 visit_if_command_list (tree_if_command_list&) = 0; |
|
85 |
|
86 virtual void |
|
87 visit_index_expression (tree_index_expression&) = 0; |
|
88 |
|
89 virtual void |
|
90 visit_indirect_ref (tree_indirect_ref&) = 0; |
|
91 |
|
92 virtual void |
|
93 visit_matrix (tree_matrix&) = 0; |
|
94 |
|
95 virtual void |
|
96 visit_matrix_row (tree_matrix_row&) = 0; |
|
97 |
|
98 virtual void |
|
99 visit_multi_assignment_expression (tree_multi_assignment_expression&) = 0; |
|
100 |
|
101 virtual void |
|
102 visit_oct_obj (tree_oct_obj&) = 0; |
|
103 |
|
104 virtual void |
2372
|
105 visit_constant (tree_constant&) = 0; |
2123
|
106 |
|
107 virtual void |
|
108 visit_parameter_list (tree_parameter_list&) = 0; |
|
109 |
|
110 virtual void |
|
111 visit_plot_command (tree_plot_command&) = 0; |
|
112 |
|
113 virtual void |
|
114 visit_plot_limits (plot_limits&) = 0; |
|
115 |
|
116 virtual void |
|
117 visit_plot_range (plot_range&) = 0; |
|
118 |
|
119 virtual void |
|
120 visit_postfix_expression (tree_postfix_expression&) = 0; |
|
121 |
|
122 virtual void |
|
123 visit_prefix_expression (tree_prefix_expression&) = 0; |
|
124 |
|
125 virtual void |
|
126 visit_return_command (tree_return_command&) = 0; |
|
127 |
|
128 virtual void |
|
129 visit_return_list (tree_return_list&) = 0; |
|
130 |
|
131 virtual void |
|
132 visit_simple_assignment_expression (tree_simple_assignment_expression&) = 0; |
|
133 |
|
134 virtual void |
|
135 visit_statement (tree_statement&) = 0; |
|
136 |
|
137 virtual void |
|
138 visit_statement_list (tree_statement_list&) = 0; |
|
139 |
|
140 virtual void |
|
141 visit_subplot (subplot&) = 0; |
|
142 |
|
143 virtual void |
|
144 visit_subplot_list (subplot_list&) = 0; |
|
145 |
|
146 virtual void |
|
147 visit_subplot_style (subplot_style&) = 0; |
|
148 |
|
149 virtual void |
|
150 visit_subplot_using (subplot_using&) = 0; |
|
151 |
|
152 virtual void |
|
153 visit_try_catch_command (tree_try_catch_command&) = 0; |
|
154 |
|
155 virtual void |
|
156 visit_unary_expression (tree_unary_expression&) = 0; |
|
157 |
|
158 virtual void |
|
159 visit_unwind_protect_command (tree_unwind_protect_command&) = 0; |
|
160 |
|
161 virtual void |
|
162 visit_while_command (tree_while_command&) = 0; |
|
163 |
|
164 protected: |
|
165 |
|
166 tree_walker (void) { } |
|
167 |
|
168 virtual ~tree_walker (void) { } |
|
169 |
|
170 private: |
|
171 |
|
172 // No copying! |
|
173 |
|
174 tree_walker (const tree_walker&); |
|
175 |
|
176 tree_walker& operator = (const tree_walker&); |
|
177 }; |
|
178 |
|
179 #endif |
|
180 |
|
181 /* |
|
182 ;;; Local Variables: *** |
|
183 ;;; mode: C++ *** |
|
184 ;;; End: *** |
|
185 */ |