[antlr-interest] C++ namespace/documentation
Ric Klaren
ric.klaren at gmail.com
Mon Feb 27 08:52:44 PST 2006
Hi,
On 2/27/06, Dejan Jovanović <dejan.jovanovic at gmail.com> wrote:
> I am using antlr 2.7.6 in C++ mode.
>
> Is it possible to get rid of the ANTLR_BEGIN_NAMESPACE(parser) macros in
> the generated sources and get the namespace declarations directly?
Currently not, for antlr 3 this may be possible. (but antlr3 is still
not for primetime) Well for antlr2 you might change the
CppCodegenerator.java and rebuild (should be straightforward).
> I need this because I am generating documentation from the sources using
> doxygen, and it doesn't recognise the namespaces defined in this way.
You can fix this according by telling doxygen to preprocess them:
http://www.stack.nl/~dimitri/doxygen/preprocessing.html
> The eclipse CDT also doesn't handle these macros which results in wrong
> error annotations in the source.
Don't know if there's a way to work around it for eclipse.
Cheers,
Ric
More information about the antlr-interest
mailing list