#ifndef VHDL_ERR_H
#define VHDL_ERR_H

#include "hub/err.h"
#include "edif_err.h"
#include "lexan.h"
#include "location.hh"
// -----------------------------------------------------------
class VhdlFilePosition {
	yy::location loc_;
public:
	VhdlFilePosition(const yy::location& loc):loc_(loc){}
	VhdlFilePosition (const VhdlFilePosition& that): loc_(that.loc_){};
    std::string tell (void) const; 
};
// -----------------------------------------------------------
class VhdlSyntaxReason {
	std::string reason_;
public:
	VhdlSyntaxReason (const std::string& rsn): reason_(rsn){}
	VhdlSyntaxReason (const VhdlSyntaxReason& that): reason_(that.reason_){}
    std::string tell (void) const; 
};

// -----------------------------------------------------------
typedef hub::CException <std::runtime_error, VhdlSyntaxReason,  VhdlFilePosition> VhdlSyntaxException;
typedef hub::CException <std::runtime_error, NotYetReason, VhdlFilePosition> VhdlNotYetException;
typedef hub::CException <std::runtime_error, UndefReason, VhdlFilePosition, CircCtx> VhdlUndefException;
typedef hub::CException <std::runtime_error, RedefReason, VhdlFilePosition, CircCtx> VhdlRedefException;
typedef hub::CException <std::runtime_error, OthReason,   VhdlFilePosition, CircCtx> VhdlOthException;
// -----------------------------------------------------------


#endif
