skeletons: clarify the tag of special tokens

From

    GRAM_EOF = 0,                  /* $end  */
    GRAM_ERRCODE = 1,              /* error  */
    GRAM_UNDEF = 2,                /* $undefined  */

to

    GRAM_EOF = 0,                  /* "end of file"  */
    GRAM_ERRCODE = 1,              /* error  */
    GRAM_UNDEF = 2,                /* "invalid token"  */

* src/output.c (symbol_tag): New.
Use it to pass the token names and the symbol tags to the skeletons.

* tests/input.at: Adjust.
This commit is contained in:
Akim Demaille
2020-04-12 13:44:57 +02:00
parent ff50f6f223
commit ffa46e6516
4 changed files with 34 additions and 26 deletions

View File

@@ -77,9 +77,9 @@ extern int gram_debug;
# define GRAM_TOKENTYPE
enum gram_tokentype
{
GRAM_EOF = 0, /* $end */
GRAM_EOF = 0, /* "end of file" */
GRAM_ERRCODE = 1, /* error */
GRAM_UNDEF = 2, /* $undefined */
GRAM_UNDEF = 2, /* "invalid token" */
STRING = 3, /* "string" */
TSTRING = 4, /* "translatable string" */
PERCENT_TOKEN = 5, /* "%token" */