# HG changeset patch # User Stefan Mahr # Date 1391210177 -3600 # Node ID 4d2e15abe5e7e2e3def440fe95d3da71fc44c80c # Parent 93c019f00e595b0e839f543584a885a56a1f316f Disallow comments after continuation in double-quoted strings (bug #41415). * lex.ll ((\.\.\.){S}*{NL}, \\{S}+{NL}): Allow only whitespace to follow continuation markers. diff -r 93c019f00e59 -r 4d2e15abe5e7 libinterp/parse-tree/lex.ll --- a/libinterp/parse-tree/lex.ll Mon Feb 03 11:45:03 2014 -0500 +++ b/libinterp/parse-tree/lex.ll Sat Feb 01 00:16:17 2014 +0100 @@ -770,9 +770,8 @@ curr_lexer->string_text += '\v'; } -(\.\.\.){S}*{NL} | -(\.\.\.){S}*{CCHAR}{ANY_EXCEPT_NL}*{NL} { - curr_lexer->lexer_debug ("(\\.\\.\\.){S}*{NL}|(\\.\\.\\.){S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}"); +(\.\.\.){S}*{NL} { + curr_lexer->lexer_debug ("(\\.\\.\\.){S}*{NL}"); static const char *msg = "'...' continuations in double-quoted character strings are obsolete and will not be allowed in a future version of Octave; please use '\\' instead"; @@ -788,9 +787,8 @@ HANDLE_STRING_CONTINUATION; } -\\{S}+{NL} | -\\{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL} { - curr_lexer->lexer_debug ("\\\\{S}+{NL}|\\\\{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}"); +\\{S}+{NL} { + curr_lexer->lexer_debug ("\\\\{S}+{NL}"); static const char *msg = "white space and comments after continuation markers in double-quoted character strings are obsolete and will not be allowed in a future version of Octave";