[antlr-interest] Namespaces and generated Antlr classes.

Mark Kattenbelt mark.kattenbelt at gmail.com
Tue May 30 00:56:34 PDT 2006


Hi,

I have a working Lexer/Parser/Treewalker etc. There is one thing bugging
me though, how do I get the generated classes to be a member of a
namespace?

Say I have a dummy.g file which generates a class DummyParser in c++.
However I would like to make sure this class belongs to namespace dummy
as dummy::DummyParser.

Putting this in your .g is not an option:

header
{
namespace dummy
{
}

For obvious reasons.

Any suggestions?

Cheers,

Mark


More information about the antlr-interest mailing list