Mercurial > hg > octave-lyh
annotate src/pt.cc @ 8229:1bf51192fa1d
imported patch rundemos
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 16 Oct 2008 13:28:43 -0400 |
parents | 5640a70cbab1 |
children | 73c4516fae10 |
rev | line source |
---|---|
2991 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1996, 1997, 2000, 2001, 2002, 2004, 2005, 2006, 2007 |
4 John W. Eaton | |
2991 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
2991 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
2991 | 21 |
22 */ | |
23 | |
24 #ifdef HAVE_CONFIG_H | |
25 #include <config.h> | |
26 #endif | |
27 | |
3503 | 28 #include <iostream> |
5765 | 29 #include <sstream> |
2991 | 30 #include <string> |
31 | |
4748 | 32 #include "ov-fcn.h" |
2991 | 33 #include "pt.h" |
34 #include "pt-pr-code.h" | |
35 | |
7787
6b521b1e3631
Add dbquit and make dbstep compatible. Use parser in debug mode to handle multi-line input
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
36 // If zero, stop executing at the next possible point. |
6b521b1e3631
Add dbquit and make dbstep compatible. Use parser in debug mode to handle multi-line input
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
37 int tree::break_next = -1; |
3772 | 38 |
5388 | 39 // The line where dbnext was executed. |
3805 | 40 int tree::last_line = 0; |
41 | |
42 // The function where the last breakpoint occurred. | |
7818
5640a70cbab1
Add Ffilemarker and fix for 'dbstep in'
David Bateman <dbateman@free.fr>
parents:
7787
diff
changeset
|
43 const octave_function *tree::last_break_function = 0; |
5640a70cbab1
Add Ffilemarker and fix for 'dbstep in'
David Bateman <dbateman@free.fr>
parents:
7787
diff
changeset
|
44 |
5640a70cbab1
Add Ffilemarker and fix for 'dbstep in'
David Bateman <dbateman@free.fr>
parents:
7787
diff
changeset
|
45 // The function where the next breakpoint is request. |
4748 | 46 const octave_function *tree::break_function = 0; |
3805 | 47 |
48 // The statement where the last breakpoint occurred. | |
3806 | 49 const tree *tree::break_statement = 0; |
3805 | 50 |
2991 | 51 // Hide the details of the string buffer so that we are less likely to |
52 // create a memory leak. | |
53 | |
3536 | 54 std::string |
2991 | 55 tree::str_print_code (void) |
56 { | |
5765 | 57 std::ostringstream buf; |
2991 | 58 |
59 tree_print_code tpc (buf); | |
60 | |
61 accept (tpc); | |
62 | |
5765 | 63 std::string retval = buf.str (); |
2991 | 64 |
65 return retval; | |
66 } | |
67 | |
68 /* | |
69 ;;; Local Variables: *** | |
70 ;;; mode: C++ *** | |
71 ;;; End: *** | |
72 */ |