KDevelop API Documentation

config.hpp

Go to the documentation of this file.
00001 #ifndef INC_config_hpp__
00002 #define INC_config_hpp__
00003 
00004 /* ANTLR Translator Generator
00005  * Project led by Terence Parr at http://www.jGuru.com
00006  * Software rights: http://www.antlr.org/RIGHTS.html
00007  *
00008  * $Id: config.hpp,v 1.2 2003/05/02 00:36:19 okellogg Exp $
00009  */
00010 
00011 /*
00012  * Just a simple configuration file to differentiate between the
00013  * various compilers used and reconfigure stuff for any oddities of the
00014  * compiler in question.
00015  *
00016  * These are the defaults. Per compiler these are amended.
00017  */
00018 #define ANTLR_USE_NAMESPACE(_x_) _x_::
00019 #define ANTLR_USING_NAMESPACE(_x_) using namespace _x_;
00020 #define ANTLR_CXX_SUPPORTS_NAMESPACE 1
00021 #define ANTLR_C_USING(_x_)
00022 #define ANTLR_API
00023 #define ANTLR_IOS_BASE ios_base
00024 
00027 #define ANTLR_CCTYPE_NEEDS_STD
00028 
00030 #define ANTLR_CXX_SUPPORTS_UNCAUGHT_EXCEPTION
00031 
00032 /******************************************************************************/
00033 /*{{{ Microsoft Visual C++ */
00034 #if defined(_MSC_VER) && !defined(__ICL)
00035 
00036 // This warning really gets on my nerves.
00037 // It's the one about symbol longer than 256 chars, and it happens
00038 // all the time with STL.
00039 # pragma warning( disable : 4786 )
00040 
00041 // For the DLL support contributed by Stephen Naughton
00042 # ifdef ANTLR_EXPORTS
00043 #   undef ANTLR_API
00044 #   define ANTLR_API __declspec(dllexport)
00045 # else
00046 #   undef ANTLR_API
00047 #   define ANTLR_API __declspec(dllimport)
00048 # endif
00049 
00050 // Now, some defines for shortcomings in the MS compiler:
00051 //
00052 // Not allowed to put 'static const int XXX=20;' in a class definition
00053 # define NO_STATIC_CONSTS
00054 // Using vector<XXX> requires operator<(X,X) to be defined
00055 # define NEEDS_OPERATOR_LESS_THAN
00056 // No strcasecmp in the C library (so use stricmp instead)
00057 // - Anyone know which is in which standard?
00058 # define NO_STRCASECMP
00059 # undef ANTLR_CCTYPE_NEEDS_STD
00060 
00061 #endif  // End of Microsoft Visual C++
00062 
00063 /*}}}*/
00064 /******************************************************************************/
00065 
00066 // RK: belongs to what compiler?
00067 #if defined(__ICL)
00068 # define NO_STRCASECMP
00069 #endif
00070 
00071 /*****************************************************************************/
00072 /*{{{ SunPro Compiler (Using OBJECTSPACE STL)
00073  *****************************************************************************/
00074 #ifdef __SUNPRO_CC
00075 
00076 # if (__SUNPRO_CC >= 0x500)
00077 
00078 #   define NEEDS_OPERATOR_LESS_THAN
00079 #   define NO_TEMPLATE_PARTS
00080 
00081 # else
00082 
00083 #   undef namespace
00084 #   define namespace
00085 
00086 #   if (__SUNPRO_CC == 0x420)
00087 
00088 /* This code is specif to SunWspro Compiler 4.2, and will compile with
00089  the objectspace 2.1 toolkit for Solaris2.6 */
00090 #    define HAS_NOT_CASSERT_H
00091 #    define HAS_NOT_CSTRING_H
00092 #    define HAS_NOT_CCTYPE_H
00093 #    define HAS_NOT_CSTDIO_H
00094 #    define HAS_OSTREAM_H
00095 
00096 /* #define OS_SOLARIS_2_6
00097  #define OS_NO_WSTRING
00098  #define OS_NO_ALLOCATORS
00099  #define OS_MULTI_THREADED
00100  #define OS_SOLARIS_NATIVE
00101  #define OS_REALTIME
00102  #define __OSVERSION__=5
00103  #define SVR4
00104  */
00105 
00106 // ObjectSpace + some specific templates constructions with stl.
00107 /* #define OS_NO_ALLOCATOR */
00108 
00109 // This great compiler does not have the namespace feature.
00110 #    undef  ANTLR_USE_NAMESPACE
00111 #    define ANTLR_USE_NAMESPACE(_x_)
00112 #    undef ANTLR_USING_NAMESPACE
00113 #    define ANTLR_USING_NAMESPACE(_x_)
00114 #    undef ANTLR_CXX_SUPPORTS_NAMESPACE
00115 #   endif       // End __SUNPRO_CC == 0x420
00116 
00117 #   undef explicit
00118 #   define explicit
00119 
00120 #   define exception os_exception
00121 #   define bad_exception os_bad_exception
00122 
00123 // Not allowed to put 'static const int XXX=20;' in a class definition
00124 #   define NO_STATIC_CONSTS
00125 // Using vector<XXX> requires operator<(X,X) to be defined
00126 #   define NEEDS_OPERATOR_LESS_THAN
00127 
00128 # endif
00129 
00130 # undef ANTLR_CCTYPE_NEEDS_STD
00131 
00132 #endif  // end __SUNPRO_CC
00133 /*}}}*/
00134 /*****************************************************************************/
00135 /*{{{ Inprise C++ Builder 3.0
00136  *****************************************************************************/
00137 #ifdef __BCPLUSPLUS__
00138 # define NO_TEMPLATE_PARTS
00139 # define NO_STRCASECMP
00140 # undef ANTLR_CCTYPE_NEEDS_STD
00141 #endif  // End of C++ Builder 3.0
00142 /*}}}*/
00143 /*****************************************************************************/
00144 /*{{{ IBM VisualAge C++ ( which includes the Dinkumware C++ Library )
00145  *****************************************************************************/
00146 #ifdef __IBMCPP__
00147 
00148 // No strcasecmp in the C library (so use stricmp instead)
00149 // - Anyone know which is in which standard?
00150 # define NO_STRCASECMP
00151 # undef ANTLR_CCTYPE_NEEDS_STD
00152 
00153 #endif  // end IBM VisualAge C++
00154 /*}}}*/
00155 /*****************************************************************************/
00156 /*{{{ Metrowerks Codewarrior
00157  *****************************************************************************/
00158 #ifdef __MWERKS__
00159 # if (__MWERKS__ <= 0x2201)
00160 #   define NO_TEMPLATE_PARTS
00161 # endif
00162 
00163 // CW 6.0 and 7.0 still do not have it.
00164 # define ANTLR_REALLY_NO_STRCASECMP
00165 
00166 # undef ANTLR_C_USING
00167 # define ANTLR_C_USING(_x_)   using std:: ## _x_;
00168 
00169 # define ANTLR_CCTYPE_NEEDS_STD
00170 # undef ANTLR_CXX_SUPPORTS_UNCAUGHT_EXCEPTION
00171 
00172 #endif  // End of Metrowerks Codewarrior
00173 /*}}}*/
00174 /*****************************************************************************/
00175 /*{{{ SGI Irix 6.5.10 MIPSPro compiler
00176  *****************************************************************************/
00177 // (contributed by Anna Winkler)
00178 // Note: you can't compile ANTLR with the MIPSPro compiler on
00179 // anything < 6.5.10 because SGI just fixed a big bug dealing with
00180 // namespaces in that release.
00181 #ifdef __sgi
00182 # define HAS_NOT_CCTYPE_H
00183 # define HAS_NOT_CSTRING_H
00184 # define HAS_NOT_CSTDIO_H
00185 # undef ANTLR_CCTYPE_NEEDS_STD
00186 #endif // End IRIX MIPSPro
00187 /*}}}*/
00188 /*****************************************************************************/
00189 /*{{{ G++ in various incarnations
00190  *****************************************************************************/
00191 // With the gcc-2.95 and 3.0 being in the near future we should start handling
00192 // incompatabilities between the various libstdc++'s.
00193 #if defined(__GNUC__) || defined(__GNUG__)
00194 // gcc 2 branch..
00195 # if (__GNUC__ == 2 )
00196 #   if (__GNUC_MINOR__ <= 8 )
00197 #    undef ANTLR_USE_NAMESPACE
00198 #    define ANTLR_USE_NAMESPACE(_x_)
00199 #    undef ANTLR_USING_NAMESPACE
00200 #    define ANTLR_USING_NAMESPACE(_x_)
00201 #    undef ANTLR_CXX_SUPPORTS_NAMESPACE
00202 #   endif
00203 #   if (__GNUC_MINOR__ > 8 && __GNUC_MINOR__ <= 95 )
00204 #     undef ANTLR_IOS_BASE
00205 #     define ANTLR_IOS_BASE ios
00206 #     undef ANTLR_CCTYPE_NEEDS_STD
00207 // compiling with -ansi ?
00208 #     ifdef __STRICT_ANSI__
00209 #       undef ANTLR_REALLY_NO_STRCASECMP
00210 #       define ANTLR_REALLY_NO_STRCASECMP
00211 #     endif
00212 #   else
00213 // experimental .96 .97 branches..
00214 #    undef ANTLR_CCTYPE_NEEDS_STD
00215 #   endif
00216 # endif
00217 #endif // ! __GNUC__
00218 /*}}}*/
00219 /*****************************************************************************/
00220 /*{{{ Digital CXX (Tru64)
00221  *****************************************************************************/
00222 #ifdef __DECCXX
00223 #define __USE_STD_IOSTREAM
00224 #endif
00225 /*}}}*/
00226 /*****************************************************************************/
00227 
00228 // Redefine these for backwards compatability..
00229 #undef ANTLR_BEGIN_NAMESPACE
00230 #undef ANTLR_END_NAMESPACE
00231 
00232 #if ANTLR_CXX_SUPPORTS_NAMESPACE == 1
00233 # define ANTLR_BEGIN_NAMESPACE(_x_) namespace _x_ {
00234 # define ANTLR_END_NAMESPACE }
00235 #else
00236 # define ANTLR_BEGIN_NAMESPACE(_x_)
00237 # define ANTLR_END_NAMESPACE
00238 #endif
00239 
00240 #endif //INC_config_hpp__
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:50 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003