X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/4c787a31df24b3bf184a4e109056a41d5712e5a7..bfdcc3a0b273c116e01d289ce52d400f22e4da14:/src/scan-gram.l?ds=sidebyside diff --git a/src/scan-gram.l b/src/scan-gram.l index 463d2263..ad061cc6 100644 --- a/src/scan-gram.l +++ b/src/scan-gram.l @@ -36,10 +36,9 @@ #include "reader.h" #include "uniqstr.h" -#include +#include #include #include -#include #include "scan-gram.h" @@ -292,7 +291,7 @@ splice (\\[ \f\t\v]*\n)* } . { - complain_at (*loc, _("invalid character: %s"), quote (yytext)); + complain_at (*loc, _("invalid character: %s"), quote_mem (yytext, yyleng)); } <> { @@ -376,7 +375,7 @@ splice (\\[ \f\t\v]*\n)* } . { complain_at (*loc, _("invalid character in bracketed name: %s"), - quote (yytext)); + quote_mem (yytext, yyleng)); } <> { BEGIN bracketed_id_context_state; @@ -561,7 +560,7 @@ splice (\\[ \f\t\v]*\n)* \\(.|\n) { char const *p = yytext + 1; /* Quote only if escaping won't make the character visible. */ - if (isspace ((unsigned char) *p) && isprint ((unsigned char) *p)) + if (c_isspace ((unsigned char) *p) && c_isprint ((unsigned char) *p)) p = quote (p); else p = quotearg_style_mem (escape_quoting_style, p, 1); @@ -875,7 +874,7 @@ unexpected_end (boundary start, char const *msgid, char const *token_end) loc.end = scanner_cursor; token_end = quote (token_end); // Instead of '\'', display "'". - if (STREQ (token_end, "'\\''", '\'', '\\', '\'', '\'', 0,0,0,0,0)) + if (!strcmp (token_end, "'\\''")) token_end = "\"'\""; complain_at (loc, _(msgid), token_end); }