errormsg.cpp File Reference

#include "errormsg.hh"
#include "tlib.hh"
#include "boxes.hh"
#include "ppbox.hh"
#include <iostream>
Include dependency graph for errormsg.cpp:
This graph shows which files directly or indirectly include this file:

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"))

Function Documentation

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:


Variable Documentation

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 = "????"
Generated on Thu Jul 15 16:15:38 2010 for FAUST compiler by  doxygen 1.6.3