1 #ifndef INC_config_hpp__
2 #define INC_config_hpp__
3 
4 /**
5  * <b>SOFTWARE RIGHTS</b>
6  * <p>
7  * ANTLR 2.6.0 MageLang Insitute, 1999
8  * <p>
9  * We reserve no legal rights to the ANTLR--it is fully in the
10  * public domain. An individual or company may do whatever
11  * they wish with source code distributed with ANTLR or the
12  * code generated by ANTLR, including the incorporation of
13  * ANTLR, or its output, into commerical software.
14  * <p>
15  * We encourage users to develop software with ANTLR. However,
16  * we do ask that credit is given to us for developing
17  * ANTLR. By "credit", we mean that if you use ANTLR or
18  * incorporate any source code into one of your programs
19  * (commercial product, research project, or otherwise) that
20  * you acknowledge this fact somewhere in the documentation,
21  * research report, etc... If you like ANTLR and have
22  * developed a nice tool with the output, please mention that
23  * you developed it using ANTLR. In addition, we ask that the
24  * headers remain intact in our source code. As long as these
25  * guidelines are kept, we expect to continue enhancing this
26  * system and expect to make other tools available as they are
27  * completed.
28  * <p>
29  * The ANTLR gang:
30  * @version ANTLR 2.6.0 MageLang Insitute, 1999
31  * @author Terence Parr, <a href=http://www.MageLang.com>MageLang Institute</a>
32  * @author <br>John Lilley, <a href=http://www.Empathy.com>Empathy Software</a>
33  * @author <br><a href="mailto:pete@yamuna.demon.co.uk">Pete Wells</a>
34  */
35 
36 /*
37  * Just a simple configuration file to differentiate between the
38  * various compilers used.
39  */
40 
41 /*
42 	Some compilers do not accept namespaces std:: for example.
43 	In this case, just define #define ANTLR_USE_NAMESPACE(_x_).
44 
45 	See SunWorkShop 4.2 for example.
46  */
47 #define ANTLR_USE_NAMESPACE(_x_) _x_::
48 #define ANTLR_USING_NAMESPACE(_x_) using namespace _x_;
49 #define ANTLR_BEGIN_NAMESPACE(_x_) namespace _x_ {
50 #define ANTLR_END_NAMESPACE }
51 #define ANTLR_C_USING(_x_)
52 
53 #if defined(_MSC_VER) && !defined(__ICL) // Microsoft Visual C++
54 
55 // This warning really gets on my nerves.
56 // It's the one about symbol longer than 256 chars, and it happens
57 // all the time with STL.
58 #pragma warning( disable : 4786 )
59 
60 // Now, some defines for shortcomings in the MS compiler:
61 
62 // Not allowed to put 'static const int XXX=20;' in a class definition
63 #define NO_STATIC_CONSTS
64 // Using vector<XXX> requires operator<(X,X) to be defined
65 #define NEEDS_OPERATOR_LESS_THAN
66 // No strcasecmp in the C library (so use stricmp instead)
67 // - Anyone know which is in which standard?
68 #define NO_STRCASECMP
69 
70 #endif
71 
72 #if defined(__ICL)
73 #define NO_STRCASECMP
74 #endif
75 
76 //
77 // SunPro Compiler (Using OBJECTSPACE STL)
78 //
79 #ifdef __SUNPRO_CC
80 
81 #if (__SUNPRO_CC >= 0x500)
82 
83 #define NEEDS_OPERATOR_LESS_THAN
84 #define NO_TEMPLATE_PARTS
85 
86 #else
87 
88 #undef namespace
89 #define namespace
90 
91 
92 #if (__SUNPRO_CC == 0x420)
93 
94 /* This code is specif to SunWspro Compiler 4.2, and will compile with
95    the objectspace 2.1 toolkit for Solaris2.6 */
96 #define HAS_NOT_CASSERT_H
97 #define HAS_NOT_CSTRING_H
98 #define HAS_NOT_CCTYPE_H
99 #define HAS_NOT_CSTDIO_H
100 #define HAS_OSTREAM_H
101 
102 /* #define OS_SOLARIS_2_6
103 #define OS_NO_WSTRING
104 #define OS_NO_ALLOCATORS
105 #define OS_MULTI_THREADED
106 #define OS_SOLARIS_NATIVE
107 #define OS_REALTIME
108 #define __OSVERSION__=5
109 #define SVR4
110 */
111 
112 // ObjectSpace + some specific templates constructions with stl.
113 /* #define OS_NO_ALLOCATOR */
114 
115 // This great compiler does not have the namespace feature.
116 #undef  ANTLR_USE_NAMESPACE
117 #define ANTLR_USE_NAMESPACE(_x_)
118 #undef ANTLR_USING_NAMESPACE
119 #define ANTLR_USING_NAMESPACE(_x_)
120 #undef ANTLR_BEGIN_NAMESPACE
121 #define ANTLR_BEGIN_NAMESPACE(_x_)
122 #undef ANTLR_END_NAMESPACE
123 #define ANTLR_END_NAMESPACE
124 
125 #endif
126 
127 #undef explicit
128 #define explicit
129 
130 #define exception os_exception
131 #define bad_exception os_bad_exception
132 
133 // Not allowed to put 'static const int XXX=20;' in a class definition
134 #define NO_STATIC_CONSTS
135 // Using vector<XXX> requires operator<(X,X) to be defined
136 #define NEEDS_OPERATOR_LESS_THAN
137 
138 #endif
139 
140 #endif
141 
142 //
143 // Inprise C++ Builder 3.0
144 //
145 #ifdef __BCPLUSPLUS__
146 
147 #define NO_TEMPLATE_PARTS
148 #define NO_STRCASECMP
149 #endif
150 
151 #ifdef __IBMCPP__ // IBM VisualAge C++ ( which includes the Dinkumware C++ Library )
152 
153 // No strcasecmp in the C library (so use stricmp instead)
154 // - Anyone know which is in which standard?
155 #define NO_STRCASECMP
156 
157 #endif
158 
159 //
160 // Metrowerks Codewarrior
161 //
162 #ifdef __MWERKS__
163 #if (__MWERKS__ <= 0x2201)
164 #define NO_TEMPLATE_PARTS
165 #define ANTLR_REALLY_NO_STRCASECMP
166 #endif
167 
168 #undef ANTLR_C_USING
169 #define ANTLR_C_USING(_x_)   using std:: ## _x_;
170 #endif
171 
172 #endif //INC_config_hpp__
173