Mercurial > hg > octave-lyh
changeset 16574:b678d2d10e53
reset parser state on parse error (bug #38840)
* oct-parse.in.yy (octave_base_parser::reset): Reset all parser
state variables to initial values.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 27 Apr 2013 21:30:55 -0400 |
parents | dd66c5bcb21e |
children | 1a1f8199b5bb |
files | libinterp/parse-tree/oct-parse.in.yy |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.in.yy +++ b/libinterp/parse-tree/oct-parse.in.yy @@ -1484,8 +1484,18 @@ void octave_base_parser::reset (void) { + endfunction_found = false; + autoloading = false; + fcn_file_from_relative_lookup = false; + parsing_subfunctions = false; + max_fcn_depth = 0; + curr_fcn_depth = 0; + primary_fcn_scope = -1; + curr_class_name = ""; + function_scopes.clear (); + primary_fcn_ptr = 0; + delete stmt_list; - stmt_list = 0; lexer.reset ();