![]() |
Octave-Forge - Extra packages for GNU Octave |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* 00002 00003 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 00004 2006, 2007, 2008, 2009 John W. Eaton 00005 00006 This file is part of Octave. 00007 00008 Octave is free software; you can redistribute it and/or modify it 00009 under the terms of the GNU General Public License as published by the 00010 Free Software Foundation; either version 3 of the License, or (at your 00011 option) any later version. 00012 00013 Octave is distributed in the hope that it will be useful, but WITHOUT 00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00015 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00016 for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with Octave; see the file COPYING. If not, see 00020 <http://www.gnu.org/licenses/>. 00021 00022 */ 00023 00024 #if !defined (octave_tree_walker_h) 00025 #define octave_tree_walker_h 1 00026 00027 class tree_anon_fcn_handle; 00028 class tree_argument_list; 00029 class tree_binary_expression; 00030 class tree_break_command; 00031 class tree_colon_expression; 00032 class tree_continue_command; 00033 class tree_global_command; 00034 class tree_static_command; 00035 class tree_decl_elt; 00036 class tree_decl_init_list; 00037 class tree_simple_for_command; 00038 class tree_complex_for_command; 00039 class octave_user_script; 00040 class octave_user_function; 00041 class tree_function_def; 00042 class tree_identifier; 00043 class tree_if_clause; 00044 class tree_if_command; 00045 class tree_if_command_list; 00046 class tree_switch_case; 00047 class tree_switch_case_list; 00048 class tree_switch_command; 00049 class tree_index_expression; 00050 class tree_matrix; 00051 class tree_cell; 00052 class tree_multi_assignment; 00053 class tree_no_op_command; 00054 class tree_constant; 00055 class tree_fcn_handle; 00056 class tree_parameter_list; 00057 class tree_postfix_expression; 00058 class tree_prefix_expression; 00059 class tree_return_command; 00060 class tree_return_list; 00061 class tree_simple_assignment; 00062 class tree_statement; 00063 class tree_statement_list; 00064 class tree_try_catch_command; 00065 class tree_unwind_protect_command; 00066 class tree_while_command; 00067 class tree_do_until_command; 00068 00069 class 00070 tree_walker 00071 { 00072 public: 00073 00074 virtual void 00075 visit_anon_fcn_handle (tree_anon_fcn_handle&) = 0; 00076 00077 virtual void 00078 visit_argument_list (tree_argument_list&) = 0; 00079 00080 virtual void 00081 visit_binary_expression (tree_binary_expression&) = 0; 00082 00083 virtual void 00084 visit_break_command (tree_break_command&) = 0; 00085 00086 virtual void 00087 visit_colon_expression (tree_colon_expression&) = 0; 00088 00089 virtual void 00090 visit_continue_command (tree_continue_command&) = 0; 00091 00092 virtual void 00093 visit_global_command (tree_global_command&) = 0; 00094 00095 virtual void 00096 visit_static_command (tree_static_command&) = 0; 00097 00098 virtual void 00099 visit_decl_elt (tree_decl_elt&) = 0; 00100 00101 virtual void 00102 visit_decl_init_list (tree_decl_init_list&) = 0; 00103 00104 virtual void 00105 visit_simple_for_command (tree_simple_for_command&) = 0; 00106 00107 virtual void 00108 visit_complex_for_command (tree_complex_for_command&) = 0; 00109 00110 virtual void 00111 visit_octave_user_script (octave_user_script&) = 0; 00112 00113 virtual void 00114 visit_octave_user_function (octave_user_function&) = 0; 00115 00116 virtual void 00117 visit_function_def (tree_function_def&) = 0; 00118 00119 virtual void 00120 visit_identifier (tree_identifier&) = 0; 00121 00122 virtual void 00123 visit_if_clause (tree_if_clause&) = 0; 00124 00125 virtual void 00126 visit_if_command (tree_if_command&) = 0; 00127 00128 virtual void 00129 visit_if_command_list (tree_if_command_list&) = 0; 00130 00131 virtual void 00132 visit_switch_case (tree_switch_case&) = 0; 00133 00134 virtual void 00135 visit_switch_case_list (tree_switch_case_list&) = 0; 00136 00137 virtual void 00138 visit_switch_command (tree_switch_command&) = 0; 00139 00140 virtual void 00141 visit_index_expression (tree_index_expression&) = 0; 00142 00143 virtual void 00144 visit_matrix (tree_matrix&) = 0; 00145 00146 virtual void 00147 visit_cell (tree_cell&) = 0; 00148 00149 virtual void 00150 visit_multi_assignment (tree_multi_assignment&) = 0; 00151 00152 virtual void 00153 visit_no_op_command (tree_no_op_command&) = 0; 00154 00155 virtual void 00156 visit_constant (tree_constant&) = 0; 00157 00158 virtual void 00159 visit_fcn_handle (tree_fcn_handle&) = 0; 00160 00161 virtual void 00162 visit_parameter_list (tree_parameter_list&) = 0; 00163 00164 virtual void 00165 visit_postfix_expression (tree_postfix_expression&) = 0; 00166 00167 virtual void 00168 visit_prefix_expression (tree_prefix_expression&) = 0; 00169 00170 virtual void 00171 visit_return_command (tree_return_command&) = 0; 00172 00173 virtual void 00174 visit_return_list (tree_return_list&) = 0; 00175 00176 virtual void 00177 visit_simple_assignment (tree_simple_assignment&) = 0; 00178 00179 virtual void 00180 visit_statement (tree_statement&) = 0; 00181 00182 virtual void 00183 visit_statement_list (tree_statement_list&) = 0; 00184 00185 virtual void 00186 visit_try_catch_command (tree_try_catch_command&) = 0; 00187 00188 virtual void 00189 visit_unwind_protect_command (tree_unwind_protect_command&) = 0; 00190 00191 virtual void 00192 visit_while_command (tree_while_command&) = 0; 00193 00194 virtual void 00195 visit_do_until_command (tree_do_until_command&) = 0; 00196 00197 protected: 00198 00199 tree_walker (void) { } 00200 00201 virtual ~tree_walker (void) { } 00202 00203 private: 00204 00205 // No copying! 00206 00207 tree_walker (const tree_walker&); 00208 00209 tree_walker& operator = (const tree_walker&); 00210 }; 00211 00212 #endif 00213 00214 /* 00215 ;;; Local Variables: *** 00216 ;;; mode: C++ *** 00217 ;;; End: *** 00218 */