grammars: fix display of nul character in error message

Reported by Marc Mendiola.
http://lists.gnu.org/archive/html/help-bison/2012-10/msg00017.html

* gnulib: Update to get quote_mem.
* src/scan-gram.l: Use it.
* tests/input.at (Invalid inputs): Additional checks.
* tests/named-refs.at: Likewise.
This commit is contained in:
Akim Demaille
2012-11-01 13:47:12 +01:00
parent baf0bd6145
commit 95066e9208
5 changed files with 28 additions and 13 deletions

View File

@@ -291,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));
}
<<EOF>> {
@@ -375,7 +375,7 @@ splice (\\[ \f\t\v]*\n)*
}
. {
complain_at (*loc, _("invalid character in bracketed name: %s"),
quote (yytext));
quote_mem (yytext, yyleng));
}
<<EOF>> {
BEGIN bracketed_id_context_state;