[antlr-interest] VC++ 7.1

John Green greenj at ix.netcom.com
Tue Feb 21 16:30:07 PST 2006


Hi Ric,

With MSVC++ 7.1 I had to make a couple of small hacks.

In config.hpp:
// Added by jag. See comments for ver < 1310.
# if ( _MSC_VER < 1320 )
#	define NO_STATIC_CONSTS
# endif


In TokenStreamRewriteEngine.cpp:
// jag added ifndef
#ifndef NO_STATIC_CONSTS
const size_t TokenStreamRewriteEngine::MIN_TOKEN_INDEX = 0;
const int TokenStreamRewriteEngine::PROGRAM_INIT_SIZE = 100;
#endif


Seems to be compiling and running fine now.

Cheers,
john at joanju dot com


BTW all, just in case anyone else is worried about performance and the MSVC compiler, I tried updating to VC++ 8, and found that my parser ended up being 25% slower. I've switched back to 7.1 for now. Searching MSDN forums found a few other complaints about performance regression, and some possible explanations for it.


More information about the antlr-interest mailing list