Mercurial > hg > octave-lyh
annotate libinterp/parse-tree/parse.h @ 16104:c8974e28da59
move nesting_level to lexical_feedback class
* lex.h, lex.ll (brace_bracket_paren_nesting_level): Rename to
bbp_nesting_level and nest class definition inside lexical_feedback
class.
(nesting_level): Move global variable to lexical_feedback_class.
Change all uses.
(reset_parser): Don't clear nesting_level.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 25 Feb 2013 21:54:15 -0500 |
parents | 6434f70f0ee0 |
children | 229eb14653fd |
rev | line source |
---|---|
1 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
13970
diff
changeset
|
3 Copyright (C) 1993-2012 John W. Eaton |
1 | 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 | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
1 | 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 | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
1 | 20 |
21 */ | |
22 | |
383 | 23 #if !defined (octave_parse_h) |
24 #define octave_parse_h 1 | |
1 | 25 |
3021 | 26 #include <cstdio> |
27 | |
1755 | 28 #include <string> |
29 | |
4426 | 30 #include <stack> |
31 | |
1 | 32 extern void reset_parser (void); |
4753 | 33 extern int octave_lex (void); |
34 extern int octave_parse (void); | |
1 | 35 |
36 class tree; | |
37 class tree_matrix; | |
38 class tree_identifier; | |
13970 | 39 class tree_statement_list; |
7102 | 40 class octave_function; |
3772 | 41 |
42 #include "oct-obj.h" | |
1 | 43 |
44 // Nonzero means print parser debugging info (-d). | |
4753 | 45 extern int octave_debug; |
1 | 46 |
338 | 47 // Buffer for help text snagged from function files. |
4426 | 48 extern std::stack<std::string> help_buf; |
1 | 49 |
3021 | 50 // TRUE means we are using readline. |
51 extern bool line_editing; | |
52 | |
53 // TRUE means we printed messages about reading startup files. | |
54 extern bool reading_startup_message_printed; | |
55 | |
56 // TRUE means input is coming from startup file. | |
57 extern bool input_from_startup_file; | |
58 | |
7336 | 59 // Name of the current class when we are parsing class methods or |
60 // constructors. | |
61 extern std::string current_class_name; | |
62 | |
6109 | 63 extern OCTINTERP_API std::string |
5484 | 64 get_help_from_file (const std::string& nm, bool& symbol_found, |
10313 | 65 std::string& file); |
5931 | 66 |
6109 | 67 extern OCTINTERP_API std::string |
5931 | 68 get_help_from_file (const std::string& nm, bool& symbol_found); |
5484 | 69 |
6109 | 70 extern OCTINTERP_API std::string lookup_autoload (const std::string& nm); |
3021 | 71 |
6109 | 72 extern OCTINTERP_API string_vector autoloaded_functions (void); |
5592 | 73 |
6109 | 74 extern OCTINTERP_API string_vector reverse_lookup_autoload (const std::string& nm); |
5592 | 75 |
7336 | 76 extern OCTINTERP_API octave_function * |
77 load_fcn_from_file (const std::string& file_name, | |
10313 | 78 const std::string& dir_name = std::string (), |
79 const std::string& dispatch_type = std::string (), | |
80 const std::string& fcn_name = std::string (), | |
81 bool autoload = false); | |
3021 | 82 |
6109 | 83 extern OCTINTERP_API void |
5975 | 84 source_file (const std::string& file_name, |
10313 | 85 const std::string& context = std::string (), |
86 bool verbose = false, bool require_file = true, | |
87 const std::string& warn_for = std::string ()); | |
4486 | 88 |
6109 | 89 extern OCTINTERP_API octave_value_list |
3772 | 90 feval (const std::string& name, |
91 const octave_value_list& args = octave_value_list (), | |
92 int nargout = 0); | |
3156 | 93 |
6109 | 94 extern OCTINTERP_API octave_value_list |
4342 | 95 feval (octave_function *fcn, |
96 const octave_value_list& args = octave_value_list (), | |
97 int nargout = 0); | |
98 | |
6109 | 99 extern OCTINTERP_API octave_value_list |
3772 | 100 feval (const octave_value_list& args, int nargout = 0); |
3021 | 101 |
6109 | 102 extern OCTINTERP_API octave_value_list |
3523 | 103 eval_string (const std::string&, bool silent, int& parse_status, int hargout); |
3099 | 104 |
6109 | 105 extern OCTINTERP_API octave_value |
3523 | 106 eval_string (const std::string&, bool silent, int& parse_status); |
3021 | 107 |
13970 | 108 extern OCTINTERP_API void cleanup_statement_list (tree_statement_list **lst); |
109 | |
1 | 110 #endif |