Mercurial > octave
changeset 27511:257105b5193a
fix push parser to return status indicating more input is needed
* oct-parse.yy (push_parser::run): If the lexer fails to return a
valid token, set return status to -1 and break from loop. If at end
of buffer but EOF parameter is false, return without error.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 11 Oct 2019 11:42:09 -0400 |
parents | 5438a82a18fb |
children | 549273db93e4 |
files | libinterp/parse-tree/oct-parse.yy |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.yy Fri Oct 11 11:17:02 2019 -0400 +++ b/libinterp/parse-tree/oct-parse.yy Fri Oct 11 11:42:09 2019 -0400 @@ -4418,11 +4418,12 @@ if (token < 0) { + status = -1; + if (! eof && m_lexer.at_end_of_buffer ()) - { - status = -1; - break; - } + return status; + + break; } yypstate *pstate = static_cast<yypstate *> (m_parser_state);