Mercurial > hg > octave-nkf
comparison libinterp/parse-tree/parse.h @ 16138:284e2ca86ef7
execute parser using member function of octave_parser class
* parse.h, oct-parse.yy (octave_parser::run): New function.
(octave_parse_input): Delete.
* toplev.cc (main_loop): Call octave_parser::run for curr_parser
instead of calling octave_parse_input.
* input.cc (get_debug_input): Likewise.
* oct-parse.yy (eval_string, parse_fcn_file): Likewise.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 27 Feb 2013 13:07:38 -0500 |
parents | ed36d5543b27 |
children | 2fd39ab12209 |
comparison
equal
deleted
inserted
replaced
16137:a885686b732a | 16138:284e2ca86ef7 |
---|---|
129 extern OCTINTERP_API octave_value | 129 extern OCTINTERP_API octave_value |
130 eval_string (const std::string&, bool silent, int& parse_status); | 130 eval_string (const std::string&, bool silent, int& parse_status); |
131 | 131 |
132 extern OCTINTERP_API void cleanup_statement_list (tree_statement_list **lst); | 132 extern OCTINTERP_API void cleanup_statement_list (tree_statement_list **lst); |
133 | 133 |
134 extern OCTINTERP_API int octave_parse_input (void); | |
135 | |
136 class | 134 class |
137 octave_parser | 135 octave_parser |
138 { | 136 { |
139 public: | 137 public: |
140 | 138 |
141 octave_parser (void) { } | 139 octave_parser (void) { } |
142 | 140 |
143 ~octave_parser (void) { } | 141 ~octave_parser (void) { } |
142 | |
143 int run (void); | |
144 | 144 |
145 // Error mesages for mismatched end tokens. | 145 // Error mesages for mismatched end tokens. |
146 void end_error (const char *type, token::end_tok_type ettype, int l, int c); | 146 void end_error (const char *type, token::end_tok_type ettype, int l, int c); |
147 | 147 |
148 // Check to see that end tokens are properly matched. | 148 // Check to see that end tokens are properly matched. |