--- /dev/null
+#ifndef PCCTS_CONFIG_H\r
+#define PCCTS_CONFIG_H\r
+/*\r
+ * pcctscfg.h (formerly config.h) (for ANTLR, DLG, and SORCERER)\r
+ *\r
+ * This is a simple configuration file that doesn't have config stuff\r
+ * in it, but it's a start.\r
+ *\r
+ * SOFTWARE RIGHTS\r
+ *\r
+ * We reserve no LEGAL rights to the Purdue Compiler Construction Tool\r
+ * Set (PCCTS) -- PCCTS is in the public domain. An individual or\r
+ * company may do whatever they wish with source code distributed with\r
+ * PCCTS or the code generated by PCCTS, including the incorporation of\r
+ * PCCTS, or its output, into commerical software.\r
+ *\r
+ * We encourage users to develop software with PCCTS. However, we do ask\r
+ * that credit is given to us for developing PCCTS. By "credit",\r
+ * we mean that if you incorporate our source code into one of your\r
+ * programs (commercial product, research project, or otherwise) that you\r
+ * acknowledge this fact somewhere in the documentation, research report,\r
+ * etc... If you like PCCTS and have developed a nice tool with the\r
+ * output, please mention that you developed it using PCCTS. In\r
+ * addition, we ask that this header remain intact in our source code.\r
+ * As long as these guidelines are kept, we expect to continue enhancing\r
+ * this system and expect to make other tools available as they are\r
+ * completed.\r
+ *\r
+ * Used by PCCTS 1.33 (SORCERER 1.00B11 and up)\r
+ * Terence Parr\r
+ * Parr Research Corporation\r
+ * with Purdue University and AHPCRC, University of Minnesota\r
+ * 1989-1998\r
+ */\r
+\r
+/* This file knows about the following ``environments''\r
+ UNIX (default)\r
+ DOS (use #define PC)\r
+ MAC (use #define MPW; has a few things for THINK C, Metrowerks)\r
+ MS/C++ (MR14 Microsoft Visual C++ environment uses symbol _MSC_VER)\r
+\r
+ */\r
+\r
+/* should test __STDC__ for 1, but some compilers don't set value, just def */\r
+\r
+#ifndef __USE_PROTOS\r
+#ifdef __STDC__\r
+#define __USE_PROTOS\r
+#endif\r
+#ifdef __cplusplus\r
+#define __USE_PROTOS\r
+#endif\r
+#endif\r
+\r
+#ifdef PCCTS_USE_NAMESPACE_STD\r
+#define PCCTS_NAMESPACE_STD namespace std {}; using namespace std;\r
+#else\r
+#define PCCTS_NAMESPACE_STD\r
+#endif\r
+\r
+#include "pccts_stdio.h"\r
+#include "pccts_stdlib.h"\r
+\r
+/* largest file name size */\r
+\r
+#ifdef _MAX_PATH\r
+#define MaxFileName _MAX_PATH /* MR9 RJV: MAX_PATH defined in stdlib.h (MSVC++ 5.0) */\r
+#else\r
+#define MaxFileName 300\r
+#endif\r
+\r
+/*\r
+* Define PC32 if in a 32-bit PC environment (e.g. extended DOS or Win32).\r
+* The macros tested here are defined by Watcom, Microsoft, Borland,\r
+* and djgpp, respectively, when they are used as 32-bit compilers.\r
+* Users of these compilers *must* be sure to define PC in their\r
+* makefiles for this to work correctly.\r
+*/\r
+#ifdef PC\r
+# if (defined(__WATCOMC__) || defined(_WIN32) || defined(__WIN32__) || \\r
+ defined(__GNUC__) || defined(__GNUG__))\r
+# ifndef PC32\r
+# define PC32\r
+# endif\r
+# endif\r
+#endif\r
+\r
+/* MR1 10-Apr-97 Default for PC is short file names */\r
+/* MR1 Default for non-PC is long file names */\r
+/* MR1 Can override via command line option LONGFILENAMES */\r
+\r
+#ifndef LONGFILENAMES\r
+#ifndef PC\r
+#define LONGFILENAMES\r
+#endif\r
+#endif\r
+\r
+#ifndef LONGFILENAMES\r
+#define ATOKEN_H "AToken.h"\r
+#define ATOKPTR_H "ATokPtr.h"\r
+#define ATOKPTR_C "ATokPtr.cpp"\r
+#define ATOKENBUFFER_H "ATokBuf.h"\r
+#define ATOKENBUFFER_C "ATokBuf.cpp"\r
+#define ATOKENSTREAM_H "ATokStr.h"\r
+#define APARSER_H "AParser.h"\r
+#define APARSER_C "AParser.cpp"\r
+#define ASTBASE_H "ASTBase.h"\r
+#define ASTBASE_C "ASTBase.cpp"\r
+#define PCCTSAST_C "PCCTSAST.cpp"\r
+#define LIST_C "List.cpp"\r
+#define DLEXERBASE_H "DLexBase.h"\r
+#define DLEXERBASE_C "DLexBase.cpp"\r
+#define DLEXER_C "DLexer.cpp"\r
+#define STREESUPPORT_C "STreeSup.C"\r
+#else\r
+#define ATOKEN_H "AToken.h"\r
+#define ATOKPTR_H "ATokPtr.h"\r
+#define ATOKPTR_C "ATokPtr.cpp"\r
+#define ATOKENBUFFER_H "ATokenBuffer.h"\r
+#define ATOKENBUFFER_C "ATokenBuffer.cpp"\r
+#define ATOKENSTREAM_H "ATokenStream.h"\r
+#define APARSER_H "AParser.h"\r
+#define APARSER_C "AParser.cpp"\r
+#define ASTBASE_H "ASTBase.h"\r
+#define ASTBASE_C "ASTBase.cpp"\r
+#define PCCTSAST_C "PCCTSAST.cpp"\r
+#define LIST_C "List.cpp"\r
+#define DLEXERBASE_H "DLexerBase.h"\r
+#define DLEXERBASE_C "DLexerBase.cpp"\r
+#define DLEXER_C "DLexer.cpp"\r
+#define STREESUPPORT_C "STreeSupport.cpp"\r
+#endif\r
+\r
+/* SORCERER Stuff */\r
+\r
+/* MR8 6-Aug-97 Change from ifdef PC to ifndef LONGFILENAMES */\r
+\r
+#ifndef LONGFILENAMES\r
+#define STPARSER_H "STreePar.h"\r
+#define STPARSER_C "STreePar.C"\r
+#else\r
+#define STPARSER_H "STreeParser.h"\r
+#define STPARSER_C "STreeParser.cpp"\r
+#endif\r
+\r
+#ifdef MPW\r
+#define CPP_FILE_SUFFIX ".cp"\r
+#define CPP_FILE_SUFFIX_NO_DOT "cp"\r
+#define OBJ_FILE_SUFFIX ".o"\r
+#else\r
+#ifdef PC\r
+#define CPP_FILE_SUFFIX ".cpp"\r
+#define CPP_FILE_SUFFIX_NO_DOT "cpp"\r
+#define OBJ_FILE_SUFFIX ".obj"\r
+#else\r
+#ifdef __VMS\r
+#define CPP_FILE_SUFFIX ".cpp"\r
+#define CPP_FILE_SUFFIX_NO_DOT "cpp"\r
+#define OBJ_FILE_SUFFIX ".obj"\r
+#else\r
+#define CPP_FILE_SUFFIX ".cpp"\r
+#define CPP_FILE_SUFFIX_NO_DOT "cpp"\r
+#define OBJ_FILE_SUFFIX ".o"\r
+#endif\r
+#endif\r
+#endif\r
+\r
+/* User may redefine how line information looks */ /* make it #line MR7 */\r
+/* MR21 Use #ifndef */\r
+\r
+#ifndef LineInfoFormatStr\r
+#define LineInfoFormatStr "#line %d \"%s\"\n"\r
+#endif\r
+\r
+#ifdef MPW /* Macintosh Programmer's Workshop */\r
+#define ErrHdr "File \"%s\"; Line %d #"\r
+#else\r
+#ifdef _MSC_VER /* MR14 Microsoft Visual C++ environment */\r
+#define ErrHdr "%s(%d) :"\r
+#else\r
+#define ErrHdr "%s, line %d:" /* default */\r
+#endif\r
+#endif\r
+\r
+/* must assume old K&R cpp here, can't use #if defined(..)... */\r
+\r
+#ifdef MPW\r
+#define TopDirectory ":"\r
+#define DirectorySymbol ":"\r
+#define OutputDirectoryOption "Directory where all output files should go (default=\":\")"\r
+#else\r
+#ifdef PC\r
+#define TopDirectory "."\r
+#define DirectorySymbol "\\"\r
+#define OutputDirectoryOption "Directory where all output files should go (default=\".\")"\r
+#else\r
+#ifdef __VMS\r
+#define TopDirectory "[000000]"\r
+#define DirectorySymbol "]"\r
+#define OutputDirectoryOption "Directory where all output files should go (default=\"[]\")"\r
+#else\r
+#define TopDirectory "."\r
+#define DirectorySymbol "/"\r
+#define OutputDirectoryOption "Directory where all output files should go (default=\".\")"\r
+#endif\r
+#endif\r
+#endif\r
+\r
+#ifdef MPW\r
+\r
+/* Make sure we have prototypes for all functions under MPW */\r
+\r
+#include "pccts_string.h"\r
+#include "pccts_stdlib.h"\r
+\r
+/* MR6 2-Jun-97 Fixes false dependency caused by VC++ #include scanner */\r
+/* MR6 Reported by Brad Schick (schick@interaccess.com) */\r
+#define MPW_CursorCtl_Header <CursorCtl.h>\r
+#include MPW_CursorCtl_Header\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+extern void fsetfileinfo (const char *filename, unsigned long newcreator, unsigned long newtype);\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+/* File creators for various popular development environments */\r
+\r
+#define MAC_FILE_CREATOR 'MPS ' /* MPW Text files */\r
+#if 0\r
+#define MAC_FILE_CREATOR 'KAHL' /* THINK C/Symantec C++ Text files */\r
+#endif\r
+#if 0\r
+#define MAC_FILE_CREATOR 'CWIE' /* Metrowerks C/C++ Text files */\r
+#endif\r
+\r
+#endif\r
+\r
+#ifdef MPW\r
+#define DAWDLE SpinCursor(1)\r
+#else\r
+#define DAWDLE\r
+#endif\r
+\r
+#ifdef MPW\r
+#define SPECIAL_INITS\r
+#define SPECIAL_FOPEN\r
+#endif\r
+\r
+#ifdef MPW\r
+#ifdef __cplusplus\r
+inline\r
+#else\r
+static\r
+#endif\r
+void special_inits()\r
+{\r
+ InitCursorCtl((acurHandle) 0);\r
+}\r
+#endif\r
+\r
+#ifdef MPW\r
+#ifdef __cplusplus\r
+inline\r
+#else\r
+static\r
+#endif\r
+void special_fopen_actions(char * s)\r
+{\r
+ fsetfileinfo (s, MAC_FILE_CREATOR, 'TEXT');\r
+}\r
+#endif\r
+\r
+/* Define usable bits for set.c stuff */\r
+#define BytesPerWord sizeof(unsigned)\r
+#define WORDSIZE (sizeof(unsigned)*8)\r
+#define LogWordSize (WORDSIZE==16?4:5)\r
+\r
+#ifndef TRUE\r
+#define TRUE 1\r
+#endif\r
+#ifndef FALSE\r
+#define FALSE 0\r
+#endif\r
+\r
+#if defined(VAXC) || defined(__VMS)\r
+#include <ssdef.h>\r
+#define PCCTS_EXIT_SUCCESS 1\r
+#define PCCTS_EXIT_FAILURE SS$_ABORT\r
+#define zzDIE return SS$_ABORT;\r
+#define zzDONE return 1;\r
+\r
+#else /* !VAXC and !__VMS */\r
+\r
+#define PCCTS_EXIT_SUCCESS 0\r
+#define PCCTS_EXIT_FAILURE 1\r
+#define zzDIE return 1;\r
+#define zzDONE return 0;\r
+\r
+#endif\r
+\r
+#ifdef USER_ZZMODE_STACK\r
+# ifndef ZZSTACK_MAX_MODE\r
+# define ZZSTACK_MAX_MODE 32\r
+# endif\r
+# define ZZMAXSTK (ZZSTACK_MAX_MODE * 2)\r
+#endif\r
+\r
+#ifndef DllExportPCCTS\r
+#define DllExportPCCTS\r
+#endif\r
+\r
+#ifdef PC\r
+#ifndef PCCTS_CASE_INSENSITIVE_FILE_NAME\r
+#define PCCTS_CASE_INSENSITIVE_FILE_NAME\r
+#endif\r
+#endif\r
+\r
+#ifdef PC32\r
+#ifndef PCCTS_CASE_INSENSITIVE_FILE_NAME\r
+#define PCCTS_CASE_INSENSITIVE_FILE_NAME\r
+#endif\r
+#endif\r
+\r
+#ifdef __VMS\r
+#ifndef PCCTS_CASE_INSENSITIVE_FILE_NAME\r
+#define PCCTS_CASE_INSENSITIVE_FILE_NAME\r
+#endif\r
+#endif\r
+\r
+#ifdef __USE_PROTOS\r
+#ifndef PCCTS_USE_STDARG\r
+#define PCCTS_USE_STDARG\r
+#endif\r
+#endif\r
+\r
+#ifdef __STDC__\r
+#ifndef PCCTS_USE_STDARG\r
+#define PCCTS_USE_STDARG\r
+#endif\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+#ifndef PCCTS_USE_STDARG\r
+#define PCCTS_USE_STDARG\r
+#endif\r
+#endif\r
+\r
+#endif\r