bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

c++: fix comments for %code blocks


From: Akim Demaille
Subject: c++: fix comments for %code blocks
Date: Sun, 8 Dec 2019 16:41:04 +0100

commit fc2040a750fdfedf12aff2c382a49b086d06e59d
Author: Akim Demaille <address@hidden>
Date:   Sun Dec 8 16:01:49 2019 +0100

    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 <iostream>
        @@ -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.

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])])
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]