Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* 00002 00003 Copyright (C) 1996, 1997, 2002, 2004, 2005, 2006, 2007, 2008, 2009 00004 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_jump_h) 00025 #define octave_tree_jump_h 1 00026 00027 class tree_walker; 00028 00029 #include "pt-cmd.h" 00030 #include "symtab.h" 00031 00032 // Break. 00033 00034 class 00035 tree_break_command : public tree_command 00036 { 00037 public: 00038 00039 tree_break_command (int l = -1, int c = -1) 00040 : tree_command (l, c) { } 00041 00042 ~tree_break_command (void) { } 00043 00044 tree_command *dup (symbol_table::scope_id scope, 00045 symbol_table::context_id context) const; 00046 00047 void accept (tree_walker& tw); 00048 00049 static int breaking; 00050 00051 private: 00052 00053 // No copying! 00054 00055 tree_break_command (const tree_break_command&); 00056 00057 tree_break_command& operator = (const tree_break_command&); 00058 }; 00059 00060 // Continue. 00061 00062 class 00063 tree_continue_command : public tree_command 00064 { 00065 public: 00066 00067 tree_continue_command (int l = -1, int c = -1) 00068 : tree_command (l, c) { } 00069 00070 ~tree_continue_command (void) { } 00071 00072 tree_command *dup (symbol_table::scope_id scope, 00073 symbol_table::context_id context) const; 00074 00075 void accept (tree_walker& tw); 00076 00077 static int continuing; 00078 00079 private: 00080 00081 // No copying! 00082 00083 tree_continue_command (const tree_continue_command&); 00084 00085 tree_continue_command& operator = (const tree_continue_command&); 00086 }; 00087 00088 // Return. 00089 00090 class 00091 tree_return_command : public tree_command 00092 { 00093 public: 00094 00095 tree_return_command (int l = -1, int c = -1) 00096 : tree_command (l, c) { } 00097 00098 ~tree_return_command (void) { } 00099 00100 tree_command *dup (symbol_table::scope_id scope, 00101 symbol_table::context_id context) const; 00102 00103 void accept (tree_walker& tw); 00104 00105 static int returning; 00106 00107 private: 00108 00109 // No copying! 00110 00111 tree_return_command (const tree_return_command&); 00112 00113 tree_return_command& operator = (const tree_return_command&); 00114 }; 00115 00116 #endif 00117 00118 /* 00119 ;;; Local Variables: *** 00120 ;;; mode: C++ *** 00121 ;;; End: *** 00122 */