changeset 28263:d63e05fdf11b

maint: merge stable to default.
author John W. Eaton <jwe@octave.org>
date Mon, 04 May 2020 11:51:22 -0400
parents 062f93e05658 (current diff) 3e3ad0ae247f (diff)
children 6b6cb174d6bb
files
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll	Mon May 04 11:20:09 2020 +0200
+++ b/libinterp/parse-tree/lex.ll	Mon May 04 11:51:22 2020 -0400
@@ -824,7 +824,11 @@
 
     curr_lexer->pop_start_state ();
 
-    HANDLE_EOB_OR_EOF (-2);
+    // If yytext contains the special ASCII 1 marker inserted by
+    // push_lexer::fill_flex_buffer and we are at the end of the buffer,
+    // return -1 to indicate that we are expecting more input.
+
+    HANDLE_EOB_OR_EOF (yytext[0] == '\001' ? -1 : -2);
 
     // Restore all characters except the ASCII 1 marker that was
     // inserted by push_lexer::fill_flex_buffer.