| 43 |
|
// _MSC_VER == 1300 for Microsoft Visual C++ 7.0 |
| 44 |
|
#if defined(_MSC_VER) |
| 45 |
|
|
| 46 |
+ |
# if _MSC_VER < 1300 |
| 47 |
+ |
# define NOMINMAX |
| 48 |
+ |
# pragma warning(disable : 4786) |
| 49 |
+ |
# define min _cpp_min |
| 50 |
+ |
# endif |
| 51 |
+ |
|
| 52 |
|
// This warning really gets on my nerves. |
| 53 |
|
// It's the one about symbol longer than 256 chars, and it happens |
| 54 |
|
// all the time with STL. |
| 79 |
|
# define ANTLR_API __declspec(dllimport) |
| 80 |
|
# endif |
| 81 |
|
|
| 82 |
+ |
# if ( _MSC_VER < 1200 ) |
| 83 |
+ |
// supposedly only for MSVC5 and before... |
| 84 |
+ |
// Using vector<XXX> requires operator<(X,X) to be defined |
| 85 |
+ |
# define NEEDS_OPERATOR_LESS_THAN |
| 86 |
+ |
# endif |
| 87 |
+ |
|
| 88 |
|
// VC6 |
| 89 |
|
# if ( _MSC_VER == 1200 ) |
| 90 |
|
# undef ANTLR_ATOI_IN_STD |
| 91 |
|
# endif |
| 92 |
|
|
| 93 |
< |
// These should be verified for newer MSVC's |
| 93 |
> |
# if ( _MSC_VER < 1310 ) |
| 94 |
> |
// Supposedly only for MSVC7 and before... |
| 95 |
|
// Not allowed to put 'static const int XXX=20;' in a class definition |
| 96 |
< |
# define NO_STATIC_CONSTS |
| 97 |
< |
// Using vector<XXX> requires operator<(X,X) to be defined |
| 98 |
< |
# define NEEDS_OPERATOR_LESS_THAN |
| 96 |
> |
# define NO_STATIC_CONSTS |
| 97 |
> |
# define NO_TEMPLATE_PARTS |
| 98 |
> |
# endif |
| 99 |
> |
|
| 100 |
|
// No strcasecmp in the C library (so use stricmp instead) |
| 101 |
|
// - Anyone know which is in which standard? |
| 102 |
+ |
# define NO_STRCASECMP |
| 103 |
|
# undef ANTLR_CCTYPE_NEEDS_STD |
| 104 |
< |
|
| 90 |
< |
// needed for CharScannerLiteralsLess |
| 91 |
< |
# define NO_TEMPLATE_PARTS |
| 92 |
< |
|
| 104 |
> |
# define NO_STATIC_CONSTS |
| 105 |
|
#endif // End of Microsoft Visual C++ |
| 106 |
|
|
| 107 |
|
/*}}}*/ |
| 173 |
|
*****************************************************************************/ |
| 174 |
|
#ifdef __BCPLUSPLUS__ |
| 175 |
|
# define NO_TEMPLATE_PARTS |
| 176 |
+ |
# define NO_STRCASECMP |
| 177 |
|
# undef ANTLR_CCTYPE_NEEDS_STD |
| 178 |
|
#endif // End of C++ Builder 3.0 |
| 179 |
|
/*}}}*/ |
| 184 |
|
|
| 185 |
|
// No strcasecmp in the C library (so use stricmp instead) |
| 186 |
|
// - Anyone know which is in which standard? |
| 187 |
+ |
#if (defined(_AIX) && (__IBMCPP__ >= 600)) |
| 188 |
+ |
# define NO_STATIC_CONSTS |
| 189 |
+ |
#else |
| 190 |
+ |
# define NO_STRCASECMP |
| 191 |
|
# undef ANTLR_CCTYPE_NEEDS_STD |
| 192 |
+ |
#endif |
| 193 |
|
|
| 194 |
|
#endif // end IBM VisualAge C++ |
| 195 |
|
/*}}}*/ |
| 202 |
|
# endif |
| 203 |
|
|
| 204 |
|
// CW 6.0 and 7.0 still do not have it. |
| 205 |
+ |
# define ANTLR_REALLY_NO_STRCASECMP |
| 206 |
|
|
| 207 |
|
# undef ANTLR_C_USING |
| 208 |
|
# define ANTLR_C_USING(_x_) using std:: ## _x_; |
| 245 |
|
# undef ANTLR_IOS_BASE |
| 246 |
|
# define ANTLR_IOS_BASE ios |
| 247 |
|
# undef ANTLR_CCTYPE_NEEDS_STD |
| 248 |
+ |
// compiling with -ansi ? |
| 249 |
+ |
# ifdef __STRICT_ANSI__ |
| 250 |
+ |
# undef ANTLR_REALLY_NO_STRCASECMP |
| 251 |
+ |
# define ANTLR_REALLY_NO_STRCASECMP |
| 252 |
+ |
# endif |
| 253 |
|
# else |
| 254 |
|
// experimental .96 .97 branches.. |
| 255 |
|
# undef ANTLR_CCTYPE_NEEDS_STD |
| 266 |
|
/*}}}*/ |
| 267 |
|
/*****************************************************************************/ |
| 268 |
|
#ifdef __BORLANDC__ |
| 269 |
< |
#if __BORLANDC__ >= 560 |
| 270 |
< |
#include <ctype> |
| 271 |
< |
#include <stdlib> |
| 272 |
< |
#define ANTLR_CCTYPE_NEEDS_STD |
| 273 |
< |
#else |
| 274 |
< |
#error "sorry, compiler is too old - consider an update." |
| 269 |
> |
# if __BORLANDC__ >= 560 |
| 270 |
> |
# include <ctype> |
| 271 |
> |
# include <stdlib> |
| 272 |
> |
# define ANTLR_CCTYPE_NEEDS_STD |
| 273 |
> |
# else |
| 274 |
> |
# error "sorry, compiler is too old - consider an update." |
| 275 |
> |
# endif |
| 276 |
|
#endif |
| 252 |
– |
#endif |
| 277 |
|
|
| 278 |
|
// Redefine these for backwards compatability.. |
| 279 |
|
#undef ANTLR_BEGIN_NAMESPACE |