C:/Users/Dennis/src/lang/russell.orig/src/parm.h

Go to the documentation of this file.
00001 /*
00002  *  Russell Compiler parameter file
00003  */
00004 
00005 #ifndef PARMH
00006 
00007 # define PARMH
00008 /* # include <whoami.h> */
00009 # ifdef vax
00010 #   define VAX
00011 # endif
00012 # ifdef pyr
00013 #   define PYRAMID
00014 # endif
00015 # ifdef sun
00016 #   define SUN
00017 #   ifdef mc68000
00018 #     define MACH_TYPE M_68020
00019 #   else
00020 #     define MACH_TYPE M_SPARC
00021 #   endif
00022 # endif
00023     /* This refers to the machine used for compilation, not necessarily */
00024     /* the target machine.                                              */
00025 
00026 # define GEN_C   /* Use the portable C-based code generator */
00027 
00028 # define EXTENDED_RANGE   /* VAX movo instruction available */
00029 # undef EXTENDED_RANGE
00030 
00031 #   define WORDLENGTH 32
00032 #   define LOGWL 5
00033     /* This is assumed in several places, e.g. streedefs.h */
00034     /* and other files which mention DEFCHARSIGS nodes     */
00035 
00036 /* The following functions were useful when we reference counted the */
00037 /* syntax tree.  Now we let the garbage collector worry about it.    */
00038 #   define salloc GC_malloc
00039 #   define alloc GC_malloc
00040 #   define malloc GC_malloc
00041 #   define free GC_free
00042 
00043 /* Translate the gc1.X functions to the 2.X ones: */
00044 #   define gc_malloc GC_malloc
00045 #   define gc_malloc_atomic GC_malloc_atomic
00046 
00047 #   define vfree(x) (x)
00048 #   define unlock(x) (x)
00049 #   define lock(x) (x)
00050 
00051 # define TABWIDTH 8
00052 # define NINCR 7 /* maximum growth of in-line code as a result */
00053                  /* of substitution of constant name.          */
00054 # define MAXSTRCODELEN 2000  /* maximum length of in-line assembly code */
00055                              /* for a string                            */
00056 # define MAXSTRLEN  150 /* maximum length of string for inline expansion */
00057 
00058 # define MAXINTLEN 4  /* length of longest Short which is guaranteed to */
00059                       /* be representable.                              */
00060 # define GMAXINTLEN 9 /* Same, for intermediate code generator */
00061 
00062 # define MAXNOBJFILES  100 /* Maximum number of object files which can be */
00063                            /* loaded at once.                             */
00064 
00065 # define MAXNLIBRARIES 10 /* Maximum number of library arguments to ld */
00066 
00067 /*
00068  *      Various global type definitions
00069  */
00070 # ifndef NOTYPEDEFS
00071     typedef char boolean;
00072 #   define TRUE    1
00073 #   define FALSE   0
00074         /* We assume that booleans are initialized to FALSE */
00075 
00076     typedef char byte;
00077 # endif
00078 
00079 /*
00080  *      Tuneable constants
00081  */
00082 # define STTNBLKS 64            /* Max number of blocks in string table. */
00083 
00084 # define RCNAME (char *) strcat(RROOT,"/src/")
00085 # define PPNAME "/lib/cpp"
00086 # define OPTNAME (char *) strcat(RROOT,"/src/opt.awk")
00087 # define RICFILTERNAME (char *) strcat(RROOT,"/src/RICfilter/filter")
00088 # define RICOPTNAME (char *) strcat(RROOT,"/src/RICopt")
00089 # ifdef GEN_C
00090 #   define CGNAME (char *) strcat(RROOT, "/src/RIC_to_C/to_C")
00091 # else
00092 #   define CGNAME (char *) strcat(RROOT, "/src/cg")
00093 # endif
00094 
00095 # define OBJFILELIST ".objfilelist"
00096 
00097 
00098 
00099 /* debugging error messages are output using dbgmsg */
00100 # define dbgmsg   printf("\n***Compiler Error - ");printf
00101 
00102 /* diagnostic debugging messages are output using diagmsg */
00103 /* SHOULD DISAPPEAR */
00104 # define diagmsg  printf
00105 
00106 /* specialized error output routines */
00107 /* parameters can be augmented by err_node and err_msg */
00108 # ifdef ERR_NODE_DEFINED
00109 #   define errmsg0(p,fmt) \
00110     { \
00111       if (err_node != NIL) { \
00112         findvl(err_node -> vlineno); \
00113         fprintf(stderr, err_msg); \
00114         fprintf(stderr, " (file: %s, line: %d)\n", getname(getfn()), getrl()); \
00115         fprintf(stderr, " - Detailed error:\n"); \
00116       } \
00117       findvl(p -> vlineno); \
00118       fprintf(stderr, fmt); \
00119       fprintf(stderr, " (file: %s, line: %d)\n", getname(getfn()), getrl()); \
00120       yynerrs++; \
00121     }
00122 # else
00123 #   define errmsg0(p,fmt) \
00124     { \
00125       findvl(p -> vlineno); \
00126       fprintf(stderr, fmt); \
00127       fprintf(stderr, " (file: %s, line: %d)\n", getname(getfn()), getrl()); \
00128       yynerrs++; \
00129     }
00130 # endif
00131 
00132 # ifdef ERR_NODE_DEFINED
00133 #   define errmsg1(p,fmt,arg) \
00134     {  \
00135       if (err_node != NIL) { \
00136         findvl(err_node -> vlineno); \
00137         fprintf(stderr, err_msg); \
00138         fprintf(stderr, " (file: %s, line: %d)\n", getname(getfn()), getrl()); \
00139         fprintf(stderr, " - Detailed error:\n"); \
00140       } \
00141       findvl(p -> vlineno); \
00142       fprintf(stderr, fmt, arg); \
00143       fprintf(stderr, " (file: %s, line: %d)\n", getname(getfn()), getrl()); \
00144       yynerrs++; \
00145     }
00146 # else
00147 #   define errmsg1(p,fmt,arg) \
00148     {  \
00149       findvl(p -> vlineno); \
00150       fprintf(stderr, fmt, arg); \
00151       fprintf(stderr, " (file: %s, line: %d)\n", getname(getfn()), getrl()); \
00152       yynerrs++; \
00153     }
00154 # endif
00155 
00156 /* turn off miscellaneous debugging      */
00157 
00158 /* to turn on allocation debugging define BAD here */
00159 
00160 #endif PARMH

Generated on Fri Jan 25 10:39:46 2008 for russell by  doxygen 1.5.4