00001 /*******************************************************************\ 00002 00003 SESAME project software license 00004 00005 Copyright (C) 2002 University of Amsterdam 00006 00007 This program is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License 00009 as published by the Free Software Foundation; either version 2 00010 of the License, or (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00020 02111-1307, USA. 00021 00022 For information regarding the SESAME software project see 00023 http://sesamesim.sourceforge.net or email 00024 jcofflan@users.sourceforge.net 00025 00026 \*******************************************************************/ 00027 00028 #ifndef STANDARDTYPES_H 00029 00030 #define STANDARDTYPES_H 00031 00032 #ifndef GLOBALSYM 00033 #include "symboldef.h" 00034 #endif 00035 00036 #define TYPEVOID "void" 00037 #define TYPEINTEGER "integer" 00038 #define TYPEINT_ "int_" 00039 #define TYPEFLOAT "float" 00040 #define TYPESTRING "string" 00041 #define TYPEBOOLEAN "boolean" 00042 #define TYPETIME "time" 00043 #define TYPETIME_BITS 64 00044 extern char realtime[]; 00045 00046 extern typex *typevoid; 00047 extern typex *typeinteger; 00048 extern typex *typefloat; 00049 extern typex *typestring; 00050 extern typex *typeboolean; 00051 extern typex *typerealtime; 00052 00053 void initstandardtypes(void); 00054 int isint_(typex *t); 00055 int tc_compatibel(typex *typl, typex *typr, parsex **expr); 00056 typex *tc_asgop(typex *typl, typex *typr, parsex *expr); 00057 typex *tc_arithmeticop(typex *typl, typex *typr, parsex *expr); 00058 typex *tc_compareop(typex *typl, typex *typr, parsex *expr); 00059 void inithasreplys(void); 00060 symboltable *gethasreplys(void); 00061 void addreplytype(char *tstr); 00062 void addreplymethod(symboltable *func_meths, char *tstr); 00063 typex *insertsourcetype(char *tstr); 00064 typex *findsourcetype(char *name); 00065 typex *findhasreply(char *name); 00066 void sizehasreplies(void); 00067 00068 #endif // STANDARDTYPES_H