FAUST compiler  0.9.9.6b8
Functions | Variables
errormsg.hh File Reference
#include "tlib.hh"
Include dependency graph for errormsg.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void setDefProp (Tree sym, const char *filename, int lineno)
const char * getDefFileProp (Tree sym)
int getDefLineProp (Tree sym)
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)

Variables

int yylineno = 1
const char * yyfilename
int gErrorCount

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().

{
    fprintf(stderr, "%s:%d: ERROR: %s ", filename, linenum, msg); 
    print(exp,stderr); fprintf(stderr, "\n");
    gErrorCount++;
}

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().

{
    cerr << filename << ':' << linenum << ": ERROR: " << msg << " : " << boxpp(exp) << endl;
    gErrorCount++;
}

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().

{
    fprintf(stderr, "%s:%d: REMARK: %s ", filename, linenum, msg); 
    print(exp,stderr); fprintf(stderr, "\n");
}

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().

{
    fprintf(stderr, "%s:%d: WARNING: %s ", filename, linenum, msg); 
    print(exp,stderr); fprintf(stderr, "\n");
}

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 DEFLINEPROP, getProperty(), hd(), and name().

Referenced by addLayerDef(), evalIdDef(), and realeval().

{
    Tree n;
    if (getProperty(sym, DEFLINEPROP, n)) {
        return name(hd(n)->node().getSym());
    } else {
        return "????";
    }
}

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 DEFLINEPROP, Node::getInt(), getProperty(), CTree::node(), and tl().

Referenced by addLayerDef(), evalIdDef(), and realeval().

{
    Tree n;
    if (getProperty(sym, DEFLINEPROP, n)) {
        return tl(n)->node().getInt();
    } else {
        return -1;
    }
}

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(), DEFLINEPROP, setProperty(), and tree().

Referenced by yyparse().

{
    setProperty(sym, DEFLINEPROP, cons(tree(filename), tree(lineno)));
}

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().

{ 
    fprintf(stderr, "%s:%d:%s\n", yyfilename, yylineno, msg); 
    gErrorCount++;
}

Here is the caller graph for this function:


Variable Documentation

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.

int yylineno = 1