changeset 1053:3488f9e13125

[project @ 1995-01-19 22:51:58 by jwe]
author jwe
date Thu, 19 Jan 1995 22:52:06 +0000
parents 6ce6cae7e63a
children 713664195cba
files src/lex.l src/parse.y
diffstat 2 files changed, 24 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/lex.l	Thu Jan 19 19:25:37 1995 +0000
+++ b/src/lex.l	Thu Jan 19 22:52:06 1995 +0000
@@ -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)
--- a/src/parse.y	Thu Jan 19 19:25:37 1995 +0000
+++ b/src/parse.y	Thu Jan 19 22:52:06 1995 +0000
@@ -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'