Error Class Reference

#include <vypIO.h>

Collaboration diagram for Error:

Collaboration graph
[legend]

List of all members.


Detailed Description

streamable error object

Definition at line 97 of file vypIO.h.


Public Member Functions

 Error (EError type, std::string file, std::string msg, int lineno=0, std::string category=std::string(), Token token=Token())
 constructor used mostly in lower layers of compiler
 Error (EError type, std::string file, std::string msg, Token token, bool internal=false)
 constructor used mostly in higher layers of compiler
 ~Error ()

Private Member Functions

Coloroperator= (const Color &)

Private Attributes

Privated

Friends

std::ostream & operator<< (std::ostream &, const Error &)
 print error to stream (no new lines)

Classes

struct  Private

Constructor & Destructor Documentation

Error ( EError  type,
std::string  file,
std::string  msg,
int  lineno = 0,
std::string  category = std::string(),
Token  token = Token() 
)

constructor used mostly in lower layers of compiler

input token causing the error

Parameters:
type  error type
file  input file causing the error
msg  error message
lineno  line number (0 means not used)
category  error category, e.g. lexical, ...

Definition at line 92 of file vypIO.cc.

References Error::Private::category, Error::d, Error::Private::file, Error::Private::lineno, Error::Private::msg, Error::Private::token, and Error::Private::type.

Error ( EError  type,
std::string  file,
std::string  msg,
Token  token,
bool  internal = false 
)

constructor used mostly in higher layers of compiler

true for internal (compiler) error/warning

Parameters:
type  error type
file  input file causing the error
msg  error message,
token  input token causing the error

Definition at line 102 of file vypIO.cc.

References Error::Private::category, Error::d, Error::Private::file, Token::lineno, Error::Private::lineno, Error::Private::msg, Token::text, Error::Private::token, and Error::Private::type.

~Error (  ) 

Definition at line 115 of file vypIO.cc.

References Error::d.


Member Function Documentation

Color& operator= ( const Color  )  [private]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const Error  
) [friend]

print error to stream (no new lines)

Definition at line 118 of file vypIO.cc.


Member Data Documentation

Private* d [private]

Definition at line 118 of file vypIO.h.

Referenced by Error::Error(), StreamDecorator::operator<<(), and Error::~Error().


The documentation for this class was generated from the following files:
Generated on Sat Jul 4 18:33:22 2009 for vyp08 (compiler and interpreter of VYP08 language) by  doxygen 1.5.4