]> git.saurik.com Git - bison.git/commitdiff
Handle a trailing `:' in a user-supplied C++ namespace better.
authorJoel E. Denny <jdenny@ces.clemson.edu>
Tue, 19 May 2009 21:51:05 +0000 (17:51 -0400)
committerJoel E. Denny <jdenny@ces.clemson.edu>
Tue, 19 May 2009 22:14:25 +0000 (18:14 -0400)
* data/c++.m4 (b4_namespace_close): Don't let it be printed
among the closing braces here.  This fix might make the
generated code easier to debug, but otherwise it should be
insignificant because a trailing `:' is a C++ error already.

ChangeLog
data/c++.m4

index a46ff2bac828027ad46772c91298ce43f478660b..87c37012b496a0a2b03683b8e11e7546948c92ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-19  Joel E. Denny  <jdenny@ces.clemson.edu>
+
+       Handle a trailing `:' in a user-supplied C++ namespace better.
+       * data/c++.m4 (b4_namespace_close): Don't let it be printed
+       among the closing braces here.  This fix might make the
+       generated code easier to debug, but otherwise it should be
+       insignificant because a trailing `:' is a C++ error already.
+
 2009-05-19  Akim Demaille  <demaille@gostai.com>
 
        remove useless variable.
index 593390d61abf90939504d4c45207b9175ba3abdd..e82e98b30510b8cfc8d068e4272bf7fdc5ee15b2 100644 (file)
@@ -74,7 +74,7 @@ m4_define([b4_namespace_open],
 
 m4_define([b4_namespace_close],
 [b4_user_code([b4_percent_define_get_syncline([[namespace]])
-m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
+m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref[ ]),
                                     [^\(.\)[    ]*\(::\)?\([^][:]\|:[^][:]\)*],
                                     [\1])),
              [::\([^][:]\|:[^][:]\)*], [} ])[} // ]b4_namespace_ref])])