c: make the generated YYSTYPE nicer to read

From

    union GRAM_STYPE
    {
      /* precedence_declarator  */
      assoc precedence_declarator;
      /* "string"  */
      char* STRING;
      /* "translatable string"  */
      char* TSTRING;
      /* "{...}"  */
      char* BRACED_CODE;
      /* "%?{...}"  */

to

    union GRAM_STYPE
    {
      assoc precedence_declarator;             /* precedence_declarator  */
      char* STRING;                            /* "string"  */
      char* TSTRING;                           /* "translatable string"  */
      char* BRACED_CODE;                       /* "{...}"  */

* data/skeletons/c.m4 (b4_symbol_type_register): Use m4_format to
align the comments.
* src/parse-gram.h: Regen.
This commit is contained in:
Akim Demaille
2020-04-05 17:37:56 +02:00
parent e9fddab715
commit 149e280aab
2 changed files with 45 additions and 87 deletions

View File

@@ -711,9 +711,9 @@ m4_define([b4_symbol_type_register],
[b4_symbol([$1], [id])],
[yykind_[]b4_symbol([$1], [number])])])dnl
m4_append([b4_union_members],
m4_expand([
b4_symbol_tag_comment([$1])dnl
b4_symbol([$1], [type]) b4_symbol([$1], [type_tag]);]))
m4_expand([m4_format([ %-40s %s],
m4_expand([b4_symbol([$1], [type]) b4_symbol([$1], [type_tag]);]),
[b4_symbol_tag_comment([$1])])]))
])