4 * 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)
42 /* should test __STDC__ for 1, but some compilers don't set value, just def */
53 * Define PC32 if in a 32-bit PC environment (e.g. extended DOS or Win32).
54 * The macros tested here are defined by Watcom, Microsoft, Borland,
55 * and djgpp, respectively, when they are used as 32-bit compilers.
56 * Users of these compilers *must* be sure to define PC in their
57 * makefiles for this to work correctly.
60 # if (defined(__WATCOM__) || defined(_WIN32) || defined(__WIN32__) || \
61 defined(__GNUC__) || defined(__GNUG__))
69 #define ATOKEN_H "AToken.h"
70 #define ATOKPTR_H "ATokPtr.h"
71 #define ATOKPTR_C "ATokPtr.cpp"
72 #define ATOKENBUFFER_H "ATokBuf.h"
73 #define ATOKENBUFFER_C "ATokBuf.cpp"
74 #define ATOKENSTREAM_H "ATokStr.h"
75 #define APARSER_H "AParser.h"
76 #define APARSER_C "AParser.cpp"
77 #define ASTBASE_H "ASTBase.h"
78 #define ASTBASE_C "ASTBase.cpp"
79 #define PCCTSAST_C "PCCTSAST.cpp"
80 #define LIST_C "List.cpp"
81 #define DLEXERBASE_H "DLexBase.h"
82 #define DLEXERBASE_C "DLexBase.cpp"
83 #define DLEXER_C "DLexer.cpp"
84 #define STREESUPPORT_C "STreeSup.C"
86 #define ATOKEN_H "AToken.h"
87 #define ATOKPTR_H "ATokPtr.h"
88 #define ATOKPTR_C "ATokPtr.cpp"
89 #define ATOKENBUFFER_H "ATokenBuffer.h"
90 #define ATOKENBUFFER_C "ATokenBuffer.cpp"
91 #define ATOKENSTREAM_H "ATokenStream.h"
92 #define APARSER_H "AParser.h"
93 #define APARSER_C "AParser.cpp"
94 #define ASTBASE_H "ASTBase.h"
95 #define ASTBASE_C "ASTBase.cpp"
96 #define PCCTSAST_C "PCCTSAST.cpp"
97 #define LIST_C "List.cpp"
98 #define DLEXERBASE_H "DLexerBase.h"
99 #define DLEXERBASE_C "DLexerBase.cpp"
100 #define DLEXER_C "DLexer.cpp"
101 #define STREESUPPORT_C "STreeSupport.cpp"
106 #define STPARSER_H "STreePar.h"
107 #define STPARSER_C "STreePar.C"
109 #define STPARSER_H "STreeParser.h"
110 #define STPARSER_C "STreeParser.cpp"
114 #define CPP_FILE_SUFFIX ".cp"
115 #define CPP_FILE_SUFFIX_NO_DOT "cp"
116 #define OBJ_FILE_SUFFIX ".o"
119 #define CPP_FILE_SUFFIX ".cpp"
120 #define CPP_FILE_SUFFIX_NO_DOT "cpp"
121 #define OBJ_FILE_SUFFIX ".obj"
123 #define CPP_FILE_SUFFIX ".cpp"
124 #define CPP_FILE_SUFFIX_NO_DOT "cpp"
125 #define OBJ_FILE_SUFFIX ".o"
129 /* User may redefine how line information looks */
130 #define LineInfoFormatStr "# %d \"%s\"\n"
132 #ifdef MPW /* Macintosh Programmer's Workshop */
133 #define ErrHdr "File \"%s\"; Line %d #"
135 #define ErrHdr "%s, line %d:"
139 /* must assume old K&R cpp here, can't use #if defined(..)... */
142 #define TopDirectory ":"
143 #define DirectorySymbol ":"
144 #define OutputDirectoryOption "Directory where all output files should go (default=\":\")"
147 #define TopDirectory "."
148 #define DirectorySymbol "\\"
149 #define OutputDirectoryOption "Directory where all output files should go (default=\".\")"
151 #define TopDirectory "."
152 #define DirectorySymbol "/"
153 #define OutputDirectoryOption "Directory where all output files should go (default=\".\")"
159 /* Make sure we have prototypes for all functions under MPW */
163 #include <CursorCtl.h>
167 extern void fsetfileinfo (char *filename, unsigned long newcreator, unsigned long newtype);
172 /* File creators for various popular development environments */
174 #define MAC_FILE_CREATOR 'MPS ' /* MPW Text files */
176 #define MAC_FILE_CREATOR 'KAHL' /* THINK C/Symantec C++ Text files */
179 #define MAC_FILE_CREATOR 'MMCC' /* Metrowerks C/C++ Text files */
185 #define DAWDLE SpinCursor(1)
198 InitCursorCtl((acurHandle) 0);
212 void special_fopen_actions(char * /* s */)
214 fsetfileinfo (s, MAC_FILE_CREATOR, 'TEXT');
219 special_fopen_actions(char *s)
221 special_fopen_actions(s)
228 /* Define usable bits for set.c stuff */
229 #define BytesPerWord sizeof(unsigned)
230 #define WORDSIZE (sizeof(unsigned)*8)
231 #define LogWordSize (WORDSIZE==16?4:5)
241 #define PCCTS_EXIT_SUCCESS 1
242 #define PCCTS_EXIT_FAILURE 0
243 #define zzDIE return 0;
244 #define zzDONE return 1;
248 #define PCCTS_EXIT_SUCCESS 0
249 #define PCCTS_EXIT_FAILURE 1
250 #define zzDIE return 1;
251 #define zzDONE return 0;
255 #ifdef USER_ZZMODE_STACK
256 # ifndef ZZSTACK_MAX_MODE
257 # define ZZSTACK_MAX_MODE 32
259 # define ZZMAXSTK (ZZSTACK_MAX_MODE * 2)