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 #include "SLStack.h" |
|
31 |
|
32 extern void reset_parser (void); |
|
33 extern int yylex (void); |
|
34 extern int yyparse (void); |
|
35 |
|
36 class tree; |
|
37 class tree_matrix; |
|
38 class tree_identifier; |
3021
|
39 class symbol_record; |
1
|
40 class symbol_table; |
3021
|
41 class octave_value; |
|
42 class octave_value_list; |
1
|
43 |
|
44 // Temporary symbol table pointer used to cope with bogus function syntax. |
|
45 extern symbol_table *tmp_local_sym_tab; |
|
46 |
|
47 // Nonzero means print parser debugging info (-d). |
|
48 extern int yydebug; |
|
49 |
|
50 // The current input line number. |
|
51 extern int input_line_number; |
|
52 |
|
53 // The column of the current token. |
|
54 extern int current_input_column; |
|
55 |
338
|
56 // Buffer for help text snagged from function files. |
1755
|
57 extern string help_buf; |
1
|
58 |
3021
|
59 // TRUE means we are using readline. |
|
60 extern bool line_editing; |
|
61 |
|
62 // TRUE means we printed messages about reading startup files. |
|
63 extern bool reading_startup_message_printed; |
|
64 |
|
65 // TRUE means input is coming from startup file. |
|
66 extern bool input_from_startup_file; |
|
67 |
|
68 // TRUE means that input is coming from a file that was named on |
|
69 // the command line. |
|
70 extern bool input_from_command_line_file; |
|
71 |
3489
|
72 // TRUE means that we are in the process of evaluating a function |
|
73 // body. The parser might be called in that case if we are looking at |
|
74 // an eval() statement. |
|
75 extern bool evaluating_function_body; |
|
76 |
3162
|
77 // TRUE means warn about function files that have time stamps in the future. |
|
78 extern bool Vwarn_future_time_stamp; |
|
79 |
3021
|
80 extern void |
|
81 parse_and_execute (FILE *f); |
|
82 |
|
83 extern void |
|
84 parse_and_execute (const string& s, bool verbose = false, |
|
85 const char *warn_for = 0); |
|
86 |
|
87 extern string get_help_from_file (const string& f); |
|
88 |
|
89 extern bool |
|
90 load_fcn_from_file (symbol_record *sym_rec, bool exec_script); |
|
91 |
|
92 extern octave_value_list |
3156
|
93 feval (const string& name, const octave_value_list& args, int nargout); |
|
94 |
|
95 extern octave_value_list |
3021
|
96 feval (const octave_value_list& args, int nargout); |
|
97 |
3100
|
98 extern octave_value_list |
3099
|
99 eval_string (const string&, bool silent, int& parse_status, int hargout); |
|
100 |
|
101 extern octave_value |
3021
|
102 eval_string (const string&, bool silent, int& parse_status); |
|
103 |
1
|
104 #endif |
|
105 |
|
106 /* |
|
107 ;;; Local Variables: *** |
|
108 ;;; mode: C++ *** |
|
109 ;;; End: *** |
|
110 */ |