Use it to systematize the error message on unexpected EOF.
+/* Report an unexpected end of file at LOC.  A token or comment began
+   with TOKEN_START, but an end of file was encountered and the
+   expected TOKEN_END was missing.  */
+
+static void
+unexpected_end_of_file (location_t loc,
+                       char const *token_start, char const *token_end)
+{
+  complain_at (loc, _("unexpected end of file in `%s ... %s'"),
+              token_start, token_end);
+}
+
+
 
 /* STRING_OBSTACK -- Used to store all the characters that we need to
    keep (to construct ID, STRINGS etc.).  Use the following macros to
 
 /* STRING_OBSTACK -- Used to store all the characters that we need to
    keep (to construct ID, STRINGS etc.).  Use the following macros to
-    complain_at (*yylloc, _("unexpected end of file in a comment"));
+    unexpected_end_of_file (*yylloc, "/*", "*/");
   [^*\[\]]+|"*"   YY_OBS_GROW;
 
   <<EOF>> {
   [^*\[\]]+|"*"   YY_OBS_GROW;
 
   <<EOF>> {
-    complain_at (*yylloc, _("unexpected end of file in a comment"));
+    unexpected_end_of_file (*yylloc, "/*", "*/");
   [^\"\\]+  YY_OBS_GROW;
 
   <<EOF>> {
   [^\"\\]+  YY_OBS_GROW;
 
   <<EOF>> {
-    complain_at (*yylloc, _("unexpected end of file in a string"));
+    unexpected_end_of_file (*yylloc, "\"", "\"");
     assert (yy_top_state () == INITIAL);
     YY_OBS_FINISH;
     yylval->string = last_string;
     assert (yy_top_state () == INITIAL);
     YY_OBS_FINISH;
     yylval->string = last_string;
   [^\'\\]+  YY_OBS_GROW;
 
   <<EOF>> {
   [^\'\\]+  YY_OBS_GROW;
 
   <<EOF>> {
-    complain_at (*yylloc, _("unexpected end of file in a character literal"));
+    unexpected_end_of_file (*yylloc, "'", "'");
     assert (yy_top_state () == INITIAL);
     YY_OBS_FINISH;
     yylval->string = last_string;
     assert (yy_top_state () == INITIAL);
     YY_OBS_FINISH;
     yylval->string = last_string;
   \\                   YY_OBS_GROW;
 
   <<EOF>> {
   \\                   YY_OBS_GROW;
 
   <<EOF>> {
-    complain_at (*yylloc, _("unexpected end of file in a character literal"));
+    unexpected_end_of_file (*yylloc, "'", "'");
     assert (yy_top_state () != INITIAL);
     yy_pop_state ();
   }
     assert (yy_top_state () != INITIAL);
     yy_pop_state ();
   }
   \\                   YY_OBS_GROW;
 
   <<EOF>> {
   \\                   YY_OBS_GROW;
 
   <<EOF>> {
-    complain_at (*yylloc, _("unexpected end of file in a string"));
+    unexpected_end_of_file (*yylloc, "\"", "\"");
     assert (yy_top_state () != INITIAL);
     yy_pop_state ();
   }
     assert (yy_top_state () != INITIAL);
     yy_pop_state ();
   }
   [^\"$%\'/<@\[\]\{\}]+|[$%/<@]|"<"{splice}"<"  YY_OBS_GROW;
 
   <<EOF>> {
   [^\"$%\'/<@\[\]\{\}]+|[$%/<@]|"<"{splice}"<"  YY_OBS_GROW;
 
   <<EOF>> {
-    complain_at (*yylloc, _("unexpected end of file in `{ ... }'"));
+    unexpected_end_of_file (*yylloc, "{", "}");
     yy_pop_state ();
     YY_OBS_FINISH;
     yylval->string = last_string;
     yy_pop_state ();
     YY_OBS_FINISH;
     yylval->string = last_string;
   "%"                YY_OBS_GROW;
 
   <<EOF>> {
   "%"                YY_OBS_GROW;
 
   <<EOF>> {
-    complain_at (*yylloc, _("unexpected end of file in `%%{ ... %%}'"));
+    unexpected_end_of_file (*yylloc, "%{", "%}");
     yy_pop_state ();
     YY_OBS_FINISH;
     yylval->string = last_string;
     yy_pop_state ();
     YY_OBS_FINISH;
     yylval->string = last_string;
     /* A non-ASCII host.  Use CODE to index into a table of the C
        basic execution character set, which is guaranteed to exist on
        all Standard C platforms.  This table also includes '$', '@',
     /* A non-ASCII host.  Use CODE to index into a table of the C
        basic execution character set, which is guaranteed to exist on
        all Standard C platforms.  This table also includes '$', '@',
-       and '`', which not in the basic execution character set but
+       and '`', which are not in the basic execution character set but
        which are unibyte characters on all the platforms that we know
        about.  */
     static signed char const table[] =
        which are unibyte characters on all the platforms that we know
        about.  */
     static signed char const table[] =