/home/doxygen/libascend/compiler/compiler.h

Go to the documentation of this file.
00001 /*  ASCEND modelling environment
00002     Copyright (C) 2006, 2007 Carnegie Mellon University
00003     Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2, or (at your option)
00008     any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place - Suite 330,
00018     Boston, MA 02111-1307, USA.
00019 *//*
00020     by Tom Epperly
00021     Last in CVS: $Revision: 1.26 $ $Date: 2000/01/25 02:26:02 $ $Author: ballan $
00022 */
00035 #ifndef ASC_COMPILER_H
00036 #define ASC_COMPILER_H
00037 
00042 #include <utilities/ascConfig.h>
00043 
00044 /* some influential defines and where to set them:
00045     ATDEBUG anontype.c -- controls anon type/relation sharing spew
00046     ASC_NO_POOL -- compiler -D flag. Turn off many memory recycles of small objects.
00047     ASC_NO_TRAPS -- compiler -D flag. Turn off traps/setjmp/longjump.
00048 */
00049 
00050 #ifndef TIMECOMPILER
00051 #define TIMECOMPILER 0
00052 
00053 #endif
00054 
00055 #ifndef CHECK_SYMBOL_USE
00056 #ifdef NDEBUG
00057 #define CHECK_SYMBOL_USE 0
00058 #else
00059 #define CHECK_SYMBOL_USE 1
00060 #endif
00061 #endif
00062 
00067 #if CHECK_SYMBOL_USE
00068 
00069 #ifndef __GNUC__
00070 
00071 extern int strcmp(CONST char *s1, CONST char *s2);
00072 #endif  /* __GNU__ */
00073 typedef CONST double symchar;
00074 #else   /* !CHECK_SYMBOL_USE */
00075 /* This is the real definition for production builds. */
00076 typedef CONST char symchar;
00077 #endif  /* CHECK_SYMBOL_USE */
00078 
00099 #define SCP(s) ((CONST char *)(s))
00100 
00106 #define SCLEN(s) (*(int *)(((char *)s)-sizeof(int)))
00107 
00114 struct bracechar;
00115 
00116 /* globals from ascParse.y that yacc won't put in ascParse.h generated. */
00117 
00118 ASC_DLLSPEC int g_compiler_warnings;
00125 ASC_DLLSPEC int g_parser_warnings;
00132 extern int g_parse_relns;
00138 ASC_DLLSPEC int g_simplify_relations;
00145 ASC_DLLSPEC int g_use_copyanon;
00154 /* Simple types eligible to be ATOM children. */
00155 #define BASE_REAL_NAME          "real"
00156 #define BASE_INTEGER_NAME       "integer"
00157 #define BASE_SYMBOL_NAME        "symbol"
00158 #define BASE_BOOLEAN_NAME       "boolean"
00159 #define BASE_SET_NAME           "set"
00160 /* Simple types NOT eligible to be ATOM children. */
00161 #define BASE_CON_REAL_NAME      "real_constant"
00162 #define BASE_CON_INTEGER_NAME   "integer_constant"
00163 #define BASE_CON_BOOLEAN_NAME   "boolean_constant"
00164 #define BASE_CON_SYMBOL_NAME    "symbol_constant"
00165 /* relation, etc names */
00166 #define BASE_REL_NAME           "relation"
00167 #define BASE_LOGREL_NAME        "logic_relation"
00168 #define BASE_WHEN_NAME          "when"
00169 #define BASE_EXT_NAME           "EXTERNAL_MODEL"
00170 #define BASE_UNSELECTED         "unSELECTed_part"
00171 /*
00172  *  Don't randomly change these, as ASCEND MODEL code assumes they
00173  *  are what they are. Changing these constitutes requiring a global
00174  *  revision of ASCEND models.
00175  *
00176  * Don't strcmp with these to a SCP(symchar) string: use
00177  * CmpSymchar(GetBaseTypeName(enum type_kind),symchar) instead from
00178  * type_descio.h instead.
00179  */
00180 
00181 /* @} */
00182 
00183 #endif  /* ASC_COMPILER_H */
00184 

Generated on Thu Jul 17 04:00:10 2008 for libascend by  doxygen 1.5.1