X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/9874f80b2e813a8ad8e5562dbbaa30ecafd5e7d8..bcbbf654863dd285b176a0f54a75a28c4bdac1d3:/src/scan-gram.l diff --git a/src/scan-gram.l b/src/scan-gram.l index 81127f88..75023f4f 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -872,6 +872,10 @@ unexpected_end (boundary start, char const *msgid, char const *token_end) location loc; loc.start = start; loc.end = scanner_cursor; + token_end = quote (token_end); + // Instead of '\'', display "'". + if (!strcmp (token_end, "'\\''")) + token_end = "\"'\""; complain_at (loc, _(msgid), token_end); } @@ -884,7 +888,7 @@ unexpected_end (boundary start, char const *msgid, char const *token_end) static void unexpected_eof (boundary start, char const *token_end) { - unexpected_end (start, N_("missing '%s' at end of file"), token_end); + unexpected_end (start, N_("missing %s at end of file"), token_end); } @@ -895,7 +899,7 @@ unexpected_eof (boundary start, char const *token_end) static void unexpected_newline (boundary start, char const *token_end) { - unexpected_end (start, N_("missing '%s' at end of line"), token_end); + unexpected_end (start, N_("missing %s at end of line"), token_end); }