help-bison
[Top][All Lists]
Advanced

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

Re: %prefix with C++ namespaces


From: Hans Aberg
Subject: Re: %prefix with C++ namespaces
Date: Wed, 3 Oct 2007 11:36:25 +0200

On 2 Oct 2007, at 21:43, Akim Demaille wrote:

  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.

When creating namespace names, the leading "::" must be stripped, and the "::" within the name must be converted into nested "namespace <name> {...}".

But when referencing names, a leading "::" is allowed; then it should not be stripped I think. I am not sure how this would arises in the Bison context, though.

A trailing "::" is always an error.

  Hans Aberg






reply via email to

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