00001 /************************************************************************ 00002 ************************************************************************ 00003 FAUST compiler 00004 Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale 00005 --------------------------------------------------------------------- 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 ************************************************************************ 00020 ************************************************************************/ 00021 00022 00023 00024 #ifndef _ERRORMSG_ 00025 #define _ERRORMSG_ 00026 00027 #include "tlib.hh" 00028 00029 00030 extern int yylineno; 00031 extern const char * yyfilename; 00032 extern int gErrorCount; 00033 00034 // associate and retrieve file and line properties to a symbol 00035 void setDefProp(Tree sym, const char* filename, int lineno); 00036 const char* getDefFileProp(Tree sym); 00037 int getDefLineProp(Tree sym); 00038 00039 // Parsing error 00040 void yyerror(char* msg); 00041 00042 // three levels or errors, warnings and remarks are provided during evaluation 00043 void evalerror(const char* filename, int linenum, const char* msg, Tree exp); 00044 void evalerrorbox(const char* filename, int linenum, const char* msg, Tree exp); 00045 void evalwarning(const char* filename, int linenum, const char* msg, Tree exp); 00046 void evalremark(const char* filename, int linenum, const char* msg, Tree exp); 00047 00048 #endif