[antlr-interest] C++ target Problem (typedef)

Oliver Kowalke oliver.kowalke at gmx.de
Fri Feb 17 07:48:56 PST 2012


legacyDevCfg.h contains:

#include <antlr3traits.hpp>

using namespace antlr3;

typedef Traits< legacyDevCfgLexer, legacyDevCfgParser > legacyDevCfgTraits;
typedef legacyDevCfgTraits legacyDevCfgLexerTraits;
typedef legacyDevCfgTraits legacyDevCfgParserTraits


in Cpp/dynamic-scope example:

g++ -W -Wall -g -I. -I/home/abc/Projekte/Antlr/Cpp/include  -c -o main.o 
main.cpp

produces:

In file included from UserTraits.hpp:18:0,
                  from TLexer.hpp:66,
                  from main.cpp:1:
Cpp/include/antlr3traits.hpp:8:10: error: »DefaultAllocPolicy« in 
Namensbereich »antlr3« is not a type

Oliver

> Can you send me your traits file? Have you taken a look at the 
> examples provided? There is a UserTraits.hpp in each.
>
> Thanks,
> Gokul.



More information about the antlr-interest mailing list