[antlr-interest] MSVC++ 6.0 problems

Keith Pincombe pincombe at gmail.com
Fri Mar 11 12:21:13 PST 2005


Hi,

I've never sent an email to a mailing list before so please forgive me
if this goes wrong.

I am working on a translator and ANTLR will suit my purposes perfectly
since i have already found the grammar file i require, the problem is
the grammer file requires the use of the C++ version of ANTLR. I
realise i can just use the pre-compilied version of ANTLR to create
the code from the grammar but i am having difficulties compiling the
code made from doing that. I have made sure to include
<installdir>antlr/lib/cpp

I am using Mircosfot Visual C++ 6.0 with service pack 5 installed

I read the readme file which says that to compile the code generated i
must first create a win32 static link library with the files in
<installpath>antlr/lib/cpp/src but when i try to build this i get 6
errors and 8 warnings

the errors are as follows

d:\antlr-2.7.5\lib\cpp\antlr\tokenstreamrewriteengine.hpp(82) : error
C2252: 'MIN_TOKEN_INDEX' : pure specifier can only be specified for
functions
d:\antlr-2.7.5\lib\cpp\antlr\tokenstreamrewriteengine.hpp(84) : error
C2258: illegal pure syntax, must be '= 0'
d:\antlr-2.7.5\lib\cpp\antlr\tokenstreamrewriteengine.hpp(84) : error
C2252: 'PROGRAM_INIT_SIZE' : pure specifier can only be specified for
functions
d:\antlr-2.7.5\lib\cpp\src\tokenstreamrewriteengine.cpp(44) : error
C2065: 'MIN_TOKEN_INDEX' : undeclared identifier
d:\antlr-2.7.5\lib\cpp\src\tokenstreamrewriteengine.cpp(136) : error
C2039: 'min' : is not a member of 'std'
d:\antlr-2.7.5\lib\cpp\src\tokenstreamrewriteengine.cpp(136) : error
C2065: 'min' : undeclared identifier

i am sure this is an easy problem to solve when you know the answer
but for me this is a nightmare with no solution, please help!!!!!!

Thx in advance
Keith


More information about the antlr-interest mailing list