bison-patches
[Top][All Lists]
Advanced

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

[PATCH] Handle a trailing `:' in a user-supplied C++ namespace better.


From: Joel E. Denny
Subject: [PATCH] Handle a trailing `:' in a user-supplied C++ namespace better.
Date: Tue, 19 May 2009 18:26:44 -0400 (EDT)

I pushed this to master, branch-2.5, and branch-2.4.2.

>From 8c221795affd367ac106161610d42fc94633e3fd Mon Sep 17 00:00:00 2001
From: Joel E. Denny <address@hidden>
Date: Tue, 19 May 2009 17:51:05 -0400
Subject: [PATCH] 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.

diff --git a/data/c++.m4 b/data/c++.m4
index 593390d..e82e98b 100644
--- a/data/c++.m4
+++ b/data/c++.m4
@@ -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])])
-- 
1.5.4.3





reply via email to

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