diff options
Diffstat (limited to 'lib/antlr')
-rw-r--r-- | lib/antlr/antlr/CharScanner.h | 11 | ||||
-rw-r--r-- | lib/antlr/antlr/config.h | 36 | ||||
-rw-r--r-- | lib/antlr/src/CharScanner.cpp | 1 | ||||
-rw-r--r-- | lib/antlr/src/String.cpp | 9 |
4 files changed, 2 insertions, 55 deletions
diff --git a/lib/antlr/antlr/CharScanner.h b/lib/antlr/antlr/CharScanner.h index 9ad6fc7b..4a0816a8 100644 --- a/lib/antlr/antlr/CharScanner.h +++ b/lib/antlr/antlr/CharScanner.h @@ -10,6 +10,7 @@ #include <antlr/config.h> +#include <functional> #include <map> #ifdef HAS_NOT_CCTYPE_H @@ -40,8 +41,6 @@ namespace antlr { class ANTLR_API CharScanner; -ANTLR_C_USING(tolower) - #ifdef ANTLR_REALLY_NO_STRCASECMP // Apparently, neither strcasecmp nor stricmp is standard, and Codewarrior // on the mac has neither... @@ -56,17 +55,11 @@ inline int strcasecmp(const char *s1, const char *s2) if (c1 == 0) return 0; } } -#else -#ifdef NO_STRCASECMP -ANTLR_C_USING(stricmp) -#else -ANTLR_C_USING(strcasecmp) -#endif #endif /** Functor for the literals map */ -class ANTLR_API CharScannerLiteralsLess : public ANTLR_USE_NAMESPACE(std)binary_function<ANTLR_USE_NAMESPACE(std)string,ANTLR_USE_NAMESPACE(std)string,bool> { +class ANTLR_API CharScannerLiteralsLess : public ANTLR_USE_NAMESPACE(std)function<bool(ANTLR_USE_NAMESPACE(std)string,ANTLR_USE_NAMESPACE(std)string)> { private: const CharScanner* scanner; public: diff --git a/lib/antlr/antlr/config.h b/lib/antlr/antlr/config.h index 4d3456ec..2e4c6e2f 100644 --- a/lib/antlr/antlr/config.h +++ b/lib/antlr/antlr/config.h @@ -18,7 +18,6 @@ #define ANTLR_USE_NAMESPACE(_x_) _x_:: #define ANTLR_USING_NAMESPACE(_x_) using namespace _x_; #define ANTLR_CXX_SUPPORTS_NAMESPACE 1 -#define ANTLR_C_USING(_x_) #define ANTLR_API #ifndef CUSTOM_API # define CUSTOM_API @@ -194,25 +193,6 @@ #endif // end IBM VisualAge C++ /*}}}*/ /*****************************************************************************/ -/*{{{ Metrowerks Codewarrior - *****************************************************************************/ -#ifdef __MWERKS__ -# if (__MWERKS__ <= 0x2201) -# define NO_TEMPLATE_PARTS -# endif - -// CW 6.0 and 7.0 still do not have it. -# define ANTLR_REALLY_NO_STRCASECMP - -# undef ANTLR_C_USING -# define ANTLR_C_USING(_x_) using std:: ## _x_; - -# define ANTLR_CCTYPE_NEEDS_STD -# undef ANTLR_CXX_SUPPORTS_UNCAUGHT_EXCEPTION - -#endif // End of Metrowerks Codewarrior -/*}}}*/ -/*****************************************************************************/ /*{{{ SGI Irix 6.5.10 MIPSPro compiler *****************************************************************************/ // (contributed by Anna Winkler) @@ -258,22 +238,6 @@ #endif // ! __GNUC__ /*}}}*/ /*****************************************************************************/ -/*{{{ Digital CXX (Tru64) - *****************************************************************************/ -#ifdef __DECCXX -#define __USE_STD_IOSTREAM -#endif -/*}}}*/ -/*****************************************************************************/ -#ifdef __BORLANDC__ -# if __BORLANDC__ >= 560 -# include <ctype> -# include <stdlib> -# define ANTLR_CCTYPE_NEEDS_STD -# else -# error "sorry, compiler is too old - consider an update." -# endif -#endif // Redefine these for backwards compatability.. #undef ANTLR_BEGIN_NAMESPACE diff --git a/lib/antlr/src/CharScanner.cpp b/lib/antlr/src/CharScanner.cpp index 63545468..ba217983 100644 --- a/lib/antlr/src/CharScanner.cpp +++ b/lib/antlr/src/CharScanner.cpp @@ -13,7 +13,6 @@ #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif -ANTLR_C_USING(exit) CharScanner::CharScanner(InputBuffer& cb, bool case_sensitive ) : saveConsumedInput(true) //, caseSensitiveLiterals(true) diff --git a/lib/antlr/src/String.cpp b/lib/antlr/src/String.cpp index 6d8b43cf..4de93c8a 100644 --- a/lib/antlr/src/String.cpp +++ b/lib/antlr/src/String.cpp @@ -19,15 +19,6 @@ namespace antlr { #endif -// wh: hack for Borland C++ 5.6 -#if __BORLANDC__ - using std::sprintf; -#endif - - -// RK: should be using snprintf actually... (or stringstream) -ANTLR_C_USING(sprintf) - ANTLR_USE_NAMESPACE(std)string operator+( const ANTLR_USE_NAMESPACE(std)string& lhs, const int rhs ) { char tmp[100]; |