From fc2040a750fdfedf12aff2c382a49b086d06e59d Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 8 Dec 2019 16:01:49 +0100 Subject: [PATCH] c++: fix comments for %code blocks In a project of mine, vcsn, this commit fixes the following comments. --- /tmp/parse.hh 2019-12-08 15:51:24.792934703 +0100 +++ lib/vcsn/rat/parse.hh 2019-12-08 16:00:59.137107503 +0100 @@ -43,7 +43,7 @@ #ifndef YY_YY_USERS_AKIM_SRC_LRDE_2_LIB_VCSN_RAT_PARSE_HH_INCLUDED # define YY_YY_USERS_AKIM_SRC_LRDE_2_LIB_VCSN_RAT_PARSE_HH_INCLUDED -// // "%code requires" blocks. +// "%code requires" blocks. #line 20 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" #include @@ -1851,7 +1851,7 @@ -// // "%code provides" blocks. +// "%code provides" blocks. #line 60 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" #define YY_DECL_(Class) \ * data/skeletons/bison.m4 (b4_percent_code_get): Pass an expanded string to b4_comment. --- data/skeletons/bison.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/skeletons/bison.m4 b/data/skeletons/bison.m4 index 7cc4467b..7ca8497b 100644 --- a/data/skeletons/bison.m4 +++ b/data/skeletons/bison.m4 @@ -975,8 +975,8 @@ m4_define([b4_percent_code_get], [m4_pushdef([b4_macro_name], [[b4_percent_code(]$1[)]])dnl m4_ifval([$1], [m4_define([b4_percent_code_bison_qualifiers(]$1[)])])dnl m4_ifdef(b4_macro_name, -[b4_comment([m4_if([$#], [0], [[Unqualified %code]], - [["%code ]$1["]])[ blocks.]]) +[b4_comment(m4_if([$#], [0], [[[Unqualified %code blocks.]]], + [[["%code ]$1[" blocks.]]])) b4_user_code([m4_indir(b4_macro_name)])])dnl m4_popdef([b4_macro_name])])