Mercurial > hg > octave-nkf
changeset 17246:8be8a65d3ca8
Ignore anything after the continuation marker '...' (bug #38653)
* lex.ll: Ignore any text following '...' line continuation marker.
* line-continue.tst: New test.
author | Stefan Mahr <dac922@gmx.de> |
---|---|
date | Mon, 12 Aug 2013 17:36:54 +0200 |
parents | 7babcdb9bc13 |
children | e993fa124b46 |
files | libinterp/parse-tree/lex.ll test/line-continue.tst |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll +++ b/libinterp/parse-tree/lex.ll @@ -250,7 +250,6 @@ D [0-9] S [ \t] NL ((\n)|(\r)|(\r\n)) -CONT ((\.\.\.)|(\\)) Im [iIjJ] CCHAR [#%] IDENT ([_$a-zA-Z][_$a-zA-Z0-9]*) @@ -964,9 +963,10 @@ // Continuation lines. Allow comments after continuations. %} -{CONT}{S}*{NL} | -{CONT}{S}*{CCHAR}.*{NL} { - curr_lexer->lexer_debug ("{CONT}{S}*{NL}|{CONT}{S}*{CCHAR}.*{NL}"); +\\{S}*{NL} | +\\{S}*{CCHAR}.*{NL} | +\.\.\..*{NL} { + curr_lexer->lexer_debug ("\\.\\.\\..*{NL}|\\\\{S}*{NL}|\\\\{S}*{CCHAR}.*{NL}"); curr_lexer->handle_continuation (); }