00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #ifndef __SR_SEMPROCDEFINITIONS_H
00021 #define __SR_SEMPROCDEFINITIONS_H
00022 
00023 
00024 
00025 #include "ptypes.h"
00026 #include "pstdio.h"
00027 
00031 #define SEMPROC_VERBOSE_PARSE_ERROR 1
00032 
00036 #define MAX_SEM_RESULTS         1
00037 
00041 #define MAX_SYMBOLS            40
00042 
00046 #define MAX_SPECIAL_SYMBOLS     1
00047 
00048 
00052 #define MAX_STRING_LEN        350
00053 
00057 #define MAX_SCRIPT_LEN       8192
00058 
00062 #define MAX_RHS_IDENTIFIERS    10
00063 
00069 #define MAX_FUNCTION_CALLBACKS 32
00070 
00074 #define MAX_SEM_GRAPH_DEPTH       128
00075 
00079 #define MAX_SEM_PARTIAL_PATHS     512
00080 
00084 #define MAX_PATH_OLABELS          2048
00085 
00089 #define MAX_SCRIPTS                512
00090 
00094 #define SEMGRAPH_SCRIPT_OFFSET  30000
00095 
00099 #define SEMGRAPH_SCOPE_OFFSET   40000
00100 
00104 #define OP_ASSIGN        L('=')
00105 
00109 #define OP_CONCAT        L('+')
00110 
00114 #define LBRACKET         L('(')
00115 
00119 #define PARAM_DELIM      L(',')
00120 
00124 #define RBRACKET         L(')')
00125 
00129 #define OP_CONDITION_IFTRUE  L('?')
00130 
00134 #define OP_CONDITION_ELSE    L(':')
00135 
00139 #define EO_STATEMENT     L(';')
00140 
00144 #define STRING_DELIM     L('\'')
00145 
00149 #define DOT              L('.')
00150 
00154 #define USCORE           L('_')
00155 
00159 #define NL               L('\n')
00160 
00164 #define EO_STRING        L('\0')
00165 
00169 #define ESC_CHAR L('\\')
00170 
00173 #define MULTIPLE_MEANING_JOIN_CHAR L('#')
00174 
00178 #define UNDEFINED_SYMBOL L("undefined")
00179 
00183 #define TRUE_SYMBOL      L("true")
00184 
00188 #define FALSE_SYMBOL     L("false")
00189 
00194 #define MEMCHK(rc, val, threshold) \
00195   do { \
00196     if(val > threshold) \
00197     { \
00198       rc = ESR_OUT_OF_MEMORY; \
00199       PLogError(L("%s: %d > %d\n"), ESR_rc2str(rc), (val), (threshold)); \
00200       goto CLEANUP; \
00201     } \
00202   } while(0);
00203 #define LENCHK(rc, val, threshold) \
00204   do { \
00205     if(LSTRLEN(val) > threshold) \
00206     { \
00207       rc = ESR_OUT_OF_MEMORY; \
00208       PLogError(L("%s: %s > %d\n"), ESR_rc2str(rc), (val), (threshold)); \
00209       goto CLEANUP; \
00210     } \
00211   } while(0);
00212 
00216 #define BASE_10 10
00217 
00218 #endif