00001 /* 00002 * File: cw_misc.hh 00003 * $Id: cw_misc.h,v 1.4 2002/05/10 07:15:10 alec Exp $ 00004 * 00005 * Author: Alec Panoviciu (alecu@email.com) 00006 * 00007 * Comments: this header declares various extern "C" functions that 00008 * will be called form the generated parser code. 00009 * 00010 * Revision history: 00011 * 00012 * $Log: cw_misc.h,v $ 00013 * Revision 1.4 2002/05/10 07:15:10 alec 00014 * parser parse tree ok 00015 * 00016 * Revision 1.3 2002/04/30 16:24:38 alec 00017 * tested the scanner ptree & vBitVector implementation -> ok 00018 * 00019 * Revision 1.2 2002/04/29 17:55:41 alec 00020 * regexps almost done 00021 * 00022 * Revision 1.1 2002/04/29 09:40:01 alec 00023 * *** empty log message *** 00024 * 00025 */ 00026 00027 00028 /* 00029 Copyright (C) 2002 Alexandru Panoviciu (alecu@email.com) 00030 00031 This program is free software; you can redistribute it and/or modify 00032 it under the terms of the GNU General Public License as published by 00033 the Free Software Foundation; either version 2 of the License, or 00034 (at your option) any later version. 00035 00036 This program is distributed in the hope that it will be useful, 00037 but WITHOUT ANY WARRANTY; without even the implied warranty of 00038 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00039 GNU General Public License for more details. 00040 00041 You should have received a copy of the GNU General Public License 00042 along with this program; if not, write to the Free Software 00043 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00044 00045 */ 00046 00047 #ifndef __CW_MISC_HH__ 00048 #define __CW_MISC_HH__ 00049 00050 #if defined __cplusplus 00051 #define CLINK extern "C" 00052 #else 00053 #define CLINK 00054 #endif 00055 00056 00057 CLINK void yyerror (char *message); 00058 CLINK void yywarn (char *message); 00059 CLINK void cw_die (char *message); 00060 00061 typedef char Cstring; 00062 CLINK void deleteCstring (Cstring *s); 00063 00064 #include "clist.h" 00065 DECLARE_LIST(Cstring) 00066 00067 typedef struct t_CwCharClass 00068 { 00069 unsigned char first, last; 00070 } CwCharClass; 00071 00072 CLINK void deleteCwCharClass (CwCharClass *c); 00073 DECLARE_LIST(CwCharClass) 00074 00075 typedef void CwCatchClause; /* this is actually a dummy we store CatchClause 00076 * pointers in this list */ 00077 CLINK void deleteCwCatchClause (CwCatchClause *); 00078 DECLARE_LIST(CwCatchClause); 00079 00080 00081 #if defined __cplusplus 00082 00083 #include <string> 00084 #include <vector> 00085 00086 #include "ire_node_builder.hh" 00087 00092 vector<string>* CstringList2vector (CstringList l); 00093 00094 vector<CharClassDescriptor>* CwCharClassList2vector (CwCharClassList l); 00095 00096 extern int yylineno; 00097 #endif 00098 00099 #endif /* #ifndef __CW_MISC_HH__ */