c: make the symbol kind definition nicer to read

From

    enum yysymbol_kind_t
    {
      YYSYMBOL_YYEMPTY = -2,
      YYSYMBOL_YYEOF = 0,
      YYSYMBOL_YYERROR = 1,
      YYSYMBOL_YYUNDEF = 2,

to

    enum yysymbol_kind_t
    {
      YYSYMBOL_YYEMPTY = -2,
      YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
      YYSYMBOL_YYERROR = 1,                    /* error  */
      YYSYMBOL_YYUNDEF = 2,                    /* $undefined  */

* data/skeletons/bison.m4 (b4_last_symbol): New.
(b4_symbol_enum, b4_symbol_enums): Reformat the output.
* data/skeletons/c.m4
This commit is contained in:
Akim Demaille
2020-04-06 07:36:00 +02:00
parent 10e61eec6d
commit e657f04b62
4 changed files with 120 additions and 119 deletions

View File

@@ -565,7 +565,10 @@ m4_define([_b4_last_enum_token],
[m4_define([b4_last_enum_token], [$1])])])
b4_symbol_foreach([_b4_last_enum_token])
# b4_last_symbol
# --------------
# The code of the last symbol.
m4_define([b4_last_symbol], m4_eval(b4_tokens_number + b4_nterms_number - 1))
## ------- ##
## Types. ##