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_C "ATokPtr.cpp"
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_C "DLexer.cpp"
114
#define STREESUPPORT_C "STreeSup.C"
116
#define ATOKEN_H "AToken.h"
117
#define ATOKPTR_H "ATokPtr.h"
118
#define ATOKPTR_C "ATokPtr.cpp"
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_C "DLexer.cpp"
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
#define LineInfoFormatStr "#line %d \"%s\"\n"
171
#ifdef MPW /* Macintosh Programmer's Workshop */
172
#define ErrHdr "File \"%s\"; Line %d #"
174
#ifdef _MSC_VER /* MR14 Microsoft Visual C++ environment */
175
#define ErrHdr "%s(%d) :"
177
#define ErrHdr "%s, line %d:" /* default */
181
/* must assume old K&R cpp here, can't use #if defined(..)... */
184
#define TopDirectory ":"
185
#define DirectorySymbol ":"
186
#define OutputDirectoryOption "Directory where all output files should go (default=\":\")"
189
#define TopDirectory "."
190
#define DirectorySymbol "\\"
191
#define OutputDirectoryOption "Directory where all output files should go (default=\".\")"
194
#define TopDirectory "[000000]"
195
#define DirectorySymbol "]"
196
#define OutputDirectoryOption "Directory where all output files should go (default=\"[]\")"
198
#define TopDirectory "."
199
#define DirectorySymbol "/"
200
#define OutputDirectoryOption "Directory where all output files should go (default=\".\")"
207
/* Make sure we have prototypes for all functions under MPW */
209
#include "pccts_string.h"
210
#include "pccts_stdlib.h"
212
/* MR6 2-Jun-97 Fixes false dependency caused by VC++ #include scanner */
213
/* MR6 Reported by Brad Schick (schick@interaccess.com) */
214
#define MPW_CursorCtl_Header <CursorCtl.h>
215
#include MPW_CursorCtl_Header
219
extern void fsetfileinfo (const char *filename, unsigned long newcreator, unsigned long newtype);
224
/* File creators for various popular development environments */
226
#define MAC_FILE_CREATOR 'MPS ' /* MPW Text files */
228
#define MAC_FILE_CREATOR 'KAHL' /* THINK C/Symantec C++ Text files */
231
#define MAC_FILE_CREATOR 'CWIE' /* Metrowerks C/C++ Text files */
237
#define DAWDLE SpinCursor(1)
243
#define SPECIAL_INITS
244
#define SPECIAL_FOPEN
255
InitCursorCtl((acurHandle) 0);
265
void special_fopen_actions(char * s)
267
fsetfileinfo (s, MAC_FILE_CREATOR, 'TEXT');
271
/* Define usable bits for set.c stuff */
272
#define BytesPerWord sizeof(unsigned)
273
#define WORDSIZE (sizeof(unsigned)*8)
274
#define LogWordSize (WORDSIZE==16?4:5)
283
#if defined(VAXC) || defined(__VMS)
285
#define PCCTS_EXIT_SUCCESS 1
286
#define PCCTS_EXIT_FAILURE SS$_ABORT
287
#define zzDIE return SS$_ABORT;
288
#define zzDONE return 1;
290
#else /* !VAXC and !__VMS */
292
#define PCCTS_EXIT_SUCCESS 0
293
#define PCCTS_EXIT_FAILURE 1
294
#define zzDIE return 1;
295
#define zzDONE return 0;
299
#ifdef USER_ZZMODE_STACK
300
# ifndef ZZSTACK_MAX_MODE
301
# define ZZSTACK_MAX_MODE 32
303
# define ZZMAXSTK (ZZSTACK_MAX_MODE * 2)
306
#ifndef DllExportPCCTS
307
#define DllExportPCCTS
311
#ifndef PCCTS_CASE_INSENSITIVE_FILE_NAME
312
#define PCCTS_CASE_INSENSITIVE_FILE_NAME
317
#ifndef PCCTS_CASE_INSENSITIVE_FILE_NAME
318
#define PCCTS_CASE_INSENSITIVE_FILE_NAME
323
#ifndef PCCTS_CASE_INSENSITIVE_FILE_NAME
324
#define PCCTS_CASE_INSENSITIVE_FILE_NAME
329
#ifndef PCCTS_USE_STDARG
330
#define PCCTS_USE_STDARG
335
#ifndef PCCTS_USE_STDARG
336
#define PCCTS_USE_STDARG
341
#ifndef PCCTS_USE_STDARG
342
#define PCCTS_USE_STDARG