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

@@ -77,7 +77,7 @@ extern int gram_debug;
# define GRAM_TOKENTYPE
enum gram_tokentype
{
GRAM_EOF = 0, /* "end of file" */
GRAM_EOF = 0, /* $end */
GRAM_ERRCODE = 1, /* error */
GRAM_UNDEF = 2, /* $undefined */
STRING = 3, /* "string" */