skeletons: use "invalid token" instead of "$undefined"

* src/output.c (prepare_symbol_names): Also handle undeftoken.
* tests/actions.at, tests/calc.at, tests/regression.at: Adjust.
This commit is contained in:
Akim Demaille
2020-04-12 12:12:01 +02:00
parent 05be0fef95
commit ff50f6f223
5 changed files with 15 additions and 10 deletions

View File

@@ -225,6 +225,11 @@ prepare_symbol_names (char const *muscle_name)
tag = "\"end of file\"";
translatable = with_translations;
}
else if (symbols[i]->content == undeftoken->content)
{
tag = "\"invalid token\"";
translatable = with_translations;
}
char *cp
= tag[0] == '"' && !quote

View File

@@ -643,7 +643,7 @@ yysymbol_name (yysymbol_kind_t yysymbol)
{
static const char *const yy_sname[] =
{
N_("end of file"), "error", "$undefined", N_("string"),
N_("end of file"), "error", N_("invalid token"), N_("string"),
N_("translatable string"), "%token", "%nterm", "%type", "%destructor",
"%printer", "%left", "%right", "%nonassoc", "%precedence", "%prec",
"%dprec", "%merge", "%code", "%default-prec", "%define", "%defines",