help-bison
[Top][All Lists]
Advanced

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

Re: %prefix with C++ namespaces


From: Akim Demaille
Subject: Re: %prefix with C++ namespaces
Date: Tue, 2 Oct 2007 21:43:59 +0200


Le 2 oct. 07 à 19:55, Joel E. Denny a écrit :

On Tue, 2 Oct 2007, Hans Aberg wrote:

I do not think the leading "::"-issue is very important - but it would be
nice
showing one has given thought to it. :-)

So, I'm seeing no reason to disallow it.  If the user wants absolute
references, he should probably get absolute references.

It is OK with me whatever you do. Admitting a leading "::", and merely
stripping it out in the "namespace" nesting seems fine.

Given this comment and given our discussion about how wrapping parser.cc in a namespace probably won't ever work, I think we agree that the leading "::" is redundant where Bison uses the user-supplied namespace to generate a namespace declaration. That is, the outermost namespace is always the
global namespace.

Yes.  For a start, I know how to request a symbol starting from the
root name space, but I doubt there is a means to *put* something
starting from the top level namespace.  If, as in one of your
scenarios, we are enclosed in nested "namespace foo { ... }", afaik,
we can't use "namespace ::bar { ... }" to escape them.

Or maybe I have missed something in the thread?

I would just strip it.



reply via email to

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