#include "errormsg.hh"
#include "tlib.hh"
#include "boxes.hh"
#include "ppbox.hh"
#include <iostream>
Go to the source code of this file.
Functions | |
void | yyerror (char *msg) |
void | evalerror (const char *filename, int linenum, const char *msg, Tree exp) |
void | evalerrorbox (const char *filename, int linenum, const char *msg, Tree exp) |
void | evalwarning (const char *filename, int linenum, const char *msg, Tree exp) |
void | evalremark (const char *filename, int linenum, const char *msg, Tree exp) |
void | setDefProp (Tree sym, const char *filename, int lineno) |
const char * | getDefFileProp (Tree sym) |
int | getDefLineProp (Tree sym) |
Variables | |
const char * | yyfilename = "????" |
int | gErrorCount = 0 |
Tree | DEFLINEPROP = tree(symbol("DefLineProp")) |
void evalerror | ( | const char * | filename, | |
int | linenum, | |||
const char * | msg, | |||
Tree | exp | |||
) |
Definition at line 40 of file errormsg.cpp.
References gErrorCount, and print().
Referenced by applyList(), eval2double(), eval2int(), evalIdDef(), larg2par(), real_a2sb(), and realeval().
00041 { 00042 fprintf(stderr, "%s:%d: ERROR: %s ", filename, linenum, msg); 00043 print(exp,stderr); fprintf(stderr, "\n"); 00044 gErrorCount++; 00045 }
void evalerrorbox | ( | const char * | filename, | |
int | linenum, | |||
const char * | msg, | |||
Tree | exp | |||
) |
Definition at line 47 of file errormsg.cpp.
References gErrorCount.
Referenced by applyList().
00048 { 00049 cerr << filename << ':' << linenum << ": ERROR: " << msg << " : " << boxpp(exp) << endl; 00050 gErrorCount++; 00051 }
void evalremark | ( | const char * | filename, | |
int | linenum, | |||
const char * | msg, | |||
Tree | exp | |||
) |
Definition at line 59 of file errormsg.cpp.
References print().
00060 { 00061 fprintf(stderr, "%s:%d: REMARK: %s ", filename, linenum, msg); 00062 print(exp,stderr); fprintf(stderr, "\n"); 00063 }
void evalwarning | ( | const char * | filename, | |
int | linenum, | |||
const char * | msg, | |||
Tree | exp | |||
) |
Definition at line 53 of file errormsg.cpp.
References print().
Referenced by addLayerDef().
00054 { 00055 fprintf(stderr, "%s:%d: WARNING: %s ", filename, linenum, msg); 00056 print(exp,stderr); fprintf(stderr, "\n"); 00057 }
const char* getDefFileProp | ( | Tree | sym | ) |
Definition at line 72 of file errormsg.cpp.
References getProperty(), hd(), and name().
Referenced by addLayerDef(), evalIdDef(), and realeval().
00073 { 00074 Tree n; 00075 if (getProperty(sym, DEFLINEPROP, n)) { 00076 return name(hd(n)->node().getSym()); 00077 } else { 00078 return "????"; 00079 } 00080 }
int getDefLineProp | ( | Tree | sym | ) |
Definition at line 82 of file errormsg.cpp.
References Node::getInt(), getProperty(), CTree::node(), and tl().
Referenced by addLayerDef(), evalIdDef(), and realeval().
00083 { 00084 Tree n; 00085 if (getProperty(sym, DEFLINEPROP, n)) { 00086 return tl(n)->node().getInt(); 00087 } else { 00088 return -1; 00089 } 00090 }
void setDefProp | ( | Tree | sym, | |
const char * | filename, | |||
int | lineno | |||
) |
Definition at line 66 of file errormsg.cpp.
References cons(), setProperty(), and tree().
Referenced by yyparse().
00067 { 00068 setProperty(sym, DEFLINEPROP, cons(tree(filename), tree(lineno))); 00069 }
void yyerror | ( | char * | msg | ) |
Definition at line 34 of file errormsg.cpp.
References gErrorCount, yyfilename, and yylineno.
Referenced by yyparse().
00035 { 00036 fprintf(stderr, "%s:%d:%s\n", yyfilename, yylineno, msg); 00037 gErrorCount++; 00038 }
Tree DEFLINEPROP = tree(symbol("DefLineProp")) |
Definition at line 32 of file errormsg.cpp.
int gErrorCount = 0 |
Definition at line 31 of file errormsg.cpp.
Referenced by addLayerDef(), evalerror(), evalerrorbox(), main(), printDocDgm(), and yyerror().
const char* yyfilename = "????" |
Definition at line 30 of file errormsg.cpp.
Referenced by applyList(), declareMetadata(), eval2double(), eval2int(), larg2par(), SourceReader::parse(), real_a2sb(), yyerror(), and yyparse().