diff --git a/libinterp/parse-tree/lex.ll b/libinterp/parse-tree/lex.ll --- a/libinterp/parse-tree/lex.ll +++ b/libinterp/parse-tree/lex.ll @@ -526,6 +526,23 @@ ANY_INCLUDING_NL (.|{NL}) curr_lexer->m_filepos.increment_column (yyleng); } +%{ +// Continuation lines. Allow arbitrary text after continuations. +%} + +\.\.\.{ANY_EXCEPT_NL}*{NL} { + curr_lexer->lexer_debug ("\\.\\.\\.{ANY_EXCEPT_NL}*{NL}"); + + curr_lexer->handle_continuation (); + + // Even if there wasn't actually a space, treat the continuation as + // if it were a space. But since it will be gobbled up later + // anyway, there's no need to actually unput a space on the input + // stream. + + curr_lexer->mark_previous_token_trailing_space (); + } + {S}* { curr_lexer->lexer_debug ("{S}*");