]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/Pccts/h/pcctscfg.h
4 * pcctscfg.h (formerly config.h) (for ANTLR, DLG, and SORCERER)
6 * This is a simple configuration file that doesn't have config stuff
7 * in it, but it's a start.
11 * We reserve no LEGAL rights to the Purdue Compiler Construction Tool
12 * Set (PCCTS) -- PCCTS is in the public domain. An individual or
13 * company may do whatever they wish with source code distributed with
14 * PCCTS or the code generated by PCCTS, including the incorporation of
15 * PCCTS, or its output, into commerical software.
17 * We encourage users to develop software with PCCTS. However, we do ask
18 * that credit is given to us for developing PCCTS. By "credit",
19 * we mean that if you incorporate our source code into one of your
20 * programs (commercial product, research project, or otherwise) that you
21 * acknowledge this fact somewhere in the documentation, research report,
22 * etc... If you like PCCTS and have developed a nice tool with the
23 * output, please mention that you developed it using PCCTS. In
24 * addition, we ask that this header remain intact in our source code.
25 * As long as these guidelines are kept, we expect to continue enhancing
26 * this system and expect to make other tools available as they are
29 * Used by PCCTS 1.33 (SORCERER 1.00B11 and up)
31 * Parr Research Corporation
32 * with Purdue University and AHPCRC, University of Minnesota
36 /* This file knows about the following ``environments''
39 MAC (use #define MPW; has a few things for THINK C, Metrowerks)
40 MS/C++ (MR14 Microsoft Visual C++ environment uses symbol _MSC_VER)
44 /* should test __STDC__ for 1, but some compilers don't set value, just def */
55 #ifdef PCCTS_USE_NAMESPACE_STD
56 #define PCCTS_NAMESPACE_STD namespace std {}; using namespace std;
58 #define PCCTS_NAMESPACE_STD
61 #include "pccts_stdio.h"
62 #include "pccts_stdlib.h"
64 /* largest file name size */
67 #define MaxFileName _MAX_PATH /* MR9 RJV: MAX_PATH defined in stdlib.h (MSVC++ 5.0) */
69 #define MaxFileName 300
73 * Define PC32 if in a 32-bit PC environment (e.g. extended DOS or Win32).
74 * The macros tested here are defined by Watcom, Microsoft, Borland,
75 * and djgpp, respectively, when they are used as 32-bit compilers.
76 * Users of these compilers *must* be sure to define PC in their
77 * makefiles for this to work correctly.
80 # if (defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) || \
81 defined(__GNUC__) || defined(__GNUG__))
88 /* MR1 10-Apr-97 Default for PC is short file names */
89 /* MR1 Default for non-PC is long file names */
90 /* MR1 Can override via command line option LONGFILENAMES */
99 #define ATOKEN_H "AToken.h"
100 #define ATOKPTR_H "ATokPtr.h"
101 #define ATOKPTR_IMPL_H "ATokPtrIm.h"
102 #define ATOKENBUFFER_H "ATokBuf.h"
103 #define ATOKENBUFFER_C "ATokBuf.cpp"
104 #define ATOKENSTREAM_H "ATokStr.h"
105 #define APARSER_H "AParser.h"
106 #define APARSER_C "AParser.cpp"
107 #define ASTBASE_H "ASTBase.h"
108 #define ASTBASE_C "ASTBase.cpp"
109 #define PCCTSAST_C "PCCTSAST.cpp"
110 #define LIST_C "List.cpp"
111 #define DLEXERBASE_H "DLexBase.h"
112 #define DLEXERBASE_C "DLexBase.cpp"
113 #define DLEXER_H "DLexer.h"
114 #define STREESUPPORT_C "STreeSup.C"
116 #define ATOKEN_H "AToken.h"
117 #define ATOKPTR_H "ATokPtr.h"
118 #define ATOKPTR_IMPL_H "ATokPtrImpl.h"
119 #define ATOKENBUFFER_H "ATokenBuffer.h"
120 #define ATOKENBUFFER_C "ATokenBuffer.cpp"
121 #define ATOKENSTREAM_H "ATokenStream.h"
122 #define APARSER_H "AParser.h"
123 #define APARSER_C "AParser.cpp"
124 #define ASTBASE_H "ASTBase.h"
125 #define ASTBASE_C "ASTBase.cpp"
126 #define PCCTSAST_C "PCCTSAST.cpp"
127 #define LIST_C "List.cpp"
128 #define DLEXERBASE_H "DLexerBase.h"
129 #define DLEXERBASE_C "DLexerBase.cpp"
130 #define DLEXER_H "DLexer.h"
131 #define STREESUPPORT_C "STreeSupport.cpp"
136 /* MR8 6-Aug-97 Change from ifdef PC to ifndef LONGFILENAMES */
138 #ifndef LONGFILENAMES
139 #define STPARSER_H "STreePar.h"
140 #define STPARSER_C "STreePar.C"
142 #define STPARSER_H "STreeParser.h"
143 #define STPARSER_C "STreeParser.cpp"
147 #define CPP_FILE_SUFFIX ".cp"
148 #define CPP_FILE_SUFFIX_NO_DOT "cp"
149 #define OBJ_FILE_SUFFIX ".o"
152 #define CPP_FILE_SUFFIX ".cpp"
153 #define CPP_FILE_SUFFIX_NO_DOT "cpp"
154 #define OBJ_FILE_SUFFIX ".obj"
157 #define CPP_FILE_SUFFIX ".cpp"
158 #define CPP_FILE_SUFFIX_NO_DOT "cpp"
159 #define OBJ_FILE_SUFFIX ".obj"
161 #define CPP_FILE_SUFFIX ".cpp"
162 #define CPP_FILE_SUFFIX_NO_DOT "cpp"
163 #define OBJ_FILE_SUFFIX ".o"
168 /* User may redefine how line information looks */ /* make it #line MR7 */
169 /* MR21 Use #ifndef */
171 #ifndef LineInfoFormatStr
172 #define LineInfoFormatStr "#line %d \"%s\"\n"
175 #ifdef MPW /* Macintosh Programmer's Workshop */
176 #define ErrHdr "File \"%s\"; Line %d #"
178 #ifdef _MSC_VER /* MR14 Microsoft Visual C++ environment */
179 #define ErrHdr "%s(%d) :"
181 #define ErrHdr "%s, line %d:" /* default */
185 /* must assume old K&R cpp here, can't use #if defined(..)... */
188 #define TopDirectory ":"
189 #define DirectorySymbol ":"
190 #define OutputDirectoryOption "Directory where all output files should go (default=\":\")"
193 #define TopDirectory "."
194 #define DirectorySymbol "\\"
195 #define OutputDirectoryOption "Directory where all output files should go (default=\".\")"
198 #define TopDirectory "[000000]"
199 #define DirectorySymbol "]"
200 #define OutputDirectoryOption "Directory where all output files should go (default=\"[]\")"
202 #define TopDirectory "."
203 #define DirectorySymbol "/"
204 #define OutputDirectoryOption "Directory where all output files should go (default=\".\")"
211 /* Make sure we have prototypes for all functions under MPW */
213 #include "pccts_string.h"
214 #include "pccts_stdlib.h"
216 /* MR6 2-Jun-97 Fixes false dependency caused by VC++ #include scanner */
217 /* MR6 Reported by Brad Schick (schick@interaccess.com) */
218 #define MPW_CursorCtl_Header <CursorCtl.h>
219 #include MPW_CursorCtl_Header
223 extern void fsetfileinfo (const char *filename
, unsigned long newcreator
, unsigned long newtype
);
228 /* File creators for various popular development environments */
230 #define MAC_FILE_CREATOR 'MPS ' /* MPW Text files */
232 #define MAC_FILE_CREATOR 'KAHL' /* THINK C/Symantec C++ Text files */
235 #define MAC_FILE_CREATOR 'CWIE' /* Metrowerks C/C++ Text files */
241 #define DAWDLE SpinCursor(1)
247 #define SPECIAL_INITS
248 #define SPECIAL_FOPEN
259 InitCursorCtl((acurHandle
) 0);
269 void special_fopen_actions(char * s
)
271 fsetfileinfo (s
, MAC_FILE_CREATOR
, 'TEXT');
275 /* Define usable bits for set.c stuff */
276 #define BytesPerWord sizeof(unsigned)
277 #define WORDSIZE (sizeof(unsigned)*8)
278 #define LogWordSize (WORDSIZE==16?4:5)
287 #if defined(VAXC) || defined(__VMS)
289 #define PCCTS_EXIT_SUCCESS 1
290 #define PCCTS_EXIT_FAILURE SS$_ABORT
291 #define zzDIE return SS$_ABORT;
292 #define zzDONE return 1;
294 #else /* !VAXC and !__VMS */
296 #define PCCTS_EXIT_SUCCESS 0
297 #define PCCTS_EXIT_FAILURE 1
298 #define zzDIE return 1;
299 #define zzDONE return 0;
303 #ifdef USER_ZZMODE_STACK
304 # ifndef ZZSTACK_MAX_MODE
305 # define ZZSTACK_MAX_MODE 32
307 # define ZZMAXSTK (ZZSTACK_MAX_MODE * 2)
310 #ifndef DllExportPCCTS
311 #define DllExportPCCTS
315 #ifndef PCCTS_CASE_INSENSITIVE_FILE_NAME
316 #define PCCTS_CASE_INSENSITIVE_FILE_NAME
321 #ifndef PCCTS_CASE_INSENSITIVE_FILE_NAME
322 #define PCCTS_CASE_INSENSITIVE_FILE_NAME
327 #ifndef PCCTS_CASE_INSENSITIVE_FILE_NAME
328 #define PCCTS_CASE_INSENSITIVE_FILE_NAME
333 #ifndef PCCTS_USE_STDARG
334 #define PCCTS_USE_STDARG
339 #ifndef PCCTS_USE_STDARG
340 #define PCCTS_USE_STDARG
345 #ifndef PCCTS_USE_STDARG
346 #define PCCTS_USE_STDARG
351 /*Turn off the warnings for:
352 unreferenced inline/local function has been removed
354 #pragma warning(disable : 4514)
355 /* function not expanded */
356 #pragma warning(disable : 4710)