diff src/lex.l @ 1031:59f5eb2d5eb3

[project @ 1995-01-15 21:11:11 by jwe]
author jwe
date Sun, 15 Jan 1995 21:11:11 +0000
parents 7a632c749c67
children 3488f9e13125
line wrap: on
line diff
--- a/src/lex.l	Fri Jan 13 03:19:26 1995 +0000
+++ b/src/lex.l	Sun Jan 15 21:11:11 1995 +0000
@@ -1526,7 +1526,7 @@
   ostrstream buf;
 
   int c;
-  int prev = 0;
+  int escape_pending = 0;
 
   while ((c = yyinput ()) != EOF)
     {
@@ -1536,13 +1536,14 @@
 	{
 	  if (! have_continuation ())
 	    buf << (char) c;
-	  goto next;
+
+	  escape_pending = ! escape_pending;
+	  continue;
 	}
       else if (c == '.')
 	{
 	  if (! have_ellipsis_continuation ())
 	    buf << (char) c;
-	  goto next;
 	}
       else if (c == '\n')
 	{
@@ -1550,7 +1551,7 @@
 	}
       else if (c == delim)
 	{
-	  if (prev == '\\')
+	  if (escape_pending)
 	    buf << (char) c;
 	  else
 	    {
@@ -1597,8 +1598,7 @@
 	  buf << (char) c;
 	}
 
-    next:
-      prev = c;
+      escape_pending = 0;
     }
 
   return LEXICAL_ERROR;