# HG changeset patch # User jwe # Date 790555926 0 # Node ID 3488f9e131259256ce7e25ef4bcfe25229d8805f # Parent 6ce6cae7e63a70b348430a27cdaa6b242e774f47 [project @ 1995-01-19 22:51:58 by jwe] diff --git a/src/lex.l b/src/lex.l --- a/src/lex.l +++ b/src/lex.l @@ -1534,10 +1534,21 @@ if (c == '\\') { - if (! have_continuation ()) - buf << (char) c; - - escape_pending = ! escape_pending; + if (escape_pending) + { + buf << (char) c; + escape_pending = 0; + } + else + { + if (have_continuation ()) + escape_pending = 0; + else + { + buf << (char) c; + escape_pending = 1; + } + } continue; } else if (c == '.') @@ -1547,6 +1558,7 @@ } else if (c == '\n') { + error ("unterminated string constant"); break; } else if (c == delim) diff --git a/src/parse.y b/src/parse.y --- a/src/parse.y +++ b/src/parse.y @@ -300,9 +300,15 @@ YYABORT; } | simple_list parse_error - { ABORT_PARSE; } + { + parse_error ("parse error"); + ABORT_PARSE; + } | parse_error - { ABORT_PARSE; } + { + parse_error ("parse error"); + ABORT_PARSE; + } ; input1 : '\n'