00001 /* 00002 00003 Copyright (C) 1996-2012 John W. Eaton 00004 00005 This file is part of Octave. 00006 00007 Octave is free software; you can redistribute it and/or modify it 00008 under the terms of the GNU General Public License as published by the 00009 Free Software Foundation; either version 3 of the License, or (at your 00010 option) any later version. 00011 00012 Octave is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Octave; see the file COPYING. If not, see 00019 <http://www.gnu.org/licenses/>. 00020 00021 */ 00022 00023 #if !defined (octave_tree_jump_h) 00024 #define octave_tree_jump_h 1 00025 00026 class tree_walker; 00027 00028 #include "pt-cmd.h" 00029 #include "symtab.h" 00030 00031 // Break. 00032 00033 class 00034 tree_break_command : public tree_command 00035 { 00036 public: 00037 00038 tree_break_command (int l = -1, int c = -1) 00039 : tree_command (l, c) { } 00040 00041 ~tree_break_command (void) { } 00042 00043 tree_command *dup (symbol_table::scope_id scope, 00044 symbol_table::context_id context) const; 00045 00046 void accept (tree_walker& tw); 00047 00048 static int breaking; 00049 00050 private: 00051 00052 // No copying! 00053 00054 tree_break_command (const tree_break_command&); 00055 00056 tree_break_command& operator = (const tree_break_command&); 00057 }; 00058 00059 // Continue. 00060 00061 class 00062 tree_continue_command : public tree_command 00063 { 00064 public: 00065 00066 tree_continue_command (int l = -1, int c = -1) 00067 : tree_command (l, c) { } 00068 00069 ~tree_continue_command (void) { } 00070 00071 tree_command *dup (symbol_table::scope_id scope, 00072 symbol_table::context_id context) const; 00073 00074 void accept (tree_walker& tw); 00075 00076 static int continuing; 00077 00078 private: 00079 00080 // No copying! 00081 00082 tree_continue_command (const tree_continue_command&); 00083 00084 tree_continue_command& operator = (const tree_continue_command&); 00085 }; 00086 00087 // Return. 00088 00089 class 00090 tree_return_command : public tree_command 00091 { 00092 public: 00093 00094 tree_return_command (int l = -1, int c = -1) 00095 : tree_command (l, c) { } 00096 00097 ~tree_return_command (void) { } 00098 00099 tree_command *dup (symbol_table::scope_id scope, 00100 symbol_table::context_id context) const; 00101 00102 void accept (tree_walker& tw); 00103 00104 static int returning; 00105 00106 private: 00107 00108 // No copying! 00109 00110 tree_return_command (const tree_return_command&); 00111 00112 tree_return_command& operator = (const tree_return_command&); 00113 }; 00114 00115 #endif