/* Return value of phase7_getc when EOF is reached. */
#define P7_EOF (-1)
-#define P7_STRING_END (-2)
/* Replace escape sequences within character strings with their single
character equivalents. */
/* Use phase 3, because phase 4 elides comments. */
c = phase3_getc ();
+ if (c == EOF)
+ return P7_EOF;
+
/* Return a magic newline indicator, so that we can distinguish
between the user requesting a newline in the string (e.g. using
"\n" or "\012") from the user failing to terminate the string or
phase7_ungetc ('\n');
break;
}
- if (c == EOF || c == P7_QUOTE)
+ if (c == P7_EOF || c == P7_QUOTE)
break;
}
tp->type = token_type_character_constant;
phase7_ungetc ('\n');
break;
}
- if (c == EOF || c == P7_QUOTES)
+ if (c == P7_EOF || c == P7_QUOTES)
break;
if (c == P7_QUOTE)
c = '\'';
/* Return value of phase7_getc when EOF is reached. */
#define P7_EOF (-1)
-#define P7_STRING_END (-2)
/* Replace escape sequences within character strings with their single
character equivalents. */
/* Use phase 1, because phase 2 elides comments. */
c = phase1_getc ();
+ if (c == EOF)
+ return P7_EOF;
+
/* Return a magic newline indicator, so that we can distinguish
between the user requesting a newline in the string (e.g. using
"\n" or "\012") from the user failing to terminate the string or
phase7_ungetc ('\n');
break;
}
- if (c == EOF || c == P7_QUOTE)
+ if (c == P7_EOF || c == P7_QUOTE)
break;
}
tp->type = last_token_type = token_type_character_constant;
}
if (c == P7_QUOTES)
break;
- if (c == EOF)
+ if (c == P7_EOF)
break;
if (c == P7_QUOTE)
c = '\'';