skeletons: make the eof token translatable if i18n is enabled

* src/output.c (has_translations): New.
(prepare_symbol_names): Translate endtoken if the user already
translated tokens.

* examples/c/bistromathic/parse.y, src/parse-gram.y: Simplify.
This commit is contained in:
Akim Demaille
2020-04-12 11:07:03 +02:00
parent 72c9fa4510
commit 05be0fef95
5 changed files with 45 additions and 34 deletions

View File

@@ -81,7 +81,6 @@
RPAREN ")"
EQUAL "="
EXIT "exit"
EOF 0 _("end of file")
<double>
NUM _("double precision number")
<symrec*>
@@ -236,7 +235,7 @@ yylex (const char **line, YYSTYPE *yylval, YYLTYPE *yylloc)
case '(': return TOK_LPAREN;
case ')': return TOK_RPAREN;
case 0: return TOK_EOF;
case 0: return TOK_YYEOF;
default:
// Numbers.