[Top][All Lists]
[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: |
Sat, 29 Sep 2007 13:44:16 +0200 |
On 29 Sep 2007, at 04:06, Sebastian Pipping wrote:
I noticed two things with %prefix when combined
with a C++ parser that might be bugs:
(1) %prefix=abc renames function yylex to "abclex"
instead of putting it in namespace abc.
You are right, it should be in a namespace, though I think it might
have been left so, i order to sync with Flex. I think one might put
it in a namespace, but have another option, say %lexer-prefix, which
if present, writes it in the global form.
(2) Nested namespaces do not work:
%prefix=abc::def should give
namespace abc {
namespace def {
..
}
}
instead of
namespace abc::def {
..
}
I guess?
This is due to a bug in the C++ standard, but they seem unlikely to
fix things like that there :-). So it should probably write nested
namespaces, or not admitting "::" in the name.
Is this known and planned to fix?
Don't know; I have cc-ed some Bison developers.
Hans Aberg