1
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 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 |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
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 |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
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 |
1
|
30 extern void reset_parser (void); |
|
31 extern int yylex (void); |
|
32 extern int yyparse (void); |
|
33 |
|
34 class tree; |
|
35 class tree_matrix; |
|
36 class tree_identifier; |
3021
|
37 class symbol_record; |
1
|
38 class symbol_table; |
3772
|
39 |
|
40 #include "oct-obj.h" |
1
|
41 |
|
42 // Temporary symbol table pointer used to cope with bogus function syntax. |
|
43 extern symbol_table *tmp_local_sym_tab; |
|
44 |
|
45 // Nonzero means print parser debugging info (-d). |
|
46 extern int yydebug; |
|
47 |
|
48 // The current input line number. |
|
49 extern int input_line_number; |
|
50 |
|
51 // The column of the current token. |
|
52 extern int current_input_column; |
|
53 |
338
|
54 // Buffer for help text snagged from function files. |
3523
|
55 extern std::string help_buf; |
1
|
56 |
3021
|
57 // TRUE means we are using readline. |
|
58 extern bool line_editing; |
|
59 |
|
60 // TRUE means we printed messages about reading startup files. |
|
61 extern bool reading_startup_message_printed; |
|
62 |
|
63 // TRUE means input is coming from startup file. |
|
64 extern bool input_from_startup_file; |
|
65 |
|
66 // TRUE means that input is coming from a file that was named on |
|
67 // the command line. |
|
68 extern bool input_from_command_line_file; |
|
69 |
3489
|
70 // TRUE means that we are in the process of evaluating a function |
|
71 // body. The parser might be called in that case if we are looking at |
|
72 // an eval() statement. |
|
73 extern bool evaluating_function_body; |
|
74 |
4186
|
75 // Keep track of symbol table information when parsing functions. |
4238
|
76 extern std::stack<symbol_table*> symtab_context; |
|
77 |
|
78 // Name of parent function when parsing function files that might |
|
79 // contain nested functions. |
|
80 extern std::string parent_function_name; |
4186
|
81 |
3162
|
82 // TRUE means warn about function files that have time stamps in the future. |
|
83 extern bool Vwarn_future_time_stamp; |
|
84 |
4238
|
85 // Keep a count of how many END tokens we expect. |
|
86 extern int end_tokens_expected; |
|
87 |
3021
|
88 extern void |
|
89 parse_and_execute (FILE *f); |
|
90 |
|
91 extern void |
3523
|
92 parse_and_execute (const std::string& s, bool verbose = false, |
3021
|
93 const char *warn_for = 0); |
|
94 |
3523
|
95 extern std::string get_help_from_file (const std::string& f); |
3021
|
96 |
|
97 extern bool |
|
98 load_fcn_from_file (symbol_record *sym_rec, bool exec_script); |
|
99 |
|
100 extern octave_value_list |
3772
|
101 feval (const std::string& name, |
|
102 const octave_value_list& args = octave_value_list (), |
|
103 int nargout = 0); |
3156
|
104 |
|
105 extern octave_value_list |
3772
|
106 feval (const octave_value_list& args, int nargout = 0); |
3021
|
107 |
3100
|
108 extern octave_value_list |
3523
|
109 eval_string (const std::string&, bool silent, int& parse_status, int hargout); |
3099
|
110 |
|
111 extern octave_value |
3523
|
112 eval_string (const std::string&, bool silent, int& parse_status); |
3021
|
113 |
1
|
114 #endif |
|
115 |
|
116 /* |
|
117 ;;; Local Variables: *** |
|
118 ;;; mode: C++ *** |
|
119 ;;; End: *** |
|
120 */ |